How anakinrtran/mp-context works
MP Context is a prompt-engineering exercise for building and improving a customer-service bot. The main workflow is: a student studies the shop facts and rules, edits the bot prompt, runs customer-message evals against a local model, reviews scored results, and iterates; students can also author adversarial evals. The graph reflects the documented workflow and sampled harness calls. The eval definitions, menu, rules, and rubrics are represented from the tree and README; their internal contents were not sampled.
Main entry points: run_evals.py Eval entry point · scoring.py Response checks · client.py Ollama client · runner.py Eval runner
Components 16
Prompt authoring
- Shop facts
docs/menu.md - Bot rules
docs/rules.md - Bot prompt
system_prompt.txt - Graded evals
evals/tests.json - Student evals
evals/student_evals.txt - Response schema
evals/schema.json - Judge rubrics
evals/rubrics
Eval execution
- Eval entry point
run_evals.py - Student eval parser
harness/student_evals.py - Eval runner
harness/runner.py - Ollama client
harness/client.py
Scoring and feedback
- Response checks
harness/scoring.py - LLM judge
harness/client.py - Results report
harness/report.py
Other components
- Student
- Local model
Connections 20
- Student → Shop facts: reads facts
- Student → Bot rules: reads rules
- Student → Bot prompt: edits prompt
- Student → Student evals: authors evals
- Eval entry point → Graded evals: loads evals
- Eval entry point → Response schema: loads schema
- Eval entry point → Bot prompt: loads prompt
- Eval entry point → Student eval parser: loads student evals
- Student eval parser → Student evals: parses blocks
- Eval entry point → Eval runner: runs evals
- Eval runner → Ollama client: requests response
- Ollama client → Local model: sends prompt
- Local model → Ollama client: returns response
- Eval runner → Response checks: checks response
- Response checks → Response schema: validates shape
- Response checks → Judge rubrics: loads rubric
- Response checks → LLM judge: requests judgment
- LLM judge → Ollama client: uses model client
- Eval entry point → Results report: prints results
- Results report → Student: shows scores