Skip to main content

Build an automated eval runner comparing two prompts

Write a Python eval script loading 30 JSONL test cases, running prompt A vs B concurrently, and reporting deterministic + judge scores.

Official Reference

Model Answer & Explanation

Load (input, expected_facts, expected_tool) pairs from JSONL, run variants concurrently under an asyncio.Semaphore, compute deterministic checks first (JSON schema valid, latency, token cost, exact tool match), then run a binary/1–5 rubric judge with reasoning-before-score and swapped A/B order to remove position bias.

Follow-up Interview Question · How do you gate CI merges without making eval runs prohibitively slow or flaky?

Module Context & References

Applied AI · Practice engineering drills Hands-on RAG, structured extraction, eval harness and agent reliability drills
Personal Notes · Markdown

Technologies & Interview Topics Covered

Switch between short-term interview tracks and long-term 80/20 engineering depth to practice JavaScript internals, React rendering and hooks, timed frontend machine coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns, Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching, Applied AI RAG pipelines & evaluations, and distributed system design.