LyraLearn AI Learning Platform
Exams
← Module 6 Β· RAG Architecture
🎧 Listen

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.

An answer whose claims link back to numbered source passages, while every call writes a record into an evaluation ledger with a refusal-rate gauge.

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:

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:

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.

🧠 Quiz yourself on this lesson →

Ask the AI Tutor

Grounded in the course lessons β€” it cites its sources and says when it doesn't know.