instibrain
instibrain  /  guides  /  rag  /  lesson 6
lesson 6 of 8 · rag

The prompt and the citation rule.

Passages first, numbered with their source. The question last. One rule: answer only from the passages, cite the number, and say so when they do not answer.

new words

System line
The standing instruction at the top of the prompt. It holds the rule.
Citation
The passage number in the answer, so a reader opens the source and checks. AI basics, lesson 7.
Refusal
The answer "the passages do not say". The right answer when they do not; the rule asks for it in words.

the lesson

The model never saw the index. It sees only what the prompt pastes, so the prompt is the whole of its knowledge for this question. Its shape is fixed:

System: Answer only from the passages below. Cite the passage number.
If the passages do not answer the question, say so.

[1] contracts/acme-2025.pdf, p. 4, changed 2025-03-01
"Either party may terminate this agreement with 60 days' written notice."
[2] contracts/acme-2025.pdf, p. 1, changed 2025-03-01
"This agreement runs for 24 months from 1 March 2025."

Question: What notice does the Acme contract require?

Each passage carries its source and its date, so the answer can name both and a reader can tell an old version from a new one. The question comes last, after the evidence, so the model reads the evidence before it knows what to look for in it.

Per question, five passages of 500 tokensFigure
Tokens in: 100 of rule, 2,500 of passages, 30 of question2,630
Cost in, Sonnet 5.5 at $2 per million$0.0053
Tokens out, a short cited answer150
Cost out, at $10 per million$0.0015

Under a cent a question, at list price. The rule's last line is the one that fails silently when it is missing: without it, a model answers a question the passages do not cover from what it remembers, in the same confident voice. Acme is an example name.

The prompt, top to bottom, and the answer it earns. The contract is an example.

try it

Type this and press Enter. The question is not answered by the passages, on purpose:

Answer only from the passages below. Cite the passage number. If the passages do not answer the question, say so. [1] Invoices are paid within 30 days of the date we receive them. [2] A supplier bill is settled one month after it arrives. [3] The office is closed on 28 May. Question: How many days of holiday do I get?

you should see

  • "The passages do not say", or words to that effect, and no number of days.
  • Take out the last sentence of the rule and ask again: the answer may come from memory, in the same voice. That is why the line is there.