Lesson 13Module 3: Administration, RAG and safety 14 min· Level: Intermediate

Grounded prompts with citations

Confining the model to the passages you supply, requiring a citation for every claim, and authorising it to answer "not found in the provided documents" — the most effective anti-hallucination technique for school documents.

以繁體中文閱讀

The problem: the AI says three days, and the policy never says three days

A Secondary 6 class teacher needed to answer a parent's query — a student missed an internal test through illness, so what are the make-up arrangements? She pasted the school's whole Assessment Policy 2026 into a general AI and asked:

What are the school's make-up arrangements when a student misses an internal test through illness?

The answer came back beautifully organised: a medical certificate within three days, a make-up test within two weeks of the absence, scheduling arranged by the panel head. All three sound reasonable, and all three look like what most schools do.

Except the policy says only "a medical certificate must be submitted" with no three-day window, the make-up window is a month rather than two weeks, and scheduling sits with the academic affairs team rather than the panel head. The model completed your policy using what it learned from other schools' documents. Had that reply gone out, the school would have a written answer contradicting its own policy.

Same document, same question, different prompt:

Role: you are a school policy assistant that may cite only the documents provided.
Task: answer the question from the numbered passages below, using no knowledge outside them.
Output format: put a passage number after every point, quoting the single most important sentence verbatim. Anything the documents do not cover goes in a separate section headed "not found in the provided documents".
Constraints: do not infer, do not supply what schools usually do, and do not press a merely related passage into service as an answer. If the whole question is unanswerable from the passages, reply only "not found in the provided documents".

This time exactly one point carried a quotation and the other three landed in the "not found" section. The teacher did two things: replied to the parent with only what the policy actually states, and sent the make-up window to the academic affairs team to be written into the policy. That is the correct outcome.

Why this works

A model is not a database. It is a system that writes the most plausible next sentence. Paste in a policy and what it sees is not "the single source of truth" but "some highly relevant reference material" — while the tens of thousands of other school documents in its training have not gone anywhere. If your policy is silent on the make-up window and most policies it has seen say two weeks, it will say two weeks, in exactly the same confident register.

Another way to picture it: you hand your policy to a very experienced academic affairs head and ask her questions. The more experience she has, the more readily she fills your document's gaps with how it was done at her last school without noticing she is doing it. To keep her to your document you must say three things explicitly:

  1. Use only the passages I gave you — switch off outside knowledge.
  2. Show me where you saw each claim — make it checkable.
  3. Say so if it is not there — give her a legitimate way out.

The third is the one people leave out, and it is the most important. Models have a strong pull towards producing an answer. Without a respectable option to hand in a blank, the model forces the nearest passage to fit. Explicitly authorising "not found" makes handing in a blank a passing performance.

These three sentences are what a RAG system does behind the scenes, here done by hand. For the retrieval and chunking mechanics see knowledge bases and RAG and chunking, reranking and lost in the middle. For what belongs in a school knowledge base and how to permission it, see the school knowledge base.

Template 1: querying school policy

The most general of the three, for answering staff or parent questions about policy.

Role: you are a school policy assistant that may cite only the documents provided.
Task: answer the question from the numbered passages below.
Output:
1. "In the documents" — answer point by point, each ending with its passage number and a verbatim quotation, in quotation marks, of the single most important sentence.
2. "Not found in the provided documents" — the parts of the question the passages cannot answer.
3. "Documents to add" — one line naming what kind of document would be needed to answer the question in full.
Constraints: use no knowledge beyond the passages provided; do not infer or supply what schools usually do; do not press a related but non-answering passage into service. If the whole question is unanswerable, output only "not found in the provided documents" and add nothing further. Quotations must be verbatim, never paraphrased.
Question: [                    ]
Passages:
[1] ...
[2] ...
[3] ...

Template 2: checking a draft against policy

More valuable than querying: run a circular or letter against the policy wording before it goes out.

Role: you are a consistency checker for school documents.
Task: check every statement in the draft below against the policy passages provided.
Output format: a four-column table — "statement in the draft", "verdict (consistent / inconsistent / not found in the documents)", "passage number", "key sentence from the policy". Below the table, one line naming the item a teacher should deal with first.
Constraints: judge only from the passages provided and bring in no outside knowledge or general practice. Any statement the passages do not cover is "not found in the documents" and may never be marked consistent. Do not rewrite the draft — give verdicts only.
Draft: [                    ]
Policy passages:
[1] ...
[2] ...

Template 3: a student-facing question tool over school notes

The same technique for students needs two more constraints — no answers, and nothing beyond what the teacher has released.

Role: you answer questions about [subject] school notes for [year level] students.
Task: answer the student's question from the numbered passages below.
Output format: no more than four sentences, ending with the passage number. If the question is asking for the answer to an exercise, do not answer it — say which passage to reread instead.
Constraints: use only the passages below and nothing else. For anything the notes do not cover, reply "the notes do not cover this — ask your teacher". Never calculate or supply the final answer to an exercise. Never request or output personal data. Reply in Hong Kong English.
Student's question: [                    ]
Note passages:
[1] ...
[2] ...

How to cut a document into usable passages

Working by hand, how you cut decides whether this works. Three practical rules:

  • Cut at headings, not at word counts. Keep a policy section together with its subheading so the model knows what the passage is about.
  • Number each passage and name the section after the number — for example "[3] Section 4.2 Make-up arrangements". Then a citation tells a teacher exactly where to look.
  • Paste only the relevant passages, never the whole file. In a thirty-page policy the middle is the most easily overlooked. Finding three to five passages yourself with a keyword search beats pasting everything.

Common mistakes

  1. Writing only "answer based on the document below". Too weak — the model treats the document as reference rather than as the sole source. Fix: state explicitly that no knowledge beyond the passages may be used.
  2. Never granting the right to say "not found". The model will then always answer, and answer convincingly. Fix: put a dedicated "not found in the provided documents" section in the output specification, and say in the constraints what to output when nothing can be answered.
  3. Accepting paraphrase instead of quotation. Paraphrase is exactly where distortion enters, and it leaves a teacher unable to spot-check quickly. Fix: require the key sentence verbatim in quotation marks and refuse paraphrase.
  4. Pasting too many documents at once. Policy, curriculum outline and circular templates together, and the model blends them. Fix: one topic at a time, with the document name written before each passage number.

Going further

  • Panel meeting preparation: number and paste last year's panel report alongside this year's scheme of work and ask which items do not line up with last year's recommendations, keeping the "not found" rule in place.
  • General Studies and Science inquiry: give students three teacher-vetted sources as numbered passages and require every answer to carry a source number. It is the cheapest way to build a citation habit in Primary 6 to Secondary 1.
  • Liberal Studies and Citizenship and Social Development: deliberately supply two passages taking opposing positions, ask the model to mark which passage supports which conclusion, and forbid it from synthesising a compromise. It makes excellent discussion material.
  • Close reading in Chinese Language: number the paragraphs of the text and require every answer to quote the supporting sentence verbatim. Failing to quote is the most common way students lose marks.
  • SEN adaptation: tighten the output limit from four sentences to two and require a passage number and page reference after each, so the student can find it independently.

Where to go next

Grounded prompting is the best return on effort available for school documents: three constraints buy you a checkable answer, and it tells you honestly where your documents fall short. When "not found" starts clustering around certain kinds of question, that is the next batch of documents your knowledge base needs.

For students or web pages hiding instructions inside the documents to change the model's behaviour, see prompt injection and keeping student-facing content safe. To turn grounded results into something a system can import, see structured output as tables and JSON.

Key takeaways

  • Pasting a document into the prompt does not switch off the model's own memory; only an explicit ban on outside knowledge does that.
  • Requiring a source number on every claim is what lets a teacher spot-check in thirty seconds instead of rereading the whole document.
  • The single most important line authorises the answer "not found in the provided documents", without which the model will force the nearest passage into service.
  • A "not found" is not a failure but a useful signal — either the document needs a section adding, or retrieval did not surface the right passage.

FAQ

Because its training memory never went away. Your passages raised the weight of relevant material; they did not switch off what it already knew. Confining it takes three explicit sentences — no outside knowledge, cite a source for every claim, and this is what to say when the answer is absent. Drop any one and material leaks in.

That is a real effect; information in the middle of a long context is more easily overlooked. In practice, do not paste a whole policy. Split it into numbered passages and supply only the few that bear on the question, put the most critical passage first or last, and ask the model to judge relevance passage by passage before answering. See the LLM Classroom lesson on chunking and reranking.

No. Citations fail in two ways — quoting the right passage but distorting it in paraphrase, and attaching a plausible-looking passage number when the content actually sits elsewhere. That is why the templates here require the key sentence to be quoted verbatim rather than paraphrased, so a spot-check means comparing one sentence. Outward-facing documents and policy replies still need teacher review.

Sources, trust labels and disclaimers
  • · All prices, features and specifications follow the official documentation linked above. Vendors may change them at any time — verify before you purchase.
  • · Product names and trademarks mentioned belong to their respective owners. Edor.ai has no partnership, agency or sponsorship relationship with these companies.
  • · This article is an independent review compiled for educational purposes and is not procurement advice or legal advice.
  • · For any use involving student personal data, assess it against your school policy and the Personal Data (Privacy) Ordinance (PDPO) before rollout.
Subscribe to the AI in Education newsletter

One email a month: practical AI teaching articles for Hong Kong schools, platform updates and grant news. Unsubscribe any time.

We only use this address for the newsletter and never share it.