An output must always be valid JSON with named fields. What should the prompt do?
Why C is the answer
State the exact format, with an example
Stating the exact format and showing an example gives the model a clear target, so its output stays consistent.
In detail
- A prompt can state the exact format and show an example.
- A well-designed prompt can ask for a specifically formatted response.
- Combine this with validation when a program reads the result.
Use case
An illustrative scenario, not a real incident.
A ticket router needs JSON with "category" and "priority". The prompt shows the exact format with one example, and the replies become consistent.
See it in different ways
sequenceDiagram participant P0 as App participant P1 as Model participant P2 as Parser P0->>P1: Prompt with the format P1->>P2: JSON reply P2-->>P0: Valid fields
flowchart LR S0["State the fields"] --> S1["Show an example"] --> S2["Model follows it"] --> S3["Validate"]
Key point: Show the exact format you want.
Why the other options are wrong
- A. Raise the temperature to add more variety
- More variety makes the format less consistent.
- B. Leave the format out to save some tokens
- The downstream system depends on the format, so it cannot be left out.
- D. Ask the model to do its best with the answer
- This gives the model no format to follow.

