Citations and Evaluation
A grounded answer is only useful if a reader can trust it, and a RAG system is only maintainable if you can measure how well it's working. The last two pieces of the pattern handle exactly this: citations make every answer auditable, and evaluation turns each call into a data point you can monitor. In LyraLearn, both happen on every Tutor response β nothing ships without a trail.

Citations: traceable claims
When the model generates from the graded evidence, it is required to attribute each claim to the
chunk it came from, using markers like [Source 2]. This isn't decoration β it's a control:
- Auditability. A user, reviewer, or auditor can open the cited lesson and confirm the answer is supported. In public-sector deployments this is often a hard requirement.
- Trust through transparency. Showing the source lets readers verify rather than take the AI's word, which is how you earn trust in a high-stakes setting.
- A second guard against hallucination. A claim the model can't tie to a retrieved source is a claim it shouldn't be making. Citations make ungrounded statements visible.
The Tutor numbers its sources to match the evidence set it was handed, so every sentence in its answer traces back to a specific lesson passage you can click through to.
Evaluation: log every call
You cannot improve what you don't measure, and a RAG system has many moving parts β chunking, embeddings, retrieval, grading, generation β any of which can quietly degrade. So LyraLearn logs an evaluation record for every Tutor call: the question, the chunks retrieved and their distances, the evidence grade (Strong/Moderate/Weak/None), whether it refused, the answer, and its citations.
These records give you observability into the system's behaviour rather than guesses. Two metrics matter most:
- Refusal rate β how often the Tutor fails closed. A spike usually means an ingestion or retrieval problem (content didn't get embedded, a heading changed) starving the grader of evidence. A rate near zero may mean it's answering when it shouldn't.
- Answer quality β sampling graded answers, checking citations actually support the claims, and tracking how often users find the response helpful.
Closing the loop
The evaluation log is what makes RAG a system you can operate, not just a demo. When a metric moves, the record tells you where: a wrong answer with Strong evidence points at the generation prompt; a refusal that should have answered points at chunking or retrieval; a citation that doesn't support its claim points at the model ignoring its grounding. Each is a different fix.
That completes the pattern this module set out to teach: ingest documents out-of-band, retrieve with hybrid search, grade the evidence and fail closed on None, generate with citations, and log every call to keep the whole thing honest. It's exactly what the AI Tutor does every time you ask it a question β LyraLearn teaching its own architecture by running on it.