Sub topic 3
Where language models go wrong
This chapter assumes you know what a large language model (LLM) is and have prompted one. It also assumes you can read short Python functions. The goal is to name the failure modes you will meet when an agent writes marketing research, so that later chapters can address each one.
Hallucination
A language model generates the most likely next words. It does not look facts up. When it lacks the facts, it still produces fluent text. A made-up statistic reads exactly like a real one.
In marketing work this shows up as:
- An invented benchmark, such as "the average email open rate in retail is 21.5%", with no source.
- A competitor campaign described in detail that never ran.
- A citation with a plausible title and URL that does not exist.
Fluent wording and confident tone are not evidence of accuracy.
Stale knowledge
A model learns from data collected up to a training cutoff date. It knows nothing after that date unless you supply it. Ad platforms change policies, metrics and interfaces often. An agent that answers from memory may describe last year's targeting options or quote an old market size as current.
The model also does not know your numbers. Your campaign results, budgets and customer data were never in its training set.
Arithmetic and aggregation errors
Models predict text, so they do not calculate reliably. Small sums often come out right. Errors increase with long columns of figures, percentages of percentages, and unit changes. A typical slip is averaging per-campaign click-through rates instead of dividing total clicks by total impressions.
def matches(claim, computed, tolerance=0.0005):
"""Return True if a stated figure is close to the computed one."""
return abs(claim - computed) <= tolerance
computed_ctr = round(250 / 15000, 4)
print(computed_ctr)
print(matches(0.025, computed_ctr))
print(matches(0.0167, computed_ctr))This prints 0.0167, then False, then True. The code is the source of truth, and the model's figure is only a claim to compare against it.
Other failure modes
- Overconfidence. The model rarely says "I don't know". It fills gaps instead.
- Causal overreach. It may report that sales rose "because of" a campaign when the data only shows both happened in the same week.
- Inconsistency. The same prompt can return different numbers or wording on different runs.
- Prompt sensitivity. Small changes in the question can change the conclusion.
Which fix answers which failure
| Failure | Marketing example | Countermeasure | Covered in |
|---|---|---|---|
| Hallucination | Invented benchmark | Grounding in retrieved sources | Grounding findings |
| Stale knowledge | Outdated platform feature | Tools that fetch current data | Giving the agent tools |
| Arithmetic error | Wrong CPA | Metrics computed in code | Calculating metrics with code |
| Overreach | Unsupported "because" | Verification and human review | Checking numbers and claims |
A working rule
Let the model do language work: summarizing, drafting, classifying and explaining. Let tools and code supply facts and numbers. Let a person approve decisions. The rest of this tutorial builds that split.
Exercise
An agent's draft says "Our CPA fell to 12.40, well below the industry average of 18.20." The CPA came from your metrics tool. Which part of this sentence is at risk of hallucination, and which failure mode is it? How would you fix it?
Show answer
The industry average of 18.20 is at risk. Nothing in your data supports it, so the model may have invented it or recalled an outdated figure (hallucination, possibly stale knowledge). Fix it by retrieving a benchmark from a named, current source and citing it. If no source is available, remove the comparison. The 12.40 figure is safe only because the tool computed it.