An e-commerce team built a system where a Foundry-hosted model reads a customer email and extracts the order number, item name, and quantity, then passes that result directly into an inventory API. The API rejects any input that isn't in its exact expected format, and the integration has been failing intermittently because the model's free-form replies phrase the same information differently each time. What should the team configure to fix this?
Select an answer to reveal the explanation.
Short Explanation
The problem here isn't that the model doesn't know the order number, item, or quantity, it's that it keeps saying the same thing in a slightly different way each time, and the inventory system on the other end has no patience for that. Turning up the randomness setting only makes the wording more unpredictable, which is the opposite direction you want to go. Giving the model a way to look things up doesn't help either, since the information was never missing, it's already sitting right there in the email; the issue is entirely about the shape of the reply, not its accuracy. Trimming the response shorter doesn't force consistency either, and risks cutting off one of the three fields the API needs. What actually solves this is telling the model exactly what shape its answer has to take every time, a fixed set of fields in a fixed format, so the downstream system always gets something it can read without guessing.
Full Explanation
The correct answer is A. Configuring structured output constrains the model's response to a fixed JSON schema with defined fields, so every reply comes back in the same machine-readable shape the inventory API expects, which directly fixes the intermittent parsing failures. Option B is incorrect because increasing temperature makes the model's wording more varied and less predictable, which would make the formatting inconsistency worse rather than better. Option C is incorrect because retrieval-augmented generation helps the model pull in facts it doesn't already know, such as looking up order details from a database, but the problem described here isn't missing information, it's inconsistent output formatting, which retrieval does not control. Option D is incorrect because shortening the maximum output length might truncate a valid response before all three required fields are included, and it does nothing to enforce a consistent structure within whatever length is allowed.