AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Oct 17, 2026, 22:00 JST

Claude Code (2.1.295): never made up data across 100 chances, but dropped keys 7/10 times

Claude Code (2.1.295): never made up data across 100 chances, but dropped keys 7/10 times

3 Key Points

  1. What happened

    Across 100 chances to answer questions absent from a six-line sample document, Claude Code on claude -p version 2.1.295 never invented figures, returning null instead; but a 'never use null or blanks' instruction in 7 of 10 runs deleted the two missing keys from the JSON entirely.

  2. Why it matters

    A receiving program may not notice a quietly missing key, whereas a null at least marks that a value is absent, which could let downstream processing proceed on incomplete data undetected.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The test was motivated by a comment that scrutinizing AI hallucination would be the hardest part of letting AI handle stock data. The author had no stock data, so they built a six-line fictional internal document with two of the four requested items deliberately absent, and ran five prompt variations ten times each; a separate check task made six arms and 60 runs total. The setup was designed so that a fabricated number like 1,205 or 4,820 for the missing full-year sales would count as failure. The author expected fabrication and prepared a table to tally it, but the first trial returned null and the table went unused.

What emerged instead was a different failure mode: the instruction 'fill in all items with numbers; do not use null or blanks' pushed the model to drop the two unanswerable keys entirely. The author notes that a nullable field tells a receiving program a value is absent, while a missing key can halt a program with an error or, worse, flow on as an empty value. The author reports having made exactly this mistake in their own aggregation script. The strict-JSON arm also removed the surrounding prose where the model had been declaring its unit and null reasons, so the null markers survived but the explanations did not.

The unit split on the present figure was the most useful finding: with the same document and key name, answers diverged by a factor of one million because the instruction 'write integers without units' could be read as keeping the million-yen figure or converting to yen. A single added line specifying the unit stopped the split, while an added line about nulls changed nothing. The author also found that a separate verification prompt identifying unverifiable keys matched the expected answer in all 10 runs and was the cheapest task in the set.

FAQ
What did the 'never use null' instruction actually do?
In 7 of 10 runs, the model removed the two missing keys from the JSON entirely rather than fabricating numbers or using null.
What broke on items that were actually present in the document?
The '4,820 million yen' figure was split between 4820 and 4820000000, a 1-million-fold difference, in 9 of 50 runs.
Did asking for null explicitly change the model's behavior?
No. Adding the line 'put null for items not in the document' produced the same 20/20 null responses as no instruction at all.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleDanaher teams with NVIDIA on AI lab, Abcam autonomous facility