Lesson 6 of 30
A vague prompt gets a vague, inconsistent answer for a specific reason: the model has no signal narrowing what a good response looks like. Prompt engineering is the discipline of giving it that signal on purpose.
12 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
Why does a vague prompt tend to produce inconsistent results across repeated runs rather than a single, clearly wrong answer?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
A large language model doesn't "understand" what you want the way a coworker does — it predicts the most statistically plausible continuation of the text you gave it. That means the prompt isn't a request, it's the entire specification. Everything the model has to go on is what's actually in the text: the task, the constraints, the shape of a good answer. Leave any of that out and the model doesn't fail loudly — it fills the gap with whatever's statistically common, which is why vague prompts don't produce wrong answers so much as inconsistent ones: run the same vague prompt five times and you'll get five differently-shaped responses, because nothing in the prompt narrowed the response space down to one shape.
Three techniques do most of the narrowing:
None of this is a one-shot art where you write the perfect prompt and move on. Treat it as an engineering discipline: write a prompt, run it against real (or realistic) inputs, look at where the output goes wrong or gets inconsistent, and tighten the prompt to close that specific gap. The prompt that works on your first three test cases and breaks on the fourth is the normal case, not a failure — that's what iteration is for.
Vague:
"Summarize this bug report."
Engineered:
"Summarize this bug report in exactly 2 sentences: the first states
the observed behavior, the second states the expected behavior. Do
not include severity, steps to reproduce, or a suggested fix.
Example input: 'Clicking submit twice creates two orders. Should only
create one.'
Example output: 'Clicking submit twice creates two duplicate orders.
The expected behavior is that only one order is created regardless
of how many times submit is clicked.'
Now summarize: <bug report text>"
The vague version leaves "summarize" undefined — length, structure, and what to include or exclude are all up for grabs, so the model guesses, and different bug reports get summarized in different shapes even when you want consistency across a whole backlog. The engineered version pins down length, structure, and scope explicitly, and the one-shot example shows the exact input/output pattern instead of just describing it. This isn't a toy difference: it's the same distinction between lib/ai/prompts/tutor.ts giving the tutor persona a tight scope (answer only from the provided lesson context) versus letting it answer however it statistically tends to, and lib/ai/prompts/interview.ts demanding strict JSON output rather than hoping the grading model happens to format its verdict usefully.
"How would you debug an LLM feature that gives inconsistent answers to similar inputs?" is a real question, and the answer that shows depth is diagnosing which specific ambiguity the prompt leaves open, not just reaching for "try a better model."