Apply to my task
arXiv:2607.22898 ★ 76 Jul 24, 2026

AssumptionMiner: Surfacing the Hidden Decisions an LLM Makes Behind Your Back

Key result

On every task an LLM silently makes 3-4 hidden decisions — which algorithm to use, what to return on an error, how to store a password. Tests are green, yet MD5 may be sitting inside instead of bcrypt — and you'd never know. AssumptionMiner lets you see all those decisions before the code reaches production. The trick: one and the same prompt first writes the code, then makes the model find its own implicit decisions in it and sort them into categories with a severity level.

01

TL;DR

When an LLM writes code from a short request, it quietly makes dozens of small decisions: how to store a password, what to return on an error, which data format to use. You never asked for any of that — the model just picked an option and didn't tell you. AssumptionMiner is a method that makes the model list every one of those hidden decisions before you look at the code.

The core pain: code can pass every test and look like it works, while the decisions inside are wrong. Say you asked for a "login function," and the model silently hashed passwords with MD5 (outdated and vulnerable) instead of bcrypt. Tests are green, security is a disaster. On average every task hides 3-4 of these silent decisions, and without a dedicated check you simply can't see them.

The method fixes this with two steps in a single request: first the model reasons out loud — what it decided on its own, what wasn't in the request, and what the alternative was. Then it turns that reasoning into a structured list with categories (input validation, response format, error handling, data storage, performance, security). You read the list, change what you don't like, and ask it to rewrite only the piece of code that depends on that decision.


Method Blueprint

STEP 1 (inside one prompt): The model gets the original request + the finished code
       → Reasons: "which decisions in this code were NOT required by the request?"
       → Names a realistic alternative for each one

STEP 2 (same prompt, continued): Turns the reasoning into a list
       → Format: category + description + alternative + severity (low/medium/high)

STEP 3 (separate request, optional): You change one decision from the list
       → Ask it to rewrite ONLY the piece of code that depends on that decision
       → The rest of the code stays untouched

Example in Action

Task: You asked Claude/ChatGPT to write a script that parses a CSV of customer reviews and saves them to a database — a classic chore for a freelancer or analyst automating the boring stuff.

Prompt:

You are a senior developer reviewing code for hidden decisions.

Here is the original request:
"Write a function that reads a CSV of customer reviews 
(columns: name, rating, text) and saves them to a database"

Here is the generated code:
[paste the code the model gave you for this request]

Task:
1. REASONING: list every decision in the code that was NOT 
   explicitly stated in the request. For each, name a realistic alternative.
2. FORMAT: lay out the list like this:
   - Category (input validation / data format / 
     error handling / data storage / performance / security)
   - What the model decided
   - Why it chose that
   - What the alternative was
   - How critical it is (low/medium/high)

Result: The model returns a list of 3-5 hidden decisions: for example, that it picked SQLite instead of PostgreSQL, that it never checks the rating is within 1-5, that a duplicate review silently overwrites the old one, that the file encoding is hard-coded as UTF-8. You see exactly what you'd otherwise only catch by reading the code line by line yourself.


Why It Works

An LLM doesn't "think" before writing code — it generates it as the most likely sequence of tokens, and every intermediate decision (which algorithm, what error format) is made implicitly, with no explanation. Asking the model to "write bug-free code" doesn't work, because the model doesn't know what counts as a bug for you and what's expected behavior.

But the model has a real strength: it's great at explaining after the fact when asked. It can look at finished code and coherently say why it chose that option — it's the same skill as explaining someone else's code.

The method exploits this with a simple trick: it splits generation and explanation into two explicit steps within one prompt. First "write the code," then "now look at this code and find what you decided on your own." That turns silent decisions into text you can read and push back on.

Control knobs: - Decision categories — trim the list (for a throwaway script, drop "performance" and "persistence" and keep only "error handling" and "data format") - Severity level — ask it to show only "medium" and "high" so you don't drown in trivia - Targeted regeneration — instead of "rewrite all the code," ask "rewrite only function X, where the decision about Y changes" — saves time and doesn't break what already worked


Prompt Template

You are a senior developer auditing code for hidden decisions.

Original request: 
{your_original_request}

Generated code:
{code}

Task:
1. REASONING: list every decision in the code that was explicitly 
   NOT required by the request. For each, name a realistic alternative.
2. FORMAT: return the list as:
   - Category: {one of: input validation / data format / 
     error handling / data storage / performance / security}
   - What was decided:
   - Why (in the model's view):
   - Alternative:
   - Severity: {low/medium/high}

After the list, wait for my edits. When I point to a decision to change, 
rewrite ONLY the part of the code that depends on that decision 
and leave the rest of the code unchanged.

🚀 Quick start — paste into the chat:

Here is the AssumptionMiner template for checking code for hidden decisions. 
Adapt it to my task: {your task}. 
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask what your code is and what the original request was — because without those two things it can't compare "what was asked" with "what was done," and that comparison is what the whole method rests on.


Limitations

⚠️ Accuracy drops on complex decisions: the method is good at finding what the model decided (e.g., "MD5 was used"), but worse at pinning down which design decision exactly is behind it — it can confuse similar categories or miss the link to a specific line of code.

⚠️ Edits can "drift apart": if you change one decision and several parts of the code depended on it (a cascade effect), the method doesn't always catch every affected spot — some code may stay inconsistent with the edit.

⚠️ Rare categories are a weak spot: security and long-term data storage decisions show up less often in everyday tasks, and the model is worse at finding them — yet those are exactly the ones with the most serious consequences.


Resources

Jie JW Wu, Michigan Technological University. A benchmark of 180 tasks with 676 annotated hidden decisions, code and data: zenodo.org/doi/10.5281/zenodo.21535058

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

Research digest

Key result

On every task an LLM silently makes 3-4 hidden decisions — which algorithm to use, what to return on an error, how to store a password. Tests are green, yet MD5 may be sitting inside instead of bcrypt — and you'd never know. AssumptionMiner lets you see all those decisions before the code reaches production. The trick: one and the same prompt first writes the code, then makes the model find its own implicit decisions in it and sort them into categories with a severity level.

Principle

Works in three steps. Step 1: the model gets the request and the code, and explains what it decided on its own and why. Step 2: it turns that explanation into a list — category, decision, alternative, severity. Step 3 (optional): you change one decision from the list and ask it to rewrite only the piece of code that depends on it. The model doesn't plan ahead — it explains after the fact, once the code is done.

Why it works

An LLM generates code as the most probable chain of words, not as a thought-out plan. Asking it to 'write it without bugs' is useless — the model doesn't know what counts as a bug for you and what's normal behavior. But it has a strength: explaining finished code, the same skill as picking apart someone else's code in a code review. Splitting generation and explanation into two steps in one prompt turns silent decisions into text you can read and challenge.

When to apply

Code generation → for tasks where security or data storage matters, especially when the code passed its tests but you haven't read it line by line. NOT a fit for throwaway scripts with no consequences — there, reading the decision list takes longer than rewriting the code.

Mini recipe

1. Generate the code: ask the LLM to write the function as usual, without the method. 2. Run the audit: paste the original request and the code into the AssumptionMiner template and ask it to find every decision that wasn't in the request. 3. Read the list: category, what was decided, alternative, severity (low/medium/high). 4. Edit surgically: say which decision to change — ask it to rewrite only the dependent piece of code and leave the rest alone.

Examples

[BAD]: `Write a login function with password verification` [GOOD]: `Here is the original request and the generated code [paste]. List every decision you made on your own without asking me — for each one give the category, the alternative and the severity (low/medium/high)`

In plain words

When a model writes code for you, it isn't just picking words — it's stacking up a huge pyramid of implicit assumptions. You ask for "a script to process orders," and the model decides on its own how to handle errors, which date format to use, and what to do if the server goes down. The problem is that these decisions happen "under the hood," and you only find out about them when the code breaks in production. AssumptionMiner changes the mechanics of the process: it makes the LLM drag all those hidden guesses into the light first, pin them down, and only then start writing lines of code.

It's like hiring a contractor to redo your place and just saying: "Make it nice." A regular model will quietly put up floral wallpaper because that seemed right to it. AssumptionMiner makes the contractor write a list first: "I figured paper wallpaper, the cheapest glue, and we're skipping baseboards entirely, cool?". You look at the list, fix it, and only then does the crew pick up the roller. Technically the job gets done either way, but the second time you won't get the surprise of plaster falling off the wall a week later.

The method rests on three stages: extraction, tracing and revision. First the model generates a list of every "if" and "let's assume" it invented for the task. Then it links specific chunks of code to those assumptions. If you change the inputs — say, the database is now in the cloud instead of local — AssumptionMiner doesn't randomly rewrite everything from scratch; it surgically changes only the parts tied to that decision. That keeps one fix from breaking five other functions.

It was tested on code generation, but the principle is universal for any complex work with AI. Whether you're drafting a legal contract or building a marketing strategy, the real trouble is the model's silent agreement with itself. If you don't make the model spell out the foundation its conclusions rest on, you get a black box. The method shows that explicitly pinning down the logic cuts bugs dramatically, because the model stops guessing and starts following an approved plan.

Bottom line: stop hoping the model will "just get" what you meant. Without control over hidden assumptions, any generated code is a ticking time bomb. Use the decision-list-first approach to turn generation magic into a predictable engineering process. Either you run the model's assumptions, or its fantasies run your project.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on AssumptionMiner: Surfacing the Hidden Decisions an LLM Makes Behind Your Back arXiv:2607.22898

Sign in to apply this study New accounts get 50 free credits.