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

# Semantic Search

> Find related issues using AI embeddings and Hybrid Search

# Semantic Search

Simili Bot uses semantic search to find related issues across your repositories based on meaning, not just keywords. This allows the bot to identify relationships that traditional keyword-based search would miss.

## How it Works

### Beyond Keywords

In a traditional search system, an issue titled "Login button doesn't work" might be missed if you search for "authentication failures". Semantic search bridges this gap by understanding the **intent**.

* **Traditional Search**: Finds exact word matches (e.g., "Login" == "Login").
* **Semantic Search**: AI understands concepts (e.g., "Can't sign in" ≈ "Auth failing").

### Search Backends

Simili Bot v0.2.0 offers three ways to perform these searches:

<CardGroup cols={3}>
  <Card title="GitHub Native" icon="github">
    Zero-config hybrid search using GitHub's own infrastructure.
  </Card>

  <Card title="Qdrant" icon="database">
    High-performance vector search for deep semantic analysis at scale.
  </Card>

  <Card title="BM25" icon="magnifying-glass">
    Local keyword-based search for exact matches and error codes.
  </Card>
</CardGroup>

***

## The Search Pipeline

When a new issue is processed, Simili Bot follows these steps:

<Steps>
  <Step title="Context Extraction">
    The bot extracts the title, body, and recent comments from the issue.
  </Step>

  <Step title="Candidate Search">
    The chosen backend (e.g., GitHub Native) returns the top 5-10 most similar historical issues.
  </Step>

  <Step title="LLM Verification">
    The bot sends these candidates to an LLM (Gemini or OpenAI) to confirm if any are actual duplicates or highly related.
  </Step>
</Steps>

***

## Configuration

Tuning the search sensitivity is crucial for balancing noise and discovery.

### Tuning Thresholds

The `similarity_threshold` determines how strict the bot is when suggesting related issues.

| Level            | Value  | Effect                                         |
| :--------------- | :----- | :--------------------------------------------- |
| **Conservative** | `0.85` | Only returns issues that are nearly identical. |
| **Recommended**  | `0.70` | Good balance of accuracy and discovery.        |
| **Permissive**   | `0.60` | Returns loosely related issues; higher noise.  |

### Configuration Example

```yaml theme={null}
search:
  backend: "github_native" # or "qdrant"
  bm25_fallback: true

defaults:
  similarity_threshold: 0.70
  max_similar_to_show: 5
  cross_repo_search: true
```

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Duplicate Detection" href="/guides/duplicate-detection" icon="copy" />

  <Card title="Search Backends" href="/configuration/search-backends" icon="magnifying-glass-chart" />
</CardGroup>
