In the rush to deploy LLM-powered assistants, developers often overlook a subtle but critical failure mode: prompt pollution. A recent engineering deep-dive from a B2B telecom platform reveals how a single architectural oversight in the system prompt caused their customer-facing AI to silently hallucinate contract details. The team, running a Laravel and React stack with Claude and OpenAI behind a unified provider interface, initially achieved a 69% pass rate on hand-graded evaluations. The culprit? Concrete numbers in their few-shot examples that the model treated as ground truth rather than illustrative syntax.
The Architecture of Trust
The core design principle of the platformβs Assistant Data Layer (ADL) is strict separation of concerns: the LLM never holds customer data. It acts solely as a router and phraser. When the model needs information, it emits a tool call with arguments only. The backend derives the customer scope from the auth token, fetches whitelisted fields, and caches the rowset under an owner-bound handle. The model receives a summary, a dataset reference, and a preview of at most five rows. This architecture minimizes token costs and limits the provider's exposure to raw data, enforced further by a ReplyGuard that checks final figures against actual tool returns.
When Examples Become Data
The initial 87-question evaluation revealed sixteen outright failures. Tracing these back to their source exposed nine root causes, but one stood out as particularly insidious. The system prompt contained worked examples with realistic figuresβamounts, dates, and IDsβbecause they made the desired output format clearer. The model, however, interpreted these figures as data. For certain queries, it answered directly from the example's numbers without ever triggering a tool call. The response was fluent, well-formatted, and completely wrong. Since no private data leaked, standard security guards didn't fire, and the error looked indistinguishable from a correct answer without database verification.
Enforcing Prompt Hygiene
The fix was both simple and structural. The team replaced all concrete figures in few-shot examples with placeholder tokens like [Amount], [Date], and [ID]. Crucially, they automated the enforcement. A new PromptTest now extracts every integer and dollar figure from prompt strings during the build process, failing the build if any value resembles a valid contract amount. This prevents the prompt from drifting back to containing sample figures. The other eight fixes involved tightening tool routing, standardizing empty-state phrasing, and moving currency formatting to the view layer, but the prompt test was the linchpin of reliability.
Key Takeaways
- Few-shot examples with realistic figures can be mistaken for data by LLMs, leading to silent hallucinations.
- Hand-grading the first 100 evaluation cases is essential to catch architectural flaws that automated LLM-as-a-judge might miss.
- Automated tests on prompt content (e.g.,
PromptTest) are necessary to prevent regression when prompt templates evolve. - Customer scope should always be derived server-side from the auth token, never passed through tool arguments.
The Bottom Line
Stop putting realistic numbers in your system prompts. If your model can quote an example back as fact, it will. Use placeholders and enforce them with build-time tests, or youβre just building a very expensive, confident liar.