internalsGet Pro

AI Engineering · Module 05

RAG: answering from your own data

Lessons
16
Free
1
Reading
~5 h

Your progress

0 / 16 lessons done

Sign in to track

Lessons

  1. RAG: grounding answers in your own documentsFreeMost AI features that answer questions about a company’s products or rules are built this way. Knowing where the facts enter the prompt, and where they can go missing, is how you decide whether to trust an answer and find out why one was wrong.14 min
  2. Long context or RAG: when to send the whole documentEvery feature that answers from documents starts with this choice, and windows of a million tokens make sending everything look free. The wrong choice can cost dozens of times more per request, or leave you maintaining a search index you never needed.16 min
  3. Document ingestion: parsing PDFs, pages and tablesA search or assistant feature over company documents can only be as right as the text in its index. A scrambled table raises no error: it turns into a wrong answer weeks later, so engineers who build these features spend much of their time on ingestion.18 min
  4. Chunking: splitting documents for retrievalEvery RAG system splits its documents before it can search them. Where the cuts fall decides which facts reach the model together, and a rule separated from its exception produces a confident, wrong answer.17 min
  5. Contextual retrieval: giving each chunk its contextMost retrieval failures in a RAG system start at ingestion, long before the model writes an answer. A short context written once per chunk is one of the cheapest fixes you can make there, and you need to know what it costs and how to prove it worked.16 min
  6. Hybrid search: combining keywords and vectorsEvery search box and every RAG feature over company data gets two kinds of questions: ones described in words and ones that hinge on an exact code. Hybrid search is the usual way to serve both from one result list.17 min
  7. Reranking: putting the best passages firstMost production RAG systems retrieve dozens of candidates and keep only a few. The step that picks those few decides what the model reads, so it decides whether the answer is right.16 min
  8. Query rewriting: improving what gets searchedUsers rarely type a clean search query. In chat and support products the latest message is often a follow-up, so every RAG feature that searches with it finds the wrong passages.8 min
  9. Citations: showing where each answer came fromAny feature that answers from documents needs a way for a person to check the answer before acting on it. Citations turn “trust the model” into a one-click check, and they make a wrong answer show up instead of slipping through.16 min
  10. Keeping a RAG index fresh: updates and deletesThe first index you build is correct for one day. After that, every edit, new document and delete has to reach it, or the assistant quotes rules that no longer exist and shows data that should be gone.17 min
  11. Access control in RAG: who may see whatEvery RAG feature over company data has readers who may see different things: one customer against another, staff against customers, managers against everyone else. If the permission check sits in the wrong place, the model quotes a document to someone who was never allowed to read it.18 min
  12. Debugging RAG: the common failure modesEvery RAG feature produces wrong answers in production. An engineer who can trace one to the stage that caused it fixes that stage; one who can’t tends to change the prompt or the model and hope.17 min
  13. Text-to-SQL: answering questions from databasesSooner or later someone asks your AI feature a question whose answer is a number in a database. A model that writes SQL answers it in seconds; without the right limits, it also shows one customer another’s data, or a wrong number that looks right.18 min
  14. Advanced retrieval: multi-step, graph and agenticEvery RAG system meets questions that one search can’t answer, and every vendor offers a cleverer retrieval loop. Knowing what each loop costs per question, and which questions actually need it, keeps you from paying three times as much for answers that were already right.18 min
  15. Case: Intercom’s custom reranker for support RAGEvery team that runs RAG on a hosted reranker eventually asks whether to build its own. Intercom’s published case shows what that takes and what it pays back, so you can tell whether your situation is like theirs.18 min
  16. Design: a support assistant over company docsMost RAG products at work are this shape: many customers, each with their own documents, a person who checks every answer, and a bill that grows with use. The techniques are in the earlier lessons; making them work together, on time and within budget, is the job.30 min

Practise with

Terms this module teaches 54

Open glossary

Agentic retrieval

Retrieval where search is offered to the model as a tool, so the model decides whether, where and how often to search before it answers.