LLM Zoomcamp: from RAG to agentic RAG
Coursework from DataTalksClub's LLM Zoomcamp. It covers a RAG assistant over course FAQs, an agentic version that decides what to search for, vector search, and a dlt + Qdrant ingestion pipeline.
- Problem
- Course participants keep asking questions that are already answered in the FAQ. An assistant should answer from those documents, not from the model's memory, and say so when it doesn't know.
- Outcome
- A plain RAG pipeline and an agentic RAG loop over the DataTalksClub FAQ. In the agentic version, function calling lets the model run several searches before it answers.
- Stack
-
- Python
- OpenAI SDK
- Groq
- Qwen3-32B
- minsearch
- sqlitesearch
- Qdrant
- dlt
- Jupyter
I started this repository with the 2025 cohort of DataTalksClub’s LLM Zoomcamp and continued it in 2026.
Plain RAG
ingest.py downloads the course FAQ as JSON from datatalks.club. It indexes the question, section and answer fields for text search, with course as a keyword filter. There are two index backends: minsearch in memory and sqlitesearch on disk.
For each question, RAGBase (in rag_helper.py) then:
- searches for the top 5 FAQ entries for the course. Matches on
questionare boosted 3× and matches onsection0.5×; - builds a prompt from the question and the retrieved Q&A pairs;
- sends it to
qwen/qwen3-32bthrough Groq’s OpenAI-compatible endpoint. The instructions say to answer only from the context, or to reply “I don’t know”.
Agentic RAG
The agentic version gives the model the search function as a tool and lets it decide what to search for. The instructions push it to search several times and to expand its queries with keywords from earlier results.
sequenceDiagram
participant U as User
participant A as Agent loop
participant L as LLM
participant S as search()
U->>A: question
loop until no tool calls
A->>L: messages + tool schema
L-->>A: call search(query)
A->>S: query
S-->>A: top 5 FAQ entries
A->>L: tool output
end
L-->>A: final answer
A-->>U: answer
The LLM is qwen/qwen3-32b on Groq. search() runs over the FAQ index with the course filter and field boosts.
The loop is about 30 lines of plain Python on the OpenAI Responses API, with no agent framework. It runs until a response contains no function calls, then returns the last assistant message.
Also in the repository
- Vector search homework (notebook).
- A dlt workshop that loads tagged course data into a local Qdrant collection.