Yeda AI Tips · #165

Español

Make Your AI Say UNVERIFIED

The most expensive thing your AI does is sound confident. A hallucinated method signature — client.stream(on_delta=...) for a callback that never existed — reads exactly like a real one. There's no red squiggle, no warning. You paste it, wire it up, and lose an hour tracing an AttributeError back to a function the model invented.

Why confidence is the bug

OpenAI's 2025 analysis puts a number on it: their audit of major benchmarks found 9 of 10 used binary grading that rewarded a confident guess and penalized "I don't know." A model trained and scored under those incentives learns that guessing pays. So when it doesn't know the exact flag name, it doesn't hedge — it emits the most plausible token sequence, which for API code is a signature that looks perfectly idiomatic and is completely fake.

Plausible is the whole problem. Prose hallucinations you can smell. A framework-specific parameter you can't, until it throws at runtime.

The fix: cite or say so

Give the model an explicit third option besides "answer" and "guess": abstain, and mark it. Two rules in your system prompt do most of the work.

  1. Every framework-specific pattern must cite an official doc. Method names, config keys, CLI flags, decorators — if it can't point to a source, it can't assert the line as fact.
  2. When it can't verify, it writes UNVERIFIED. Not silence, not a hedge buried in prose — a literal token you can grep for before the code reaches prod.

Anthropic's guidance is the same instinct, stated three ways:

TechniqueWhat you tell the model
Allow uncertainty"If you're unsure, say 'I don't have enough information to confidently assess this.'"
Verify with citationsCite a source for each claim; if you can't find one, retract the claim
Restrict knowledgeUse only the provided docs, not general knowledge

That middle row is the reel's rule almost verbatim: an unsupported claim gets removed, not smoothed over.

A prompt you can paste

For any framework-specific API (method names, parameters, config keys,
CLI flags), cite the official doc URL you're relying on. If you cannot
verify a pattern against official docs, do NOT guess — write the line
and tag it: # UNVERIFIED: confirm against docs before prod.
Prefer an honest "I don't know" over a plausible invention.

Now the failure mode is loud. Instead of a fake signature hiding in 40 lines, you get a # UNVERIFIED marker and a doc link to check. The hour you would have spent debugging becomes a ten-second grep.

For power users

The point isn't to make the model smarter. It's to make its ignorance visible. Honesty about what it couldn't verify beats false confidence every single time.

Resources

<div class="cta">

Building an AI feature? Yeda AI designs, audits, and ships production LLM systems that fail loud, not silent.

Talk to us · Read the blog

</div>