Few-Shot Hoarding is an AI code smell, a sign of trouble in LLM systems, in the Bloaters group. The prompt carries 30 fixed examples and nobody remembers why each one is there.
A ticket classifier started with 4 examples. Every “it classified this wrong” complaint became a new example in the prompt. Today it has 31 (anonymized excerpt):
Example 1: "can't log in" -> accessExample 2: "forgot my password" -> accessExample 3: "password doesn't work" -> access...Example 17: "overdue boleto, can I still pay?" -> billing # added Mar/25, customer XExample 18: "boleto overdue and access got blocked" -> access # added May/25, ?...Example 31: "app closes on its own on Android 9" -> bug
Examples 17 and 18 are nearly identical and teach different answers. Nobody remembers why 18 was added. Nine examples are variations of “I can’t get in”. The billing queue, the hardest one, has two. (A boleto is a Brazilian bank slip, a common support topic.)
Signs of Few-Shot Hoarding:
The prompt carries dozens of fixed examples.
Every fixed bug became an example, and none were ever removed.
There are near-identical examples, sometimes with different answers.
The distribution of examples does not follow difficulty: easy cases have many, hard cases have few.
Nobody can explain why each example is there.
Removing an example is scary, because there is no eval.
flowchart LR
B(["1. Reported error"]):::io --> E["2. One more example in the prompt"]:::tool
E --> P[("3. 31 fixed examples")]:::store
P --> M(["4. Model follows the closest ones, not always the right ones"]):::llm
M --> B
A ticket is misclassified.
The quick fix is pasting that case in as an example.
The set grows without curation, with redundancies and contradictions.
The model mimics the closest examples, and contradictory examples produce new errors.
Reasons
An example is the easiest fix. Pasting the failed case fixes that case on the spot.
It works in the short term. The fixed case passes, and the effect on the others goes unmeasured.
The examples live in code. There is no place to review, version, and remove them.
No owner. Whoever added example 18 has left the team.
The trap: treating the prompt as an incident notebook. Every complaint gets a line, and the notebook never loses a page. Without an eval, nobody notices that nine login examples do not help the boleto queue.
A concrete case: the ticket “boleto expired, app blocked” should go to billing if that is the new product rule. With example 18 still in the prompt, the nearest output remains “access”. You do not have a model bug. You have an old example beating the new rule because it sits closer to the input text.
Cost of ignoring
Cost and latency. Dozens of examples on every call weigh on input.
Quality. Contradictory examples confuse; the model may copy the wrong one.
Bias. The example distribution pulls answers toward the categories with more examples.
Maintenance. Changing a business rule means finding and fixing every example that contradicts it.
A back-of-the-envelope bias
The numbers below are illustrative. Suppose 80 tokens per example. Thirty-one examples are about 2,500 tokens on every classification.
Category
Examples in the prompt
Real difficulty (the team’s view)
access
9
low
bug
6
medium
billing / boleto
2
high
other
14
mixed
The classifier sees “can’t log in” all day. “Boleto overdue and access blocked” drifts toward access because that queue has more neighbors. You pay 2,500 tokens to over-teach the easy case and under-teach the hard one.
If the business rule changes (overdue boleto with a blocked app becomes billing, not access), the 31 examples become 31 lines to hunt through in the diff.
Whenever the examples go beyond a handful. They leave the prompt for a versioned, curated set and are picked by similarity for each request. Targets: Few-Shot Selector and Golden Dataset.
Practical order:
Build an eval from the incidents that produced the examples. Without it, you cannot tell what is safe to delete.
Deduplicate. Two near-identical examples with different labels are a data bug, not a feature.
Balance by difficulty, not by complaint volume. The noisy queue does not need nine copies.
Leave in the prompt only the format (one or two examples), or select 3 to 5 neighbors per request.
A new error does not go back into the prompt the same day. It goes into the eval. If the eval drops, then you discuss whether you need an example, a rule, or a new category.
Payoff
A fixed-size prompt with the 3 to 5 most relevant examples for each input.
Examples with an owner, a reason, and a date, reviewable in a pull request.
Contradictions found and resolved during curation.
New errors become eval cases, not examples pasted in a hurry.
When to ignore
A few stable examples. Five well-chosen examples that cover the cases and have not changed in months make a good prompt.
A task with a rigid format. When the example teaches format and all examples are equivalent, one or two are enough.
Is it this smell?
Quick answers
What is Few-Shot Hoarding?
Few-Shot Hoarding is an AI code smell, a sign of trouble in LLM systems, in the Bloaters group. The prompt carries 30 fixed examples and nobody remembers why each one is there.
How do you fix Few-Shot Hoarding?
With Move Few-Shots to a Dataset. Each refactoring has safe step-by-step mechanics with an eval before and after.