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

# LanceDB Hybrid Search

> Run LanceDB's native vector and full-text search together in a single query.

```python lance_db_hybrid_search.py theme={null}
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.models.openai import OpenAIResponses
from agno.vectordb.lancedb import LanceDb, SearchType

knowledge = Knowledge(
    vector_db=LanceDb(
        table_name="hybrid_recipes",
        uri="tmp/lancedb",
        search_type=SearchType.hybrid,
    )
)
agent = Agent(
    model=OpenAIResponses(id="gpt-5.2"),
    knowledge=knowledge,
    search_knowledge=True,
    markdown=True,
)

if __name__ == "__main__":
    knowledge.insert(
        name="Recipes",
        url="https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf",
        metadata={"doc_type": "recipe_book"},
    )
    agent.print_response(
        "How do I make chicken and galangal in coconut milk soup?",
        stream=True,
    )
```

`SearchType.hybrid` runs LanceDB's native vector and full-text search and combines the results.

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno lancedb openai pypdf
    ```
  </Step>

  <Step title="Export the API key">
    ```bash theme={null}
    export OPENAI_API_KEY=your_openai_api_key_here
    ```
  </Step>

  <Step title="Run the example">
    ```bash theme={null}
    python lance_db_hybrid_search.py
    ```
  </Step>
</Steps>

## Next Steps

| Task                               | Guide                                                                        |
| ---------------------------------- | ---------------------------------------------------------------------------- |
| Insert, search, and delete content | [LanceDB usage](/knowledge/vector-stores/lancedb/usage/lance-db)             |
| Call async Agno methods            | [Async LanceDB usage](/knowledge/vector-stores/lancedb/usage/async-lance-db) |
| Configure search behavior          | [LanceDB overview](/knowledge/vector-stores/lancedb/overview)                |
