Answers need a traceable context
A departmental knowledge assistant needs to find relevant material and recognize when that material does not support an answer. I built Course Intelligence RAG around that retrieval-to-answer boundary.
My contribution
I developed a modular retrieval and LLM orchestration architecture using Llama 3.1 (8B), SBERT embeddings and FAISS vector search. Hierarchical semantic chunking prepares the source material for retrieval; filtering and structured context control shape what the language model receives.
A PyQt6 desktop interface runs retrieval and generation on a background thread, so the window stays responsive while the local model, served through Ollama, writes its answer.
Evaluation
I evaluated the assistant on a quantitative question set and with trap questions that check unsupported answers, using retrieval filtering and strict system prompting.
The public evaluation script at commit 7a6f90e defines 60 English questions: 10 each for a single department, topic-based retrieval, cross-department comparison and quantitative answers, plus 20 hallucination traps. Its automatic labels use text heuristics such as the presence of numbers, course codes and refusal phrases; they do not compare every answer with an annotated reference. I do not treat those labels as an accuracy benchmark. Independently verified retrieval, grounding and refusal scores are not reported here.
Design decisions
Separating embeddings, retrieval, context assembly and generation makes the pipeline easier to inspect. The system can handle knowledge across departments while keeping retrieved context distinct from model-generated text.
Limitations
Missing or outdated source material limits answer quality. Retrieval can fail even when the source contains the answer. Broader evaluation should distinguish retrieval failures, grounded-answer quality and refusal behavior rather than collapsing them into one score.
Inspect the implementation
The links below pin the code to commit 7a6f90e, so the implementation behind this description stays inspectable as the repository changes.