A good prompt is concise but complete: it states the goal, the constraints, the expected output format, and the minimal relevant context up front — so the model can answer correctly on the first try instead of forcing a back-and-forth.
A good prompt is concise but complete: it states the goal, the constraints, the expected output format, and the minimal relevant context up front — so the model can answer correctly on the first try instead of forcing a back-and-forth.
Vague:
"Fix my date function."
→ The model has to guess the language, the bug, and what "fixed" means.
Sharp:
"In this TypeScript function, parseDate returns NaN for 'DD/MM/YYYY' input.
Fix it to parse day-first dates. Return only the corrected function.
function parseDate(s: string) { return Date.parse(s); }"
→ goal (fix day-first parsing), constraint (TypeScript), context (the function),
output format (only the function) — all in four lines.
The sharp version removes every guess. The model knows the language, the exact failure, the desired behavior, and how to hand back the result — so you get a usable answer immediately.
Concise, well-specified prompts cut the slow back-and-forth where the model guesses wrong and you correct it. Stating the goal, constraints, output format, and just-enough context up front saves tokens, time, and frustration — and makes the model's answer far more likely to be right the first time.
A library of IT interview questions with detailed answers — from Junior to Senior.
Donate