Interview practice question
Extracting nested data from complex documents
Machine Learning · Prompt Engineering · Intermediate
You need to extract line items, totals and tax details from varied purchase orders into a nested JSON structure. How do you design the prompt?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Provide clear JSON schema with field descriptions.
- Use structured output enforcement.
- Instructions for tables, multi-page documents, missing values.
- Ask for consistency checks (sum of line items equals total).
- Validate and flag discrepancies.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.