Where your agent gets its facts

You've been asked to make sure an agent answers correctly about your business. Where is it getting those answers?
Not from the model. A model is trained on public text, so it knows what a return policy is, what a service tier is, and what a shipping window means. It has never seen yours. It doesn't know which of your plans includes a given feature, which items you stopped carrying last spring, or what your support team is allowed to promise. None of that was in its training data, and reasoning cannot recover facts that were never there.
Retrieval is the step that closes that gap. Every time someone asks your agent a question, a retrieval layer finds the relevant piece of your content and puts it in front of the model before it answers. Sanity Context is that layer for content you keep in Sanity. That step decides the quality of everything after it, because a model handed the wrong documents will answer with complete confidence anyway.
What a wrong answer costs is not spread evenly across the questions people ask. A wrong answer about a return window costs money. A wrong answer about an allergen in food service, a dosage in healthcare, or a contractual term in an enterprise agreement costs considerably more. Other questions have one answer, sitting in one place, and cost almost nothing to get right.
Sanity Context offers four retrieval strategies across two modes, and the right one depends on the question being asked. Matching your users' questions to the method that should answer them is the skill this course builds. By the end, you'll be able to:
- Match each question your users ask to the retrieval method that should answer it, and recognize that a working agent usually needs more than one.
- Identify where a method genuinely cannot serve a question, and determine where that content belongs instead.
- Decide which system owns which answers, and what your agent is allowed to know.
None of that requires building anything yet. The sorting starts with a question that looks simple and isn't: how much work does an answer actually take?