Sub topic 6
Data and feedback loops
This chapter assumes you have read the earlier chapters on AI fit signals and the non-AI baseline. You should be able to read short Python snippets. The question here is whether you have the data to build, evaluate, and improve an AI feature, and whether the feature can keep learning once users start using it.
Why data is a go/no-go factor
A rule needs a person who understands the problem. An AI feature needs data that shows the problem. If the data is missing, wrong, or out of reach, the AI option fails, however good the model is.
Data plays three separate roles, and a feature may be missing one of them while having the others:
- Development data is what you use to build the behavior. For a trained classifier, this is labeled examples. For a large language model (LLM) feature, it may be example inputs and outputs for prompts, or documents the model retrieves at answer time.
- Evaluation data is a set of realistic inputs with known good answers. You use it to measure quality and to compare against the baseline. Every AI option needs it, including hosted models that need no training.
- Feedback data is what you collect after launch: corrections, ratings, and user behavior. It shows whether the feature works in real use and supplies material for improvement.
Teams often assume that using a hosted LLM removes the data requirement. It removes the training data requirement. It does not remove the evaluation requirement, and the scorecard blocks shipping without it.
What "enough data" means
There is no universal number. Ask these questions instead.
| Question | What a good answer looks like | Common failure |
|---|---|---|
| Does the data exist? | Records are stored and you can legally use them for this purpose | The data is in a system you cannot access, or was collected for another purpose |
| Is it representative? | It covers the inputs real users will send, including the messy ones | Data comes only from easy cases, or from one customer segment |
| Is it labeled correctly? | Two reviewers agree on most labels | Labels came from a noisy source such as an old rule or a rushed review |
| Is it fresh? | It reflects current products, language, and policies | The data describes last year's catalog or a retired process |
| Does it cover rare cases? | Each category has enough examples to measure | One class makes up 98% of the data, so a model that always guesses it looks accurate |
Rare cases deserve special attention. A fraud detector trained and tested on data that is 99% legitimate transactions can score 99% accuracy by never flagging anything. Check class balance before you trust any accuracy number.
A quick data readiness audit
Before you commit to AI, run a cheap audit on the data you already have. The script below checks four things: how many examples each label has, how many texts are duplicated, how much two reviewers agree, and whether any class is too small to measure.
from collections import Counter
def audit(examples, min_per_class=3):
labels = Counter(e["label"] for e in examples)
texts = [e["text"] for e in examples]
duplicates = len(texts) - len(set(texts))
too_small = [name for name, n in labels.items() if n < min_per_class]
return {
"total": len(examples),
"per_label": dict(labels),
"duplicates": duplicates,
"classes_too_small": too_small,
}
def agreement(labels_a, labels_b):
same = sum(1 for a, b in zip(labels_a, labels_b) if a == b)
return same / len(labels_a)
examples = [
{"text": "please refund my order", "label": "billing"},
{"text": "my invoice amount is wrong", "label": "billing"},
{"text": "the app crashes on launch", "label": "bug"},
{"text": "the app crashes on launch", "label": "bug"},
{"text": "how do I export my data", "label": "how_to"},
{"text": "charged twice this month", "label": "billing"},
]
reviewer_1 = ["billing", "billing", "bug", "bug", "how_to", "billing"]
reviewer_2 = ["billing", "bug", "bug", "bug", "how_to", "billing"]
print(audit(examples))
print(agreement(reviewer_1, reviewer_2))The output shows one duplicate text, a how_to class with a single example, and agreement of about 0.83. Each result changes the plan:
- A duplicate that lands in both the development set and the evaluation set inflates your score, because the model has already seen the answer.
- A class with one example cannot be measured, so you need to collect more before you can compare options.
- Agreement of 83% between reviewers is a warning. If people disagree on one label in six, the label itself is ambiguous. No model can be reliably better than the humans who define the truth, so tighten the label definitions first.
Data for LLM-based features
LLM features use data differently, and the gaps are easy to miss.
- Prompt examples. A handful of high-quality input and output pairs often matters more than hundreds of mediocre ones.
- Grounding documents. If the feature answers questions about your product, the answers come from your documentation. Out-of-date or contradictory documents produce out-of-date or contradictory answers. The quality of the knowledge base is a data problem, and it belongs on your readiness checklist.
- Evaluation set. Collect real user inputs, including bad ones such as typos, mixed languages, and off-topic requests. Pair each with an answer a domain expert approves. Fifty to a few hundred carefully chosen cases is a realistic starting range for a first decision, and you can grow it later.
Sending data to a hosted model raises privacy and contract questions. A later chapter covers those. For now, record which of your data cannot leave your systems, because that limits your options.
Feedback loops
A feedback loop is the path by which signals from real use come back to improve the feature. The loop is the difference between a feature that decays and one that improves.
Signals come in two kinds:
- Explicit feedback is a deliberate act: a thumbs-down, a correction, a flag. It is clear, but few users give it. Expect single-digit percentages, and expect those users to be unrepresentative.
- Implicit feedback is behavior you infer: the user accepted the suggestion, edited it heavily, retried the request, or abandoned the flow. It is plentiful, but it needs interpretation. A user who accepts a wrong suggestion because they did not notice the error looks like a success.
Design the interface so that the correction is a natural part of the task. A user who fixes a suggested category as part of normal work gives you a label at no extra cost. A separate feedback form gives you almost nothing.
Traps in feedback data
Selection bias. You only see feedback on cases the feature handled and users chose to react to. If the model never suggests a category, you never see users correct toward it.
Self-reinforcing loops. If the model's outputs shape what users see, and you train on what users click, the model learns from its own influence. A recommender that shows only popular items collects clicks on popular items and concludes they are popular. Keep a random or human-reviewed sample that does not pass through the model's choices.
Label contamination. If you add the model's accepted outputs to the evaluation set, you are grading it against its own answers. Keep the evaluation set labeled by people, and separate from anything the model produced.
Cold start. At launch you have no feedback. Plan for the first weeks: start with human review, ship with a fallback, or seed with expert-written examples.
Drift. Products, language, and users change, so the data the feature saw at launch stops matching what it sees later. The monitoring chapter covers this. At this stage, check whether you will be able to detect drift at all, which requires that you log inputs and outcomes.
What the data answers for the scorecard
At this point in the decision, data findings push the outcome in a few clear ways:
- No evaluation data and no way to get it. Do not ship. This matches the scorecard rule that quality must be measurable.
- Plenty of development data but no feedback path. You can build a first version, but expect quality to decay. Budget for periodic manual review.
- Little data but a strong feedback loop. Start with rules or a hosted model with human review, and let the loop produce the data that later justifies a more specialized option.
- Data exists but is restricted. This narrows the build-versus-buy options, because hosted models may be ruled out.
Exercise
Your team wants to add AI that suggests tags for support tickets. You have 20,000 past tickets, tagged by agents over three years. A quick audit shows the tag "legal" appears on 12 tickets, two agents agree on only 70% of tags for a sample of 50 tickets, and the product's categories were reorganized a year ago. Name three data problems and one action for each.
Show answer
First, the "legal" class has only 12 examples, so quality on it cannot be measured. Collect more legal tickets, or handle that tag with a rule or human review. Second, 70% reviewer agreement means the labels are ambiguous. Write clearer tag definitions, then have reviewers relabel a sample and re-check agreement. Third, the reorganization makes tickets older than a year use outdated categories, so they are not fresh. Map old tags to the new categories or exclude old tickets from the development and evaluation sets. All three should be addressed before comparing the AI option to the baseline.