Build a grounded knowledge assistant
Answer from a small trusted document set and clearly decline when evidence is missing.
Question
Search
Relevant passages
Model
Grounded answer
Sources
Scenario
A user asks questions about internal policies. The system retrieves relevant passages, gives them to a model, cites sources, and qualifies unsupported answers.
Concepts used
- retrieval
- grounding
- chunking
- citations
- evaluation
Step-by-step build
- Choose five short, current documents and assign source titles.
- Create questions with known answers and two unsupported questions.
- Start with simple keyword search before adding embeddings.
- Pass only the best passages and explicit answer rules to the model.
- Require source labels with every factual answer.
- Decline when evidence is absent or contradictory.
- Evaluate retrieval and answer quality separately.
Expected result
Supported questions receive concise cited answers; unsupported questions produce a useful limitation instead of a guess.
Failure cases
- Right document not retrieved
- Outdated passage outranks current policy
- Citation does not support the claim
- Model answers from general knowledge
Improvements
- Add metadata filters
- Introduce hybrid semantic search
- Track unsupported-question rate
Platform variants
- Simple application search
- Microsoft Foundry
- UiPath Context Grounding
- Code-first RAG