As asked
Design a RAG feature that answers customer support questions using internal documentation. How do you keep answers grounded and know when the model should refuse?
Sample answer outline
A good answer separates retrieval quality from generation quality. Chunk documents around semantic boundaries, attach metadata such as product, version, and freshness, and retrieve with hybrid search plus reranking for high precision. The generation prompt should require citations to retrieved passages and should refuse when evidence is missing or contradictory. Evaluation needs golden questions, adversarial no-answer cases, citation accuracy checks, and human review for high-impact categories. Candidates often focus on vector databases while ignoring stale docs, permissions, and the model's tendency to fill gaps.
Expect these follow-ups
- How do you prevent a user from retrieving documents they cannot access?
- What metric tells you retrieval is the bottleneck?
- How do you handle two documents that disagree?