QuestionQ8

VerifiedApplication Development

A Generative AI Engineer wants an LLM to parse and extract the following information: date, sender email, and order ID. The output must be formatted as JSON. Here is a sample email:

Question Image

They need a prompt that extracts and returns the required information in JSON with the highest level of output accuracy.

Which prompt accomplishes this?

Explanation

Providing a clear JSON-output instruction together with an example of the expected fields and values gives the model a concrete output pattern to follow. This few-shot example improves extraction consistency and schema adherence compared with an instruction that only requests JSON.

Community Discussion

No comments yet. Be the first to start the discussion!