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

How do you instruct a model to cite sources?

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

Audio flashcard · 0:19

Nortren·

How do you instruct a model to cite sources?

0:19

To get citations, include the document IDs or names with each retrieved chunk, then instruct the model to reference them when stating facts. Specify the citation format in the instructions, like "Cite sources as [doc-id]." For higher reliability, ask the model to only state claims that are directly supported by a citation, and to abstain otherwise.
docs.anthropic.com