1. How would you approach a prompt that is consistently returning ambiguous results?
Focus on reproducing the ambiguous cases, clarifying instruction and input boundaries, tightening the output contract, and comparing revisions on representative examples.
I would first reproduce the ambiguous cases with a small set of representative inputs. Then I would make the goal, scope, inputs, assumptions, and constraints explicit. Next I would define the exact output format, structure, limits, and quality rules. I would run each revision against the same examples and compare clarity, consistency, and contract compliance. I would keep iterating until the prompt gives the expected type of result across those cases. In production, I would still treat model output as untrusted and validate requirements that the application must enforce.
I would treat this as a repeatable testing problem, not a guessing problem. First, I would collect several cases where the prompt gives unclear or inconsistent answers. For each case, I would write down what input was used, what result appeared, and what result was expected. Then I would remove missing details from the instruction. I would state the exact goal, scope, allowed input, assumptions, constraints, and expected output. Finally, I would test each revision on the same representative cases so I can see whether the change actually reduced ambiguity.
- What kinds of ambiguous results are appearing most often?
- Do we already have representative examples of acceptable and unacceptable outputs?
- Is there a required response format, length, or set of fields?
I would begin by reproducing the ambiguity. For example, the prompt “Summarize this report.” leaves several reasonable choices open. The model might summarize the whole report, summarize one section, or produce different lengths and tones. I would collect these failures and build a representative set of cases that I can reuse for every revision.
Next, I would clarify the instruction and input boundaries. I would state the goal, exact scope, available input, assumptions, constraints, and what should be avoided. For the example, I could say, “Summarize only the Findings section. Keep it factual. Do not add information from other sections.” This removes several possible interpretations.
Then I would tighten the output contract. An output contract states exactly what the response should look like. For this example, I would require three to five key findings, no more than 80 words total, and only facts from the Findings section. If an application requires structured JSON, I can express the same logical contract with a schema and validate it in deterministic application code.
Finally, I would compare prompt revisions on the same representative examples. I would check whether each result is clear, follows the contract, stays consistent across cases, and avoids earlier errors. Model generation is probabilistic, so prompt wording cannot guarantee identical responses. The application should validate required rules. I would version the prompt, keep the evaluation cases, and add new ambiguous cases to the set as they are discovered.
- Reproduce the ambiguous outputs with a fixed set of representative cases.
- Record the expected behavior for each case so success can be observed.
- Clarify the prompt goal, scope, inputs, assumptions, constraints, and exclusions.
- Keep trusted instructions clearly separate from input data that may be untrusted.
- Define the output contract, including format, structure, required information, length limits, and quality rules.
- When structured output is required, validate its format separately from whether its content is correct.
- Run every prompt revision on the same representative cases and compare clarity, consistency, contract compliance, and previous failure cases.
- Keep the strongest revision, version it, and add newly discovered ambiguous cases to the evaluation set.
SYSTEM:
You summarize only information provided inside the <report> tags.
Do not use outside facts.
If required information is missing, say that it is missing.
USER:
Summarize only the Findings section of the report below.
<report>
{{REPORT_TEXT}}
</report>
OUTPUT RULES:
Return three to five key findings.
Use no more than 80 words total.
Include only facts from the Findings section.
Do not add opinions or information from other sections.{
"type": "object",
"properties": {
"keyFindings": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 3,
"maxItems": 5
}
},
"required": [
"keyFindings"
],
"additionalProperties": false
}Interviewers ask this to see whether I can diagnose prompt ambiguity in a controlled way instead of randomly changing wording. They want to know whether I can reproduce failures, define clear instruction and input boundaries, specify an output contract, and compare prompt revisions on the same representative examples. This also tests whether I understand that model generation can vary, so production code needs observable tests and validation rather than assuming one successful response proves the prompt is reliable.
A common mistake is changing many prompt parts at the same time. That makes it hard to know which revision helped. Another mistake is testing only one successful example instead of using the same representative set for every revision. Candidates also sometimes make a prompt longer without making its goal or boundaries clearer. More words do not automatically remove ambiguity. Another mistake is describing an output format but never validating it in application code. Finally, valid structure does not prove that the content is correct. Format validation and semantic validation should be treated as separate checks.
Explain the approach as one simple loop: reproduce, clarify, define the output contract, compare, and iterate. Use the concrete “Summarize this report.” example and show how each revision removes a specific source of uncertainty. Mention that better prompting reduces ambiguity but does not make probabilistic model output deterministic, so production systems still validate important requirements.









