Skip to main content
The simplest way to give an agent access to documents. Content is automatically retrieved and injected into the system prompt before the agent responds.
basic_rag.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run Qdrant

5

Run the example

Save the code above as basic_rag.py, then run:
Full source: cookbook/07_knowledge/01_getting_started/01_basic_rag.py