How cs196illinois/mp-context works
MP Context is a course exercise for writing and improving a customer-service bot’s system prompt using a local-model evaluation harness. The main workflow is to consult the menu and rules, edit system_prompt.txt, run the graded eval suite, inspect scores, and iterate; students can also author extra evals to challenge their bot. The harness loads the prompt and eval inputs, requests model responses, checks them against schema and behavioral criteria, and reports results. The graph includes documented product inputs and capabilities; relationships for unsampled areas are limited to those stated in the README.
Main entry points: run_evals.py Eval Entrypoint · runner.py Eval Runner · scoring.py Scoring Checks · client.py Model Client
Components 15
Bot Prompt Inputs
- Menu Facts
docs/menu.md - Bot Rules
docs/rules.md - System Prompt
system_prompt.txt
Evaluation Workflow
- Graded Eval Suite
evals/tests.json - Student Evals
evals/student_evals.txt - Eval Entrypoint
run_evals.py - Student Eval Parser
harness/student_evals.py - Eval Runner
harness/runner.py - Model Client
harness/client.py
Scoring and Checks
- Response Schema
evals/schema.json - Judge Rubrics
evals/rubrics - Scoring Checks
harness/scoring.py
Results and Iteration
- Results Report
harness/report.py
Other components
- Student
- Local Ollama
Connections 23
- Student → Menu Facts: reads
README.md - Student → Bot Rules: reads
README.md - Student → System Prompt: edits
README.md - Student → Eval Entrypoint: runs
README.md - Student → Student Evals: authors
README.md - Menu Facts → System Prompt: informs
README.md - Bot Rules → System Prompt: informs
README.md - Eval Entrypoint → System Prompt: loads
run_evals.py - Eval Entrypoint → Graded Eval Suite: loads
run_evals.py - Eval Entrypoint → Response Schema: loads
run_evals.py - Eval Entrypoint → Student Eval Parser: uses
run_evals.py - Eval Entrypoint → Eval Runner: dispatches
run_evals.py - Eval Entrypoint → Scoring Checks: configures
run_evals.py - Eval Entrypoint → Model Client: creates
run_evals.py - Eval Entrypoint → Results Report: reports
run_evals.py - Student Eval Parser → Student Evals: parses
README.md - Student Eval Parser → Eval Runner: produces evals
README.md - Eval Runner → Model Client: requests responses
harness/runner.py - Eval Runner → Scoring Checks: runs checks
harness/runner.py - Scoring Checks → Judge Rubrics: loads rubric
harness/scoring.py - Scoring Checks → Model Client: calls judge
harness/client.py - Model Client → Local Ollama: sends chat
harness/client.py - Results Report → Eval Runner: formats results
harness/report.py