A developer integrates OCI GenAI into a mobile app to provide product descriptions. The responses sometimes include explanations or questions instead of the requested format. The developer is using a simple prompt: 'Describe product X.' The app expects a single paragraph. Which corrective action should the developer take?
Correct: Structured prompts effectively enforce output format.
Why this answer
Option A is correct because adding a structured prompt with format instructions and an example directly addresses the issue of the model producing off-format responses. By explicitly specifying the expected output (e.g., 'Provide a single paragraph description without questions or explanations') and including a few-shot example, the developer constrains the model's generation to match the desired format, leveraging prompt engineering to guide the LLM's behavior without changing model parameters or architecture.
Exam trap
Cisco often tests the misconception that parameter tuning (temperature, max tokens) or model selection can substitute for proper prompt engineering, when in fact format compliance is primarily achieved through explicit instructions and examples in the prompt.
How to eliminate wrong answers
Option B is wrong because lowering the temperature to 0 makes the output deterministic but does not enforce a specific format; the model may still produce explanations or questions in a deterministic but non-compliant manner. Option C is wrong because increasing max tokens allows longer responses but does not prevent the model from including unwanted content like explanations or questions; it may even exacerbate the issue by giving the model more room to deviate. Option D is wrong because switching to a different model does not guarantee format compliance; the core problem is the lack of explicit format instructions, not the model's language understanding capability, and any model will benefit from structured prompting.