Two-prompt chain for grounded QA. Prompt 1 pulls verbatim quotes; prompt 2 turns those quotes into the final answer. Forcing extraction first cuts hallucination dramatically.
Prompt 1 (extraction):
You are a helpful assistant. Your task is to help answer a question given in a document. The first step is to extract quotes relevant to the question from the document, delimited by ####. Please output the list of quotes using <quotes></quotes>. Respond with "No relevant quotes found!" if no relevant quotes were found.
####
`{{document}}`
####
Question: `{{question}}`
Prompt 2 (answer composition):
Given a set of relevant quotes (delimited by <quotes></quotes>) extracted from a document and the original document (delimited by ####), please compose an answer to the question. Ensure that the answer is accurate, has a friendly tone, and sounds helpful.
####
`{{document}}`
####
<quotes>
`{{quotes}}`
</quotes>
Source: https://www.promptingguide.ai/techniques/prompt_chaining