/
MDI apiPayload Config - 03.03.2025
MDI apiPayload Config - 03.03.2025
apiPayload must be provided as a JSON compatible string. The below JSON object must therefore be converted to a string.
{
"extractionMethod": "MDI",
"languageModel": "AZURE_GPT_4o_2024_0806",
"pageContentExtractorMdiConfig": {
"useHighResolution": true
},
"pageContentOptimizerConfig": {
"apply": false,
"maxLoops": 2,
"scoreThreshold": 0.95,
"evaluatorSystemPrompt": "\nYou are a helpful assistant that evaluates the quality of extracted content based on\na document image and the extracted content.\n",
"evaluatorUserPrompt": "\nPlease evaluate the quality of the extracted information using the document image.\n\nExtracted information: ${current_response}\n\nYour tasks: \n1. Give instructions on how to improve the extracted information. Be as specific as possible.\n2. Assess whether the extracted information meets the following evaluation criteria:\n - Information has been completely extracted from the image\n - Information is structured logically and coherently as in the image\n - Information is accurate as represented in the image\n - Numerical values are correct and have a unit of measurement (e.g., 30% CAGR instead of 30%)\n - Charts have been converted into tables when numerical values have been extracted\n - No numerical values have been approximated or rounded or interpolated\n - No values have been added that are not represented in the image\n - Color coded values have been converted into text\n - Information from legends have been correctly assigned to the corresponding values\n3. Give a score between 0 and 1 for the quality of the extracted information (0 is bad, 1 is perfect).\n\nExample output:\n{\n \"improvement_instructions\": \"Here your specific instructions on how to improve the extracted information. Only outline the changes to be made, do not include any other text.\",\n \"meets_criteria\": false, # Assessment of the criteria listed above, only return true if all relevant criteria are met\n \"score\": 0.5 # Here the score between 0 and 1\n}\n",
"generatorSystemPrompt": "\nYou are a helpful assistant that improves content extracted from an image based on feedback\nand the original image.\n",
"generatorUserPrompt": "\nOriginal extracted content: ${current_response}\nFeedback for improving the extracted content: ${feedback}\n\nAddress all the feedback and improve the extracted content.\nAlso explain how you addressed the feedback.\n\nExample output:\n{\n \"reasoning\": \"Explain your decisions and reasoning on how you addressed the feedback\",\n \"improved_content\": \"Here the improved extracted content\"\n}\n"
}
}
Author | @Martin Fadler |
---|
, multiple selections available,
Related content
MDI+Vision apiPayload Config - 03.03.2025
MDI+Vision apiPayload Config - 03.03.2025
More like this
Vision apiPayload Config - 03.03.2025
Vision apiPayload Config - 03.03.2025
More like this
Ingestion Configuration: Agentic Document Ingestion
Ingestion Configuration: Agentic Document Ingestion
More like this
© 2025 Unique AG. All rights reserved. Privacy Policy – Terms of Service