İçeriğe geç

Bu video ve metni İngilizcedir.

Prompt versioning: treat your AI instructions like code, not a note

AI Concepts #213

Prompts belong in versioned files, every answer should record which prompt made it, and tests should rerun when the model changes. Here is why, in plain words.

Ayrıntılı olarak

What prompt versioning is

A prompt is the set of instructions your product sends to an AI model every time it runs. Prompt versioning means looking after those instructions the way programmers look after code. The prompt lives in a file, right next to the code that sends it, under version control: a system that keeps every past version, with who changed what and when. The opposite is a prompt sitting in a database field or an admin screen that anyone can edit, where last month's wording is simply gone once someone saves over it.

What the video shows

The video sums up three habits. Keep prompts in versioned files. Make every answer record which version of the prompt produced it. And rerun your tests whenever the AI model underneath changes.

An everyday example

Imagine a restaurant whose signature sauce recipe is written on a whiteboard in the kitchen. Different cooks adjust it now and then and wipe out the old version. One week, customers start complaining that the sauce tastes off. Which recipe did they get? Nobody can say.

Now imagine the recipe lives in a binder, every change is dated, and every order ticket notes which recipe version was used. The complaint becomes a quick check: those plates came from version 7, the one that changed the salt. That is all prompt versioning is, applied to AI instructions.

The four habits, in plain words

  1. Keep prompts in files under version control. You can see every change, who made it and when, and you can go back to an earlier version.
  2. Stamp every answer with the prompt version. Store a small label next to each output saying which prompt made it. When quality drops, you can find the change that caused it. Without the label, you are guessing.
  3. Run your tests automatically, and again when the model changes. Your set of test cases with known correct answers (the course calls it the bench) should be part of continuous integration: the automatic checks a project runs every time something in it changes. It also has to run whenever the AI model underneath changes, because the provider can break your prompt without touching your code. They release a new model, and wording that worked yesterday starts behaving differently.
  4. Keep the cases that broke. You do not need a hundred clever tests. Keep the ordinary ones that failed in the past, and keep them forever, so that if the same problem comes back, a test catches it.

What counts as the real product

The course sums this up in a line worth remembering: the bench is the deliverable, and the prompt is a by-product of it. In other words, the valuable thing you build is the set of tests that tells you whether the AI is doing its job. The prompt is simply whatever currently passes those tests, and it may need to change with the next model.

Why it matters

A prompt is the one part of an AI product that can be quietly broken without anyone on your team changing a thing: the provider only has to release a new model. Treating it as a loose note makes every problem a mystery. Treating it as versioned, tested code turns a vague "the AI got worse" into a specific answer: which version, which model, which cases.

Learn it step by step in Chapter 15 of our free course AI From Scratch: Prompt Engineering, Measured: What Changes the Output.

Şurada da

Bu bölümden daha fazlası

Metin, ücretsiz kursumuzun 15. bölümünden AI desteğiyle yazıldı.