The school knowledge base and retrieval-augmented generation
A general AI does not know which unit your Primary 4 class reached last term. Retrieval-augmented generation has it consult the school's own documents before answering, like an open-book exam where the teacher hands over only the relevant pages. This lesson explains how, and why it beats trying to train the AI about your school.
以繁體中文閱讀A Primary 4 class teacher tried something. She asked an AI which Chinese units her school covers in the first term of Primary 4. The answer came back fluent, detailed, confident, and entirely invented.
Her conclusion was reasonable: this thing is useless.
But the problem was not that the AI is insufficiently clever. She asked a question it could not possibly know the answer to. It has never read your school's documents.
An open-book exam, with only the relevant pages
Picture two kinds of examination.
The first is closed-book. Pupils answer from memory. Where they remember, they are right. Where memory is hazy they reason, and where reasoning fails, many pupils write something that looks plausible. That is precisely the state a general AI is in when asked a school-specific question.
The second is open-book, but not the sort where a crate of textbooks is carried into the hall, because then nobody finishes. The teacher has read the question in advance and hands over only the three or four relevant pages, requiring the answer to cite page numbers.
Retrieval-augmented generation is the second kind. The name says the order, and the order is the whole point: find the material first, write the answer second.
Three steps, one sentence each
- Chunk and index. When the school uploads documents, the system cuts each one into passages and gives every passage a kind of meaning fingerprint.
- Retrieve. When somebody asks a question, the system fingerprints the question too, then finds the passages whose fingerprints sit closest to it.
- Generate. The system hands those passages to the model along with the question, instructing it to answer only from them and to cite where each point came from.
The meaning fingerprint in step two is an embedding, already covered in embeddings, positional encoding and self-attention. All you need here is one intuition: the computer matches by meaning, not by identical wording. So asking what a pupil must submit after sick leave will find the passage about medical documentation, even though not one word is shared.
Why not fine-tune instead?
This is the step schools most often get wrong. The instinct is understandable: if it does not know our school, let us train it on our data.
Compare the two:
| School knowledge base with retrieval | Fine-tuning | |
|---|---|---|
| Updating a policy | Upload the new version, effective at once | Requires another training run |
| Deleting a document | Deleted means no longer cited | Already folded into parameters, not individually recoverable |
| Can answers cite sources | Yes | No |
| Skills and hardware needed | An ordinary server | A GPU and specialist staff |
| What it suits | Facts, policies, curriculum content | Tone, format, the style of a specialist task |
The conclusion is clear. For facts, retrieve. Only for a way of speaking should you consider fine-tuning. The proper use of fine-tuning is in LoRA and QLoRA on one GPU.
Citations are not decoration
Faced with an uncited answer, a teacher can only choose to believe it or not. Faced with an answer marked "source: Homework Policy 2026, section 3", a teacher can open it and check in thirty seconds.
For a school that difference is decisive. It turns AI from a very confident stranger into a colleague who cites documents. It does not remove hallucination, since a model can still misread a passage, but it turns errors into discoverable errors.
Getting citations reliably requires firm instructions, like the ones below.
A grounded prompt you can try now
Paste this together with any school document and you will see the effect of open-book-but-only-these-pages for yourself:
Inside the angle brackets below are extracts from our school's documents. Answer my question using only these extracts.
Rules: after each conclusion, mark in square brackets which extract it came from, for example [passage 2]; if the extracts do not contain the answer, reply "not mentioned in the documents" and do not fill the gap from your own knowledge; do not speculate and do not give examples from outside the extracts.
Question: what are the arrangements for a make-up test when a pupil misses a test through illness?
<<<
[passage 1] ...
[passage 2] ...
[passage 3] ...
>>>
Then run the control experiment. Replace the question with one the documents genuinely do not answer, such as missing a test because of a family holiday. With the "say not mentioned" instruction in place, the model admits it is not there. Take that line out and you will get a beautifully constructed invention. That single line is the whole value of a grounded prompt, and the fuller pattern is in grounded prompts with citations for RAG.
An example from the classroom
New teachers at one primary school spent their first month asking the same handful of questions. What is the homework limit? Who is told when a pupil is absent two days running? What is the handover procedure for recess duty?
Every answer was written down already, spread across the staff handbook, the homework policy and administrative circulars, in seven documents across three shared folders. In practice new teachers asked whoever sat nearby, and colleagues answered from memory, sometimes wrongly.
The school put those seven documents into the knowledge base, open to all staff. A new teacher asking about the homework limit got an answer marked "source: Homework Policy 2026, section 2.3". He opened it to check, and while there noticed the same section covers long holidays, which he would never have thought to ask about.
Six months on, the most striking change was not the time saved but that the answers had become consistent. Where eight teachers once gave eight versions from memory, all of them now pointed at the same section of the same document. Which documents to upload, how to tier permissions and who maintains them is covered fully in our article on the school knowledge base and is not repeated here.
What this means for your classroom
- Ask the right question in the right place. Anything involving school-specific fact must be asked where a knowledge base exists. Asked in a general chat tool, the answer is invented.
- Make citations a habit. In any tool, add "cite which passage each point came from, and say not mentioned if you cannot find it". Ten words of cost, checkability in return.
- A knowledge base is a panel asset, not an IT project. The most valuable content is teaching schedules, marking rubrics and teaching materials, and only panel heads and classroom teachers can write those.
- Document quality sets answer quality. A vague policy with muddled versions retrieves vaguely. Introducing a knowledge base tends to force a school to tidy its documents, which is a welcome side effect.
What comes next
If retrieval always fetched the right passage, none of this would be difficult. In practice how documents are cut, which of ten retrieved passages gets read first, and why information in the middle of a long document gets overlooked all change the answer. That is the next lesson, chunking, reranking and lost in the middle. To revisit why prompts need constraints, see prompt engineering in one lesson. For how the platform protects student data, see security and privacy.
Key takeaways
- Retrieval-augmented generation is an open-book exam, and specifically the kind where the teacher hands the pupil only the relevant pages
- Documents never enter model training and are only consulted at the moment of answering, so they can be added, removed or exported at any time
- To make AI know your school, retrieve documents rather than fine-tune the model, because the cost and risk profiles are entirely different
- Only an answer with a source can be checked, and being checkable is the fundamental difference between a school platform and a general chat tool
FAQ
No, and the distinction matters a great deal. Training folds data into the model's parameters, after which nothing can be individually retrieved or deleted. Retrieval pastes relevant passages into the prompt at the moment of answering, and the documents stay in the school's database. Delete one and the AI stops citing it a second later.
Because retrieval can fetch the wrong thing, or the passage it fetched was cut off mid-thought. That is exactly the problem the next lesson deals with, see [chunking, reranking and lost in the middle](/learn/llm/chunking-reranking-and-lost-in-the-middle). The practical safeguard is to require a citation, so a teacher can see at a glance which document was read.
A few accurate ones beat many miscellaneous ones. We suggest three categories in the first month, namely teaching schedules, the homework policy and circular templates. The rollout order and document categories are set out in [our article on the school knowledge base](/blog/school-knowledge-base-rag-ai).
- · 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.