MemotivaPrompt Engineering Patterns: Generated Knowledge, RAG Prompts, Citation and Grounding Techniques

How do you reduce hallucinations in RAG prompts?

Prompt Engineering Patterns: Generated Knowledge, RAG Prompts, Citation and Grounding Techniques

Audio flashcard · 0:18

Nortren·

How do you reduce hallucinations in RAG prompts?

0:18

Reduce hallucinations by explicitly instructing the model to answer only from the provided context, to say "I don't know" when context is insufficient, to cite the source for each claim, and to avoid making up facts not present in the documents. Structure the prompt to keep the most important context near the question, since LLMs attend less to middle context.
docs.anthropic.com