QuestionQ70

VerifiedApplication Development

A Generative Al Engineer wants an LLM to produce formatted JSON from emails. This requires parsing and extracting the following information: order ID, date, and sender email. Here is a sample email:

Question Image

They need to write a prompt that extracts the relevant information in JSON format with the highest level of output accuracy.

Which prompt will accomplish this?

Explanation

A prompt that includes a concrete example of the required JSON output uses few-shot guidance to establish the exact field names, structure, and formatting expected. This improves consistency and accuracy for extracting the date, sender email, and order ID.

Community Discussion

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