> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openbunny.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> Hybrid search using BM25, semantic embeddings, and LLM reranking.

OpenBunny uses QMD (Quantum Memory Database) for hybrid search across tasks and messages. This combines three search strategies for high-quality results.

## How it works

1. **BM25 keyword search** — fast lexical matching based on term frequency
2. **Semantic search** — vector similarity using embeddings to find conceptually related results
3. **LLM reranking** — a language model reranks the combined results for relevance

The three strategies run in parallel, and results are merged and deduplicated before final ranking.

## Search API

Search tasks via the REST API:

```bash theme={null}
curl "http://localhost:3100/tasks/search?q=fix+login+bug"
```

## Duplicate detection

The search system powers duplicate detection. When the agent creates a new task, it first calls `find_duplicates` which uses vector similarity to check for existing tasks with similar content.

```bash theme={null}
curl -X POST http://localhost:3100/tasks/find-duplicates \
  -H "Content-Type: application/json" \
  -d '{"text": "Fix the login timeout issue"}'
```

## Indexing

Tasks and messages are automatically indexed when created or updated. The search index is initialized at service startup and maintained incrementally.
