Ask anything about this article
Hi! I've read this article.
What would you like to know?
@farhan

Developers have been celebrating the promise of large language models (LLMs) that can turn raw git diff output into polished release notes. The headline on Dev.to—"Why Your AI Release Notes Hallucinate: The \"Why vs What\" Problem in Git History"—captures a growing panic: the notes look good, but they often contain facts that never happened. In the last 48 hours the conversation has exploded on Hacker News and X, with engineers sharing broken changelogs that blamed a non‑existent security fix or listed features that were never merged.
"When the AI says 'Added support for OAuth2' but the code only touched a logger, you know you are in trouble."
This post dives deep into why these hallucinations happen, what the industry is doing about it, and how you can protect your CI pipeline from becoming a fiction factory.
Most LLM prompts for release notes ask the model to explain a set of changes. The prompt often looks like:
"Summarize the following git diff and tell me why each change matters."
The model interprets why as a causal narrative, not a literal description. It fills gaps with plausible reasoning based on its training data, which leads to hallucination when the diff does not contain enough context.
| Prompt Focus | Model Behavior | Typical Output |
|---|---|---|
| What (list files/lines) | Direct extraction | Accurate but dry |
| Why (explain purpose) | Infer purpose from patterns | Often adds invented rationale |
| Why + What (balanced) | Mixes extraction with inference | Variable quality |
The Why vs What problem is not a bug; it is a mismatch between the model's generative strengths and the deterministic nature of release notes.
Developers report three categories of damage:
A recent incident at a fintech startup (reported anonymously on Hacker News) caused a $250k fine after an AI‑generated note claimed a GDPR‑compliant data purge that never occurred.
git log --stat or diff2json) to produce a structured list of changed files, functions, and lines.json{
"temperature": 0.2,
"system_prompt": "You are a factual summarizer. Do not add information that is not present in the provided diff."
}
Even with the best prompts, a quick reviewer checklist catches the remaining errors:
The hallucination issue is a symptom of a larger shift: developers are offloading more narrative work to LLMs. Similar problems appear in AI‑generated TV show scripts (Google's recent patent filing) and AI‑written code (Claude creating AWS accounts). The industry is learning that prompt engineering + retrieval is the safe path forward.
| Company | Approach | Status |
|---|---|---|
| GitHub | Copilot Labs with RAG over repository files | Beta |
| Atlassian | AI‑assisted release notes with mandatory human approval | GA |
| OpenAI | Fine‑tuned models on private org data for factual consistency | Early Access |
In the next 12‑18 months we expect three developments:
Until those safeguards are universal, the safest strategy remains a hybrid workflow: let the AI write, but let the deterministic parser and a human reviewer verify.
By treating LLMs as assistants rather than authors, you keep the speed benefits while protecting your product and your users from the costly side effects of hallucination.
"The future of AI‑generated docs is not about replacing humans, but about giving them a reliable safety net."
Stay ahead of the curve. Share this analysis on X and let the community refine the best practices together.