Stage 2 · Lesson 3 of 7
Where retrieval goes wrong
Retrieval-augmented generation () splits documents into chunks, turns them into (lists of numbers that capture meaning), stores them in a and adds the closest chunks to the prompt. Three things go wrong. Permissions: if retrieval ignores who is asking, the model becomes a way to read any document in the store, including other customers' files.
Planted content: anyone who can add a document, a wiki page or a support ticket can plant instructions or false facts the app will later retrieve. Leakage through answers: whatever is retrieved can come out in the reply. The fixes are permission filters applied in the retrieval query itself, control over who can write to indexed sources, and separate stores or strict tenant filters for different customers.
Common trapfiltering after the model has already read the chunks, which is too late.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CoursePaidGrokking Prompt Engineering for Software Engineers
Design Gurus · Beginner · Subscription
How system prompts, context and structured output really work, the ground every LLM risk stands on
- CourseFreeHugging Face Learn
Hugging Face · Intermediate
Free courses on how language models, embeddings and agents work, at an engineer's level