Skip to main content
SWStudyWalks Search

Generative AI at Work / Unit 4   GAI 095 worked example, 60 to 90 seconds

Quote First, Then Answer

Captions available

The idea

For questions about a long document, the DAIR.AI guide shows a two-prompt chain: first extract the relevant quotes, then answer only from those quotes.

In practice

Step one: ask the model to pull out the passages relevant to your question, word for word, or to say that none were found. Step two: read the quotes and confirm they are real and relevant. Step three: in a second prompt, give the question with only those quotes and ask for an answer that cites them. Step four: check that each claim in the answer traces to a quote.

Where people slip

The chain makes the evidence visible before the answer is written. If the first step returns nothing relevant, the honest answer is that the document does not say.

Your place on the trail

Every lesson rests on earlier ones and opens later ones. Tap any to jump.

Something wrong in this lesson? Flag it  ·  Sources for Generative AI at Work