Apply to my task
arXiv:2610.22158 ★ 91 Oct 15, 2026

Implicit Prompt (PremiseSQL): a gentle “the question may contain errors” warning gets the model to decline a broken query

Key result

Finding: by default, models almost never say “this question is invalid.” Ask about a column that isn't in the table, and the model will swap in a similar one. It will produce working SQL that calculates the wrong thing. The method lets you catch broken questions before the number lands in a report: the model says “can't do that” instead of giving a pretty but wrong result. The trick: a gentle warning that the question “may contain errors” turns on question checking. The model is less likely to silently fill in what's missing and writes a verdict in the `is_valid` field. The share of caught errors roughly doubles.

01

TL;DR

Implicit prompt is a plain instruction attached to the request that tells the model: “The question may contain errors. You must assess its validity before answering.” (the paper's own wording) The response gets an extra field with a verdict (is_valid) and an explanation. Without that instruction, the model quietly patches the question on its own and hands back a confident answer.

The headline finding: by default, models trust the question and almost never say “this is invalid.” Ask about a column that doesn't exist in the table, and the model will swap in a similar one and spit out working SQL that calculates the wrong thing. A gentle warning roughly doubles the share of caught errors. A hard-line phrasing (the paper's Explicit prompt: “The question is logically flawed and contains incorrect premises”) breaks something else: the model starts refusing perfectly good questions too, because it obeys the prompt, not the data. Bigger and newer models fix this only partly, and not in every setting.

The method in one step: warn the model that errors are possible, give it the schema and the question, and require JSON with sql, is_valid, reason. Gentle phrasing (“may contain errors”) is the better trade-off; assertive phrasing (“is logically flawed”) backfires on valid questions.

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.

02

Method Blueprint

ONE PROMPT:
  1. Warning: "the question MAY contain errors, assess validity before answering"
  2. Context: table schema + question
  3. Output format: JSON {sql, is_valid, reason}
     - question is valid → sql filled in, is_valid = true
     - question is invalid → sql = null, is_valid = false, reason = what's wrong

DON'T: "The question is logically flawed and contains incorrect premises" (Explicit) → false refusals

The four types of question errors the researchers tested: - E1 Expression: ambiguity, unclear intent. - E2 Contradiction: conditions rule each other out or clash with the schema. - E3 Omission: a missing filter, table or column; a concept that doesn't map onto the schema. - E4 Out of scope: SQL can't express it, or it needs outside knowledge.

03

Example in Practice

Task (our illustration, not from the paper): You head analytics at an online electronics store in Denver. A product manager pings the company Slack bot: “Show me the average margin on orders for March.” The database has orders(id, customer_id, city, total, created_at) and order_items(order_id, product_id, qty, price). There's no cost column, so margin can't be calculated. A regular prompt will produce SQL where “margin” quietly turns into total or price. The number will look great and be wrong.

Prompt (our adaptation of the paper's Implicit prompt; the role line, the error list and “do not fill in” are ours):

You help analysts write SQL (PostgreSQL).
The input question MAY contain errors: ambiguity, contradictions,
data missing from the schema, or requirements SQL cannot fulfill.
First assess whether the question is valid and can be answered with this schema.
Do not fill in anything that's missing.

Schema:
orders(id, customer_id, city, total, created_at)
order_items(order_id, product_id, qty, price)

Question: Show me the average margin on orders for March.

Return JSON:
{
  "sql": "<query, or null if it can't be answered>",
  "is_valid": true/false,
  "reason": "<why the question is valid, or what exactly is wrong>"
}

Result: The model will most likely, though not guaranteed, return sql: null, is_valid: false and an explanation that the schema has no cost data. Without the warning, the same model would usually produce SQL that passes revenue off as margin. If the question is valid (“average order value for March”), you should get normal SQL with is_valid: true. But some models start playing it too safe even with this gentle warning, so test it on your own valid queries.

04

Why It Works

The weakness. The model is trained to be helpful and to answer. To it, the question is the problem statement, not something to audit. So it silently fills in the gaps: it maps “person” to “actor” and “margin” to “revenue.” The SQL is syntactically correct, and the error is invisible.

The strength. Ask the model to evaluate the question explicitly, and it can. It does know the column is missing; that knowledge just doesn't kick in on its own. On top of that, its own verdict drives its behavior: when it marks a question valid, it writes SQL 99.9% of the time; when it marks a normal question invalid, it skips SQL about two-thirds of the time (67%).

How the method exploits this. The “there may be an error” warning switches the check on, and the is_valid field with reason forces the model to write down its conclusion before or alongside the answer. The gentle wording matters (our reading of the results). It leaves the model room to say “everything's fine.” Stating “there is an error” takes that room away. The model accepts it as fact and goes hunting for an error where there isn't one.

Control knobs: - Phrasing strength. “May contain errors” strikes the balance. “Contains errors” boosts the catch rate but breaks normal queries. No warning at all means catching only about a third of the errors. - The reason field. Keep it: it shows whether the model spotted a real problem or was just nitpicking. - What to return on refusal. Instead of null, you can ask for “a clarifying question to the user.” That's our suggestion; the paper didn't test it. - List of error types. The paper's prompt lists no error types. A specific list may give the model more hints but may also raise overcaution (our guess, untested). Test on your own valid questions.

05

Prompt Template

You are {role_and_task}.
The input request MAY contain errors. First assess whether it is valid
and whether it can be answered given the context below.
Do not fill in anything that's missing.

Context:
{context_or_schema}

Request: {request}

Return JSON:
{
  "sql": "<result, or null if it can't be answered>",
  "is_valid": true/false,
  "reason": "<why the request is valid, or what exactly is wrong>"
}

What to fill in: {role_and_task}: for example, “an analyst who writes SQL.” {context_or_schema}: a description of the tables or rules. {request}: the user's question. You can rename the sql key to answer if your task isn't about SQL, but the idea has only been tested on SQL.

🚀 Quick start: paste this into the chat:

Here's a prompt template that makes the model check whether a question is valid
before answering. Adapt it to my task: [your task].
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask what data or context you have and what counts as “can't be answered.” That way the warning is anchored to your context, and the model knows what to check the request against.

06

Limitations

⚠️ The price of a gentle warning: even neutral phrasing makes some models refuse perfectly normal questions. For one model (DeepSeek V3.2), more than half of the valid queries got no SQL (it answered only 45.5%). Test on your correct questions, not just the broken ones.

⚠️ Hard-line phrasing hurts: “the question contains an error” pushes the catch rate close to the maximum, but the model starts rejecting valid queries too. One model refused practically every normal question. The high catch numbers are misleading here: that's obedience, not verification.

⚠️ Scale won't save you: newer and larger models are only partly better, and the best model without a warning catches fewer than half the errors. In one comparison, a smaller model caught more than a bigger one. Test on your own model.

⚠️ A wrong verdict drags the answer down with it: the model usually acts on its own is_valid: a “valid” verdict almost always means SQL, and an “invalid” verdict on a normal question means no SQL about two-thirds of the time. If the verdict is wrong, the action tends to be wrong too. The reason field doesn't guarantee the verdict is right.

⚠️ One domain: everything was tested on Text-to-SQL, with errors artificially injected by another LLM. Carrying it over to other tasks makes sense, but the authors didn't test that. Identifying the type of error is also harder for models than simply noticing that one exists.

⚠️ Our template is not the paper's prompt: the paper's Implicit prompt is short: schema, question, “The question may contain errors. You must assess its validity before answering. Generate SQL to answer the question.”, then JSON with sql, is_valid, reason. The role line, “Do not fill in anything that's missing” and the list of error kinds in our template are our additions and weren't tested.

07

How They Tested It

The researchers took two popular SQL question sets, Spider and BIRD, and corrupted 1,800 questions using a taxonomy of four error types. One LLM did the corrupting, another LLM checked the results, and then humans reviewed them. Each corrupted question was paired with its original as a control. That's the key design idea: otherwise you can't tell genuine checking apart from a habit of refusing.

Then 16 current models were run through three modes: plain (Base), with a gentle warning (Implicit), and with the statement “there is an error” (Explicit). That came to about 173,000 responses in total. The responses were graded by two LLM judges that agreed with each other and with humans.

The results. In Base, models caught about a third of the errors and almost always produced SQL. In Implicit, the catch rate roughly doubled, while the share of normal questions that got an answer dropped only from 99% to 90%. In Explicit, the catch rate came close to the maximum, but the share of normal questions answered fell to about half. For every model, switching to Explicit raised the catch rate and cut answers to valid questions.

The surprises: there's no clean “newer and bigger is better” trend. And the is_valid verdict largely decided whether SQL would be written, even when the verdict was wrong: “valid” led to SQL 99.9% of the time, and “invalid” on a normal question led to no SQL in 67% of cases. Our practical takeaway: how you phrase the warning and whether you test on “good” queries matter more than which model you pick.

08

Adaptations and Extrapolations

These are my ideas; the authors didn't test them.

🔧 Technique: add the error types → hint at what to look for

Check the request for: (1) ambiguity, (2) conditions that contradict each other or the schema, (3) missing data or filters, (4) anything that can't be computed from this data.

The paper has separate metrics for the error types, but it didn't test listing them inside the prompt. This might make reason more precise, or it might amplify overcaution. Be sure to test on valid queries.

Extrapolation: a rule in the agent's instructions file. For an agent that answers questions about data (CLAUDE.md, a custom GPT's system prompt):

Before writing a query or a report, check: are all the fields, periods and
metrics from the question present in the available data? If something is missing or the question
allows more than one interpretation, don't substitute concepts. State exactly what
is missing or unclear, and ask one clarifying question. If the question
is valid, answer right away, without unnecessary second-guessing.

The last sentence is there so you don't get the Explicit-mode effect, where the model refuses normal requests.

09

Resources

  • PremiseSQL: Evaluating Premise Critique and Abstention in Text-to-SQL Systems by Shuo Lin, Jinzhe Li, Chenlu Guo, Yanhan Li, Yuan Wu, Yi Chang.
  • Affiliations: Jilin University (School of AI; Engineering Research Center of Knowledge-Driven Human-Machine Intelligence; International Center of Future Science), Bilibili Inc., China Telecom AI Technology (Beijing).
  • Code and benchmark: https://github.com/vegeet/PremiseSQL
  • Source datasets: Spider 1.0, BIRD. Related work: TriageSQL, TrustSQL, NL2SQL-BUGs, AbstentionBench.

Research digest

Key result

Finding: by default, models almost never say “this question is invalid.” Ask about a column that isn't in the table, and the model will swap in a similar one. It will produce working SQL that calculates the wrong thing. The method lets you catch broken questions before the number lands in a report: the model says “can't do that” instead of giving a pretty but wrong result. The trick: a gentle warning that the question “may contain errors” turns on question checking. The model is less likely to silently fill in what's missing and writes a verdict in the `is_valid` field. The share of caught errors roughly doubles.

Principle

It all comes down to phrasing strength. Three variants give three different behaviors. No warning. The model trusts the question. Even the best model catches fewer than half the errors. “The question MAY contain errors.” The model checks and can still say “everything's fine.” This is the sweet spot. “The question is logically flawed and contains incorrect premises.” It catches almost everything, but also refuses normal questions. “May” leaves the model the right to say “there's no error,” while “is flawed” takes that right away (our reading). It's like a car alarm: a well-tuned one goes off for a reason, a cranked-up one wails at every passing cat. The response gets an is_valid field with a short reason. That way the check isn't hidden inside the model; you can see it.

Why it works

The model is trained to be helpful and to answer. To it, the question is the problem statement, not something to audit. So it maps “margin” to “revenue” and “person” to “actor.” The SQL comes out syntactically correct, and the error is invisible. The model does know the column is missing. That knowledge just doesn't kick in on its own. Explicitly asking it to evaluate the question turns the question from a problem statement into something to verify. On top of that, the verdict drives the action. When `is_valid = true`, it writes SQL 99.9% of the time. When it wrongly marks a normal question invalid, it skips SQL about two-thirds of the time. The catch is on the flip side. The hard-line phrase “there is an error” pushes the catch rate close to the maximum. But one of the models starts rejecting almost every normal question. That's obedience to the prompt, not checking the data. Model size and recency don't help here: in one comparison, a smaller model caught more than a bigger one.

When to apply

Analytics and database work → chatbots where business users ask the data questions themselves, especially when the schema lacks the needed columns or the question is vague. It also fits anywhere a wrong number costs more than “I can't answer that.” NOT a fit if nearly all your questions are valid and a refusal is expensive. Even the gentle warning makes some models overcautious. For one model (DeepSeek V3.2), more than half of the normal queries got no SQL. The idea has only been tested on SQL. Carrying it over to other tasks makes sense, but the authors didn't test that.

Mini recipe

1. Warn gently: write “The question may contain errors. You must assess its validity before answering.” (the paper's wording). Don't declare that the question is flawed. 2. Forbid guessing: add “do not fill in anything that's missing.” This is our addition, not in the paper's prompt; it is meant to discourage column swapping (untested). 3. Give context: the table schema and the question itself. Without a schema, the model has nothing to check against. 4. Require JSON: fields `sql`, `is_valid`, `reason`. On refusal, `sql = null`. 5. Read the reason: it shows whether the model found a real gap or was just nitpicking. 6. Test on normal questions: run 20-30 valid queries. If the model refuses too often, drop the extra lines you added to the warning. 7. Optional: instead of `null`, ask for “a clarifying question to the user.” Then the bot doesn't go silent; it asks a follow-up (our idea; not tested in the paper).

Examples

[BAD]: `Show me the average margin on orders for March` (schema: orders and order_items, no cost column). The model will quietly swap in `total` or `price` and produce a pretty but wrong number. [GOOD]: `You help analysts write SQL (PostgreSQL). The input question MAY contain errors: ambiguity, contradictions, data missing from the schema, or requirements SQL cannot fulfill. First assess whether the question is valid. Do not fill in anything that's missing.` `Schema: orders(id, customer_id, city, total, created_at), order_items(order_id, product_id, qty, price)` `Question: Show me the average margin on orders for March.` `Return JSON: {"sql": "", "is_valid": true/false, "reason": ""}` Expected result: `sql: null`, `is_valid: false`, reason “the schema has no cost data.” There's no guarantee; it's the likely outcome. The question “average order value for March” should get normal SQL and `is_valid: true`. [BAD]: `The question contains an error, find it and don't answer`. The model will dutifully start refusing healthy questions too.

In plain words

Most LLMs suffer from straight-A student syndrome: they're drilled to be helpful at any cost. Ask the database to calculate a metric that doesn't exist, and the model won't say “dude, we don't have those columns.” It will quietly swap the concepts, bend reality to fit, and generate a syntactically perfect SQL query with a fake result. Most of the time the model treats your question as gospel, even when you're talking total nonsense.

It's like walking into a cheap burger joint and demanding lobster: instead of an honest “we don't have that,” the waiter silently brings you imitation crab at lobster prices. Technically the order is filled, but you just got ripped off. The model does exactly the same: if the schema has no cost data, it will cheerfully serve up revenue dressed as margin, and the business will make decisions based on numbers pulled out of thin air.

The cure is simple: an implicit prompt with mandatory premise critique. You hard-code into the system instruction: “don't you dare answer right away; first check whether the question makes sense.” On output, the model must return an is_valid flag and a reason for declining if the data falls short. Instead of quietly patching a broken query, the system triggers a controlled refusal and tells you straight where the problem is.

The study ran only on SQL generation; we think the principle may carry over to other business bots, but that wasn't tested. Whether it's a RAG pipeline, analytics in Slack or smart document search: if you don't give the model room to say “I don't know,” it is likely to keep feeding you confident wrong answers. The right to refuse is a cheap way to cut down on that.

Bottom line: stop demanding that AI answer every little thing, and teach it to push back on the user. Add a constraint check before the model starts writing code or hitting an API. One validation flag can catch costly mistakes, as long as you also check that it doesn't refuse good questions. Either you let your assistant say “there's no data for that,” or you keep building company strategy on beautiful, absolute garbage.

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 Implicit Prompt (PremiseSQL): a gentle “the question may contain errors” warning gets the model to decline a broken query arXiv:2610.22158

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