Campus Tool - AI Evaluation Architecture
System Overview
FastAPI evaluation service + n8n workflows. GPT-4o judges prompts and generated code. n8n combines Evolve MCQ scores with prompting scores for pass/fail recommendations.
Architecture Diagram
graph TB
CandidateWebhook["Candidate / webhook payload"]
N8nWorkflows["n8n workflows"]
EvolveMcq["Evolve MCQ"]
FastApiApp["FastAPI app/main.py"]
OpenAiGpt4o["OpenAI gpt-4o"]
SqliteDatabase[("SQLite evaluations.db")]
CandidateWebhook -->|"starts final-score flow"| N8nWorkflows
N8nWorkflows -->|"fetches MCQ score"| EvolveMcq
N8nWorkflows -->|"calls prompt / build eval"| FastApiApp
FastApiApp -->|"judges prompt + code"| OpenAiGpt4o
FastApiApp -->|"stores evaluation results"| SqliteDatabase
How to read this diagram
Arrows mean flow / dependency / "talks to", not button clicks. Each arrow label says what happens on that step.
Repo layout
| Path | Purpose |
|---|---|
app/main.py | FastAPI entry |
app/ | Routes, services, models |
aiservices.py | Single-file handoff copy of eval logic |
rubrics/ | Prompt + code rubrics |
data/ | Seed problems / sample answers |
n8n/ | Importable workflows |
Scoring
Build eval combined score:
combined_score = (0.4 * prompt_score) + (0.6 * output_score)
n8n round score:
round_score = (0.40 * mcq_score) + (0.60 * prompting_combined_score)
overall.score = average of round_score values
Technology Stack
| Layer | Technology |
|---|---|
| API | FastAPI |
| Model | GPT-4o |
| DB | SQLite (default) |
| Orchestration | n8n |