CourseAgentic AI for Business
ModuleKnowledge and integrations
Duration12 min
Progress0/12
Course material0/12 · 0%
  1. 1How a language model actually works10 min
  2. 2Prompting: turning intent into reliable instructions11 min
  3. 3Choosing your model9 min
  4. 4From chatbot to agent: the reasoning-action loop9 min
  5. 5Tools and function calling11 min
  6. 6Agent design patterns: beyond a single loop11 min
  7. 7Memory and knowledge: grounding agents with RAG11 min
  8. 8Building a knowledge base that retrieves well12 min
  9. 9Connecting to your systems: APIs, webhooks, and MCP10 min
  10. 10Guardrails, evaluation, and cost10 min
  11. 11Deploying an agent on a real workflow10 min
  12. 12Choosing what to automate: an ROI framework10 min

Lesson 8 / 12 · 12 min

Building a knowledge base that retrieves well

Retrieval quality decides RAG quality. Document prep, chunking, hybrid search, metadata filters, and how to know retrieval is working.

RAG answers are only as good as the chunks you retrieve. Feed the model the wrong passage and it will confidently answer from the wrong passage. So the real work of RAG is not the prompt, it is making retrieval reliably find the right thing. This lesson is that craft.

Prepare the documents

Clean the source first. Strip navigation, boilerplate, and duplicates. Keep real structure like headings and tables, because that structure carries meaning. Attach metadata to each document (product, category, date, source) so you can filter on it later. Tidy inputs are most of retrieval quality.

Chunking

Split documents into pieces small enough to be specific but large enough to stand on their own. Cut on natural boundaries, a section, a Q&A pair, a clause, rather than every N characters mid-sentence. Add a little overlap between chunks so an idea that straddles a boundary is not lost. Bad chunking is the most common reason RAG underperforms.

Retrieve better

  • Vector search finds chunks by meaning; keyword search catches exact terms like SKUs and names.
  • Hybrid search runs both and merges, so you get meaning and precision.
  • A re-ranker reorders the top candidates by true relevance before they reach the model.
  • Metadata filters narrow to the right subset first (this product, this month, this branch).

Ground and cite

Tell the model to answer only from the retrieved chunks, to say plainly when the answer is not in them, and to cite which chunk it used. Citations are not decoration, they let you and the customer verify the answer, and they make wrong answers easy to trace back to a bad chunk.

Measure retrieval

Build a set of real questions, each paired with the chunk that should answer it. Check whether retrieval returns that chunk in the top results. If it does not, no prompt and no bigger model will save the answer, the right information never reached the model. Fix retrieval first, always.

What you take away

  • Retrieval quality, not the prompt, is the ceiling on RAG quality
  • Chunk on natural boundaries with a little overlap; clean and tag your docs
  • Use hybrid search plus a re-ranker and metadata filters to find the right chunk
  • Make the model cite chunks, and measure whether retrieval returns the right one
Related Etzal serviceAutopilot: AI that runs your operationsPrefer it done for you? See how we help.
Building a knowledge base that retrieves well - Agentic AI for Business | Etzal Academy | Etzal Group