Nguyen Le Phong

What AI Can't Know From the Prompt Alone

A clear prompt still leaves out the code, the logs, the domain rules and the history behind them.

The prompt looks clear: "Make the CSV import safer. It's in import_service.py. Users see duplicate rows after a timeout. Add tests." A model can write a reasonable patch from that. Most of what decides whether the patch is safe isn't in the sentence, though. It lives in the retry job someone added two years ago, the support runbook, the tenant boundary, the odd CSV one customer still sends, and the alert that only fires after midnight.

An engineer studies code on a laptop, with blank index cards and a hand-drawn system sketch on the desk beside it.
The prompt is on the screen. Most of what decides the answer is on the rest of the desk.

A model works well inside the frame you give it. It's much worse at noticing that the frame is missing a side. So before you hit enter, ask one question: what does this answer depend on that the prompt doesn't contain? In engineering work, the answer usually falls into four buckets.

The code around the change

Imports, call sites, tests, feature flags, schemas, error paths. Together they tell a longer story than any prompt can. Sometimes the fix you asked for already exists in a helper. Sometimes the right change belongs one layer down, in the use case, and the handler you named is fine. Sometimes the duplicate rows come from the shape of the data and the function in the prompt is innocent. Without the surrounding code, the model is guessing the shape of a building from its shadow.

What actually happened at runtime

Logs, traces, failed jobs, database rows, screenshots, the exact error text. A generated explanation of a bug can be fluent and still describe something that never happened. Paste the stack trace and the few log lines around it, and the model finally has something to be right or wrong about.

The rules nobody wrote down

Models are good at common patterns. They can't know which invariants your team treats as sacred: that ledger entries are append-only, that tenant scoping happens in the repository query and nowhere else, that an old mobile client still reads a deprecated field, or that a kill switch exists because an incident once hurt real users.

METR's early-2025 study of experienced open-source developers, each working in a large repository they'd contributed to for years, touched on this. The authors suggested AI tools may do comparatively worse in settings with "very high quality standards, or with many implicit requirements," such as rules about documentation, test coverage and formatting (METR, July 2025). The study's headline result, that developers took 19% longer with AI tools, is dated now: in February 2026 METR said it believes developers are likely more sped up by AI tools in early 2026 than that study showed, and that it's redesigning the experiment (METR, February 2026). The observation about implicit requirements is the part worth keeping. Those requirements live in people's heads and old PR threads, and a prompt rarely carries them.

Judgment stays with whoever owns the system

Someone has to decide whether the answer fits the system you actually run. That decision isn't a rubber stamp at the end. It starts with how the question is framed, continues with which sources go in, rejects shortcuts that look fine and aren't, and ends with checking the result. You don't have to type every line. You do have to stay close enough to own what ships.

Pasting everything has limits too

The tempting fix is to paste in everything. That hits its own wall. In the "Lost in the Middle" study, models did best when the relevant information sat at the start or end of a long input, and performance dropped significantly when it sat in the middle, even for models built for long contexts (Liu et al., 2023). Anthropic's engineering team describes the goal as finding "the smallest set of high-signal tokens that maximize the likelihood of your desired outcome," and warns about context rot: recall gets worse as the context window fills up (Anthropic, September 2025).

So the real skill is picking evidence. For the import bug, that might be the failing test, the two files the bug touches, the retry job's config, the log lines from one bad run, and one sentence about the tenant rule. Agents with tools can fetch some of this themselves. Anthropic calls that "just in time" context: the agent keeps references like file paths and loads the data when it needs it. You still decide which sources it's allowed to trust. For more on this, see Context Engineering and The Context Window Bottleneck.

Make the answer point at its evidence

One habit helps a lot: ask the model to tie each claim to something you can check.

  • Which file or function supports this?
  • Which test would fail without this change?
  • Which log line shows the symptom?
  • Which domain rule protects this edge case, and where is it written?

If it can't point back to evidence, treat the answer as a hypothesis worth testing and keep it out of the implementation plan for now. Two related posts go further: Asking AI to Name Its Assumptions is about making the guesses visible, and Asking AI to Show Its Working Context is about checking what it actually read.

Try this week

  • Before your next AI-assisted change, write one line on what the answer depends on that the prompt doesn't contain.
  • Attach the failing test and the real log lines instead of describing them.
  • Write down one unwritten rule of your codebase in the repo, where people and agents can both find it.
  • On the next answer you get, ask for a file, test or log reference behind each claim.
What did you think?