0Pricing
MLOps Academy · Lesson

Version Prompts and Evaluate Outputs

Track prompt changes and score responses.

Version Prompts and Evaluate Outputs is a free MLOps Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MLOps Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Prompts Are Code

A reworded prompt can change behavior overnight. So you treat each prompt as a versioned artifact, with history, review, and the ability to roll back. 📝

Store Prompts, Not Strings

Hard-coded strings scattered in code are impossible to track. Keep prompts in a registry or files so every change is visible and diffable.

prompts/summarize_ticket.v2.txt
prompts/summarize_ticket.v3.txt

Tag Each Version

Give every prompt a clear version id you can pin in code. Then you always know exactly which wording produced a given output.

PROMPT_VERSION = "summarize-v3"
template = load_prompt(PROMPT_VERSION)

Build an Eval Dataset

Collect real inputs with the answers you want. This eval set is your yardstick for judging whether a prompt change actually helped.

cases = [
  {"input": "ticket text...", "expected": "Refund requested"},
]

Score Against References

For tasks with a known answer, compare output to the expected text. A simple metric like exact match or F1 gives you a fast pass-fail signal.

Use an LLM as Judge

For open-ended text, ask another model to grade the answer against a rubric. This LLM-as-judge pattern scales scoring beyond hand-written rules.

judge_prompt = "Rate 1-5 how well the summary captures the ticket:\n{output}"

Watch the Judge Itself

Judges can be biased or inconsistent. You keep them honest by spot-checking scores against a few human ratings on the same cases.

Run Evals on Every Change

Before shipping a new prompt, run it across the whole eval set. You only promote it if the score holds or improves, never on a hunch.

old = run_eval("summarize-v2")
new = run_eval("summarize-v3")
assert new.score >= old.score

Track Regressions

A prompt that fixes one case can break another. Comparing per-case results catches these regressions before users ever see them.

Frameworks Help

Tools like promptfoo or OpenAI Evals run datasets, call models, and report scores for you. A framework turns ad-hoc testing into a repeatable suite.

Pin the Winner

Once a version wins on your evals, pin it in production and archive the rest. You now have a clear, auditable trail from prompt to result.

Quick Check

You need to score open-ended summaries with no single correct answer. What fits best?

Recap

You learned to version prompts, build an eval set, score with metrics or an LLM judge, and gate releases on results. No more guessing! 🎉

Frequently asked questions

Is the “Version Prompts and Evaluate Outputs” lesson free?

Yes — the full text of “Version Prompts and Evaluate Outputs” is free to read here on the web, and the MLOps Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MLOps Academy course, upgrade to CoddyKit PRO.

What will I learn in “Version Prompts and Evaluate Outputs”?

Track prompt changes and score responses. You practise MLOps Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start MLOps Academy?

No prior experience is required. MLOps Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Version Prompts and Evaluate Outputs” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this MLOps Academy lesson?

Yes. Every MLOps Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. How LLMOps Differs from Classic MLOps
  2. Version Prompts and Evaluate Outputs
  3. Trace and Monitor LLM Calls
  4. Guardrails and RAG Evaluation
← Back to MLOps Academy