Notes: Welcome. Announce the common thread: at the end of the session, everyone will be able to draw a complete RAG pipeline and diagnose why a RAG responds poorly. Remember that this session builds directly on Session 1 (embeddings).
Notes: LLM = Large Language Model — redefine even if the group knows. Each objective corresponds to a block of the session.
Notes: Ask the group for 30 seconds: “Who can redefine an embedding for me? ". This reminder is the foundation of the entire session — vector retrieval is ONLY geometry. Without that, the rest is voodoo.
Notes: Let the group respond. The two outcomes (admission of ignorance / plausible invention) illustrate the problem. Continue: why can't the model know? → next slide.
Notes: Analogy: a printed newspaper — excellent on the day, never updated afterwards. Point out that re-training a model costs millions ⚠: we don't do it to refresh facts.
Notes: This is the most important limit in a professional context. Question to the group: “What documents from YOUR daily life has a model never seen?” List 3-4 concrete examples; we will reuse them in the chunking block.
Notes: This is the least intuitive limit. Consequence: even on the public, the model can distort details (dates, numbers, names). Hence the plausible hallucinations. The three limits together justify the RAG.
Notes: Use a live demo when available. Establish the phrase “closed-book exam”; RAG turns the next question into an open-book exam.
Notes: THE pivot slide. We do not modify the model, we do not re-train it: we enrich its prompt at the time of the question. The model remains the same — it is its context that changes.
Notes: Frequent objection to defusing right away. Analogy: to answer an exam question, you don't bring the entire library — you bring the 3 correct cards.
Notes: Fundamental temporal separation — participants systematically confuse them. Ingestion is done WITHOUT user; the query takes place in a few hundred milliseconds ⚠.
Notes: Reminder: 1 token ≈ 0.75 words in English, a little less in French ⚠. The word “chunk” will remain in English (trade standard) – translate it once: “piece”. The fine cutting decisions arrive at block C.
Notes: Insist: this is the SAME mechanism as in Session 1, applied to each piece of document. A corpus of 10,000 chunks = 10,000 points in a space of several hundred dimensions ⚠.
Notes: Do not go into the details of implementing vector bases — outside the scope. Remember the function: search for nearest neighbors, fast, on a large scale.
Notes: Question and chunks must share the same vector space. Two different embedding models produce incompatible distances. Small k can miss evidence; large k adds noise, latency, and cost.
Notes: Show that there is NO magic: RAG is prompt assembly. The model does not “connect” to anything — it reads what is put in front of it, nothing more.
Notes: 5 minutes. Type “How many days of telework per week?” Before each step, ask the group to predict what will come out. End with the trap question “pricing policy for NGOs” → honest refusal (teaser for Block D). Then pause.
Notes: Resume after the break. State the point plainly: a mediocre RAG almost always has mediocre chunking. Keep the same analogy throughout: cutting a book into revision sheets.
Notes: Demo the chunking viewer (tab 2): fixed tiny size → orphan sentences; then enable overlap and show the copper highlighted area.
Notes: Breadcrumbs make the chunk understandable on its own AND improve its retrieval (the words in the title count in the embedding). Show the “structural” strategy in the viewer: sections remain intact.
Notes: Deliberately striking example. In the viewer, the “fixed size” strategy cuts the scale table right in the middle — show it. Real cases: price scales, compatibility matrices, HR scales.
Notes: Emphasize security: the filter by access level applies TO RETRIEVAL, never after generation (if the chunk enters the prompt, the information can leak into the response). Quotes = condition of trust in business. Start exercise 1 just after this slide.
Notes: Shock demo to the similarity explorer (tab 3): click ERR-4471 vs ERR-4472 → similarity almost 1 while they designate different things. Other victims: rare proper names, product references, legal article numbers.
Notes: BM25 = classic keyword search algorithm (cite it without detailing it). Message: vector and lexical search are not competitors; they are complementary, and each covers the other's blind spots.
Notes: “Vanilla RAG” means the simple pipeline covered so far. Treat the following techniques as conditional tools: add a stage only when an evaluation set exposes the failure it is meant to fix.
Notes: “How does it work for new people?” can become “telework conditions for new hires,” “telework seniority requirement,” and “telework eligibility exceptions.” HyDE can help with short queries, but it can also introduce the wrong angle. Compare it on an evaluation set.
Notes: A cross-encoder is slower, so it is applied to candidates rather than the entire corpus. Do not promise universal improvement: measure recall, precision, latency, and cost on the same queries.
Notes: A score produced by the same model is not external evidence. Calibrate the decision on an annotated evaluation set containing expected answers, expected absences, and known contradictions. Distinguish the families: **Corrective RAG** grades passages and retries retrieval; **Adaptive RAG** chooses a route based on the query; **Self-RAG** emits reflection signals. In all three, a self-score is a **routing signal**, never external evidence.
Notes: The best pipeline is not the most complex one. It is the simplest pipeline that meets defined quality, security, latency, and cost thresholds on a representative evaluation set.
Notes: Use the cook-and-runner analogy: replacing the cook does not save a dessert when the runner brought salt instead of sugar. Avoid unsupported percentages; diagnose each incident from evidence.
Notes: Do not add HyDE or reranking automatically. If the document is absent from the index, neither technique can recreate it.
Notes: A clean, cited answer can still be stale. Corpus freshness is a system property, not a model capability.
Notes: The evidence gate decides whether the system may answer; the prompt then constrains generation. Model self-evaluation replaces neither verifiable citations nor an external evaluation set.
Notes: Ask learners to restate points 4–6 with the technique, expected evidence, and added cost.
Notes: Do not promise a nonexistent RAG-focused Session 5. Robust-RAG improvement is now part of this session through the intervention ladder and diagnostic exercise.