---
title: You get a prompt, a dozen inputs and the model's outputs, several of them wrong. In 30 minutes, diagnose the failure…
url: https://gurkanozkan.ai/learn/questions/applied-llm-prm-05/
markdown: https://gurkanozkan.ai/learn/questions/applied-llm-prm-05.md
kind: question
role: Applied LLM
stage: Technical
difficulty: Medium
json: https://gurkanozkan.ai/api/learn/questions/applied-llm-prm-05.json
robots: noindex
---

# You get a prompt, a dozen inputs and the model's outputs, several of them wrong. In 30 minutes, diagnose the failure patterns, improve the prompt and explain how you'd verify the fix.

Applied LLM · Technical · Medium

## Answer

*Model answer, written in a candidate's voice*

### In short

- Read all outputs first, cluster by failure mode, and rank by frequency/severity.
- Hypothesize causes: ambiguous instruction, missing context, conflicting examples, format confusion, or reasoning gap.
- Change one thing at a time: define terms, add a counter-example, tag sections, specify output format, or allow reasoning before the answer.
- Re-run the same inputs plus a regression set; check failing cases improve without breaking passing ones.
- Grow the test set with edge cases and keep a small golden set; note length/cost/latency trade-offs.

### In full

I'd start by reading every output before touching the prompt, grouping failures by pattern—wrong category, ignored constraint, malformed format, confident but unsupported reasoning—and ranking them by frequency and impact rather than fixing the first weird one. Then I'd form one hypothesis per cluster, such as an ambiguous term, missing context, a conflicting example, or an unclear output contract, and make a single targeted change: define the term, add a counter-example, restructure with tags, specify the exact format, or let the model reason before answering. I would not stack five edits at once, because then I cannot tell what helped. Verification would re-run the original failing inputs and the previously passing inputs, plus a few edge cases, checking both correctness and format, and I'd keep a small golden set so later prompt changes do not silently regress. If the fix works, I'd grow the test set with the new edge cases and note the trade-offs: clearer prompts and reasoning can add tokens, cost, and latency, so I'd keep the prompt as tight as the failure modes allow and only add detail where it changes behaviour.

*Corrected by an independent AI reviewer.*

## What a strong answer covers

- Reads every output first, groups failures, hypothesises causes (ambiguous instruction, missing context, conflicting example, format confusion)
- One targeted change at a time: define terms, add a counter-example, restructure with tags, specify format, allow reasoning first
- Verifies on failing **and** passing cases (no regressions); grows the test set
- States trade-offs (length, cost, latency)

## Common mistakes

- Rewriting everything with no hypothesis
- checking only the previously failing cases

## Topic guides

- [Debugging ML and LLM systems](https://gurkanozkan.ai/learn/topics/debugging.md)
- [Evaluation: metrics, evals for LLM systems and statistical rigour](https://gurkanozkan.ai/learn/topics/evaluation.md)
- [Prompting, few-shot and structured output](https://gurkanozkan.ai/learn/topics/prompting.md)
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
