Design an end-to-end RAG system for a university knowledge portal that answers questions from syllabus documents, academic regulations, examination guidelines, and notices. Explain ingestion, chunking, embeddings, vector storage, retrieval, prompt construction, answer generation, and citation of sources.
What's actually being asked
This is the applied, system-design version of the generic RAG workflow (see Q66): design a RAG system specifically for a university portal answering questions from syllabi, academic regulations, exam guidelines, and notices — including the practical details (metadata, recency, citations) a generic pipeline description would gloss over.
Answer
The scenario's specific wrinkle
Unlike a single-document RAG demo, this corpus has multiple document types that can contradict or supersede each other over time (a regulation gets amended, a notice overrides a default rule for one semester). A good design has to handle that, not just "chunk and embed everything."
1. Ingestion
Pull documents from their sources — syllabus PDFs per course, academic-regulation PDFs, exam-guideline notices, circulars from the notice board — via connectors/scrapers. Parse text out (OCR for scanned notices, if any). Crucially, tag each document with metadata at ingestion time: doc_type (syllabus / regulation / exam_guideline / notice), department, course_code (if applicable), effective_date, version. This metadata is what makes retrieval in step 5 precise rather than just "semantically close."
2. Chunking
Chunk by section/paragraph (not arbitrary fixed windows) so a policy like "minimum attendance requirement" stays intact inside one chunk rather than being split across two. Moderate overlap (e.g., ~300 tokens, ~50 overlap) to avoid losing context at boundaries. Every chunk inherits its parent document's metadata (doc_type, effective_date, etc.) — this is the key addition over the generic pipeline.
3. Embeddings
Each chunk is embedded with a sentence-embedding model into a dense vector, same as the generic pipeline — the embedding model choice is less important here than making sure the same model embeds both corpus chunks and incoming queries.
4. Vector storage
Store (vector, chunk text, metadata) triples in a vector database. Optionally combine dense vector search with keyword/BM25-style matching for exact tokens like course codes ("CS301") that embeddings alone can blur — a hybrid retrieval setup is a reasonable addition to mention, not a requirement.
5. Retrieval
Embed the student's query, run similarity search (cosine similarity) for the top-k chunks, but filter/boost by metadata: if the query mentions "exam," weight doc_type = exam_guideline and doc_type = regulation results higher; if multiple versions of a regulation exist, prefer the chunk with the latest effective_date so an amended rule doesn't get shadowed by an older one. This metadata-aware retrieval is the main thing that differentiates a real university-portal RAG system from the generic RAG pipeline.
6. Prompt construction
You are a university helpdesk assistant. Answer only using the context
below. Each context item is labelled with its source and date — cite the
relevant one(s) in your answer. If the context doesn't contain the answer,
say so instead of guessing.
[Academic Regulations, v2024, Sec 4.2]: "Students must maintain at least
75% attendance to be eligible to sit the mid-semester examination."
[Exam Guidelines Notice, 2026-02-10]: "Attendance shortage condonation
requests must be submitted 7 days before the exam date."
Question: {student question}7. Answer generation
The LLM generates the answer conditioned on exactly the above — so it's grounded in official, current policy text rather than the model's generic pretraining knowledge of "how universities usually work" (which could easily be wrong for this specific institution).
8. Citation of sources
The answer includes inline citations back to the exact source + date, e.g.:
"You need at least 75% attendance to sit the mid-semester exam [Academic Regulations, v2024, Sec 4.2]. If you're short, you can request condonation up to 7 days before the exam [Exam Guidelines Notice, 2026-02-10]."
This lets a student verify the claim against the real document instead of trusting the chatbot blindly — essential in an academic-compliance context where a wrong answer has real consequences (missing an exam, a grade dispute).
Exam tip
If this question and the generic RAG question (Q66) both appear on the same paper, don't just repeat the 8-step pipeline — the marks here are for the university-specific design choices: metadata tagging by document type, recency/version-aware retrieval for regulations that change over time, and explicit source citation for compliance/trust. Naming those is what separates this answer from a copy-paste of the generic workflow.