Kolkata ·  
AI engineering
evals
deep · 6 min

Data flywheel

Log real use, turn failures into test cases, fix, and repeat.

updated 29 Sept 2026

"Flywheel" is a lovely word for this. You picture a heavy wheel: push it hard a few times and it keeps spinning on its own. The idea is that an AI feature gets better from its own traffic. Real users hit it, we learn from what goes wrong, we fix it, and the fixed feature brings in more and better data.

Does it really spin by itself, though? Let's follow one bad answer all the way round and watch where the pushing happens.

One bad answer

Say we run a support assistant for a software product. It's been live a few weeks. Somewhere in this week's logs, a customer on an annual plan asks for a refund, and the assistant quotes them the monthly refund policy. Wrong policy, confidently stated. The customer leaves a thumbs-down.

(This example is ours, made up for illustration. Every step below is standard practice, though.)

Step one: we kept it

We can only learn from this if we saved it. So the loop starts with logging every session as a trace: the user's messages, what got retrieved, every model call, the final reply, and the scores any grader gave it. How to record them well is its own topic, tracing. The good news is that this is the same setup we need for debugging, so we're building one thing for two jobs.

Then make reading a trace easy. A plain screen that shows one session top to bottom is worth building early.

Step two: someone picked it out

We have thousands of traces and an afternoon. Which do we read?

This one got picked because of the thumbs-down. That's one way to choose, and it's useful, because it comes with a real example. But feedback is sparse, it leans towards the worst problems, and users rarely say why something was wrong. If we only read thumbs-downs, we only see what annoyed people enough to click.

Every way of choosing has a blind spot like that. A random batch can miss rare cases. Picking the extremes (slowest, most tool calls) finds odd traces that may have nothing to do with quality. Letting a grader flag likely failures finds the failures it already knows about.

So mix them. Early on, lean towards exploring with random and clustered samples, because you don't know yet what to look for. As you learn, lean on the targeted signals. And keep some random traces in every batch. Those are your chance to meet a failure none of your signals describe.

Step three: we noticed it was a pattern

One wrong refund answer is an anecdote. So we do error analysis on the batch: a short note on what's wrong in each trace, then group the notes and count. If "quotes the monthly policy to annual customers" turns out to be one of the biggest groups, that's what we fix first.

How often should we sit down and do this? A rhythm some practitioners suggest: a big pass of 100 or more fresh traces after any real change (new feature, prompt update, model switch), with cycles of 2 to 4 weeks common. In between, 10 to 20 traces a week from the outliers, like long conversations or sessions with retries. Weekly while the system is new, maybe monthly once failure patterns settle. Always after an incident.

Between those sessions, online evals keep watch: graders running on sampled live traffic, tracking how often each known failure shows up. A rise sends us back to reading.

Step four: it became a test

This is the step that makes it a loop instead of a string of fixes. Before we touch the prompt, we add a handful of annual-plan refund questions, with the right answers, to the test set we run before every release. Our evals now know about this failure, and it can't quietly come back.

The two sides do different jobs. The test set guards against known problems, cheaply, before every ship. Online grading finds new problems after shipping and tells us how common they are. The flywheel is the road from the second into the first. Do this for months and the test set fills up with cases from real users instead of our guesses.

Step five: we fixed it

Most fixes are ordinary: a prompt change, better retrieval, some code around the model. Run the test set until the new cases pass and the old ones still do, then ship.

Two kinds of fix use the logged data directly. One is to keep a store of traces where a person corrected the bad output (what went wrong, the right answer, why). At request time, pull the corrected traces most like the incoming question and put them in the prompt as examples. The prompt improves as corrections pile up, with nobody editing it by hand.

The other is fine-tuning. Most of that work is gathering good examples that cover what your product does, and a running flywheel produces exactly that: labelled traces, corrected outputs, filters for bad data. One team made the assistant's final answer editable in their review tool, so reviewers could fix small mistakes and save the result as training data.

Careful with the first one, though. If user inputs end up as examples in other users' prompts automatically, someone could write inputs designed to get picked, a kind of prompt injection. Some teams, legal ones for example, also want to sign off on every prompt change, which an automatic loop skips.

The part that doesn't spin: the graders

Now the refund judge is running on live traffic. Can we trust it next month?

Not without checking. Graders drift, because everything around them moves. Our idea of a good answer shifts once we've seen real outputs. People's preferences about LLM outputs change. The traffic changes. The model behind the API can change without notice.

So for each thing we measure, a person labels a fresh sample of production outputs on a schedule, the labels get stored with dates, and we check our LLM judges still agree with them. This is the slowest part of the loop and the easiest to let slip. A common shortcut is to have an LLM draft the labels and people correct them. It saves time, but nobody knows yet how well that holds up over months, especially once people stop looking closely.

It helps to score several narrow things (right policy? answered the question? short enough?) instead of one overall "good". Narrow questions are easier for people to label the same way and for a judge to match. And when outputs fail, the scores point at which part broke.

So does it spin by itself?

Go back over the turn. A person picked the trace, a person read it and named the pattern, a person wrote the test cases and the fix, and a person keeps labelling samples so the graders stay honest. The loop makes that work pay off and build on itself. It doesn't make it go away.

Two things are still open. Running this over a chain of LLM calls or an agent is harder, because an early mistake spreads through every step after it and someone has to grade the steps in between (see agent evals). And we couldn't find any company that has run the loop for months and published how quality changed (as of 2026-09). There are reports of single fixes found this way, which is one turn. That the flywheel compounds over many turns is a reasonable expectation, but nobody has shown the numbers. If you run one, write down what each turn changed. Your log may be the best evidence there is.

Further reading