How do you prevent a RAG answer from mixing sources incorrectly?
Preserve source boundaries and provenance, include metadata such as dates and authority, and require claims to cite supporting…
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 3073–3084 of 3610 questions
Preserve source boundaries and provenance, include metadata such as dates and authority, and require claims to cite supporting…
Naive RAG commonly embeds chunks, retrieves top-k results, and places them in a prompt. Advanced designs may add query rewriting,…
A multi-stage pipeline uses a fast first-stage retriever for broad candidate coverage, followed by more expensive ranking or filtering…
Graph retrieval is useful when answers depend on explicit relationships among entities, such as people, organizations, products,…
Normalize source records into a common document/chunk schema while preserving source-specific metadata, permissions, freshness, and…
Tenant identity must come from trusted authentication and authorization, not an arbitrary client field or model output. Apply tenant…
Recall@k measures how many known relevant items appear in the top k retrieved results. It helps assess whether the first-stage…
A golden dataset contains representative questions, trusted supporting passages, expected answer facts or criteria, and labels for…
Collect feedback that identifies the failure type, not just a thumbs-up score. Review whether the right source was indexed, retrieved,…
Use the same fixed evaluation queries, corpus snapshot, permissions, and scoring rubric. Compare retrieval metrics, answer quality,…
Context precision evaluates how much of the retrieved context is relevant to answering the question, often considering the ranking of…
Build adversarial documents containing instructions to ignore the system prompt, expose secrets, or call tools. Verify that retrieved…