Skip to main content
For a string-input run, set add_knowledge_to_context=True to retrieve before the first model call.
traditional_rag_lancedb.py

Run the Agent

1

Set up your virtual environment

2

Install dependencies

3

Export the API key

4

Run the agent

How It Works

  1. add_knowledge_to_context=True searches with the run’s string input.
  2. Returned documents are appended to the user message inside a <references> block.
  3. search_knowledge=False removes the model-callable search tool.

Next Steps