# staceyampaire/group-g-university-student-support-case-agent architecture

> Architecture diagram of the GitHub repository staceyampaire/group-g-university-student-support-case-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/staceyampaire/group-g-university-student-support-case-agent
- Repository: https://github.com/staceyampaire/group-g-university-student-support-case-agent

## Overview

This repository is a university student-support assistant prototype. Its principal demonstrated workflow loads approved university documents with provenance, chunks and embeds them, ranks chunks against a student question, and uses retrieved evidence to generate a grounded answer, with Groq as a generation fallback. Separate scripts demonstrate case-information prompting and prompt evaluation. The graph reflects the sampled scripts and README; it does not assume a persistent index or application service. The demo currently uses a hard-coded question rather than an interactive student interface.

Main entry points: [`src/rag_demo.py`](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py) (RAG workflow), [`src/ingestion.py`](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/ingestion.py) (Document ingestion), [`src/main.py`](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/main.py) (Case response demo), [`src/evaluate_prompt.py`](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/evaluate_prompt.py) (Prompt evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_corpus["Approved knowledge"]
  node_knowledge["University documents"]
  node_register["Corpus register"]
end

subgraph group_rag["RAG demo"]
  node_ingestion["Document ingestion<br/>[ingestion.py]"]
  node_demo["RAG workflow<br/>[rag_demo.py]"]
  node_embedding["Embedding and ranking<br/>[rag_demo.py]"]
  node_grounding["Evidence context<br/>[rag_demo.py]"]
  node_generation["Grounded generation<br/>[rag_demo.py]"]
end

subgraph group_prompts["Case prompts"]
  node_case_script["Case response demo<br/>[main.py]"]
  node_prompt_eval["Prompt evaluation<br/>[evaluate_prompt.py]"]
end

node_student(("Student question"))
node_gemini{{"Gemini API"}}
node_groq{{"Groq API"}}

node_demo -->|"loads documents"| node_ingestion
node_ingestion -->|"reads documents"| node_knowledge
node_ingestion -->|"reads provenance"| node_register
node_student -->|"asks"| node_demo
node_demo -->|"embeds corpus"| node_embedding
node_demo -->|"embeds question"| node_embedding
node_embedding -->|"ranks chunks"| node_grounding
node_grounding -->|"provides evidence"| node_generation
node_generation -->|"generates answer"| node_gemini
node_generation -.->|"fallback generation"| node_groq
node_case_script -->|"generates response"| node_gemini
node_prompt_eval -->|"evaluates prompt"| node_gemini

click node_knowledge "https://github.com/staceyampaire/group-g-university-student-support-case-agent/tree/main/knowledge"
click node_register "https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/docs/corpus_register.csv"
click node_ingestion "https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/ingestion.py"
click node_demo "https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py"
click node_embedding "https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py"
click node_grounding "https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py"
click node_generation "https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py"
click node_case_script "https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/main.py"
click node_prompt_eval "https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/evaluate_prompt.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_knowledge,node_register toneBlue
class node_ingestion,node_demo,node_embedding,node_grounding,node_generation toneAmber
class node_case_script,node_prompt_eval,node_gemini,node_groq toneMint
class node_student toneIndigo
```

## Components

### Approved knowledge

- [University documents](https://github.com/staceyampaire/group-g-university-student-support-case-agent/tree/main/knowledge): `knowledge`
- [Corpus register](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/docs/corpus_register.csv): `docs/corpus_register.csv`

### RAG demo

- [Document ingestion](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/ingestion.py): `src/ingestion.py`
- [RAG workflow](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py): `src/rag_demo.py`
- [Embedding and ranking](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py): `src/rag_demo.py`
- [Evidence context](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py): `src/rag_demo.py`
- [Grounded generation](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/rag_demo.py): `src/rag_demo.py`

### Case prompts

- [Case response demo](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/main.py): `src/main.py`
- [Prompt evaluation](https://github.com/staceyampaire/group-g-university-student-support-case-agent/blob/main/src/evaluate_prompt.py): `src/evaluate_prompt.py`

### Other components

- **Student question**
- **Gemini API**
- **Groq API**

## Connections

- RAG workflow → Document ingestion: loads documents (evidence: `src/rag_demo.py`)
- Document ingestion → University documents: reads documents (evidence: `src/ingestion.py`)
- Document ingestion → Corpus register: reads provenance (evidence: `src/ingestion.py`)
- Student question → RAG workflow: asks (evidence: `src/rag_demo.py`)
- RAG workflow → Embedding and ranking: embeds corpus (evidence: `src/rag_demo.py`)
- RAG workflow → Embedding and ranking: embeds question (evidence: `src/rag_demo.py`)
- Embedding and ranking → Evidence context: ranks chunks (evidence: `src/rag_demo.py`)
- Evidence context → Grounded generation: provides evidence (evidence: `src/rag_demo.py`)
- Grounded generation → Gemini API: generates answer (evidence: `src/rag_demo.py`)
- Grounded generation → Groq API: fallback generation (evidence: `src/rag_demo.py`)
- Case response demo → Gemini API: generates response (evidence: `src/main.py`)
- Prompt evaluation → Gemini API: evaluates prompt (evidence: `src/evaluate_prompt.py`)
