← Back to document 452
AI review — page 2
claude-opus-4-8 · prompt v7 · 2026-08-26T08:32:40+00:00 · applied: yes · changed: yes
Screenshot sent to the model (reading-order tags burned on)
Instructions (system prompt)
The screenshot has annotations burned onto it that are NOT part of the document:
- a small red numbered tag at the top-left corner of each item, showing that item's position in the OCR-determined reading order (the same order the items appear in the json data);
- a red-and-white dotted outline around each item, showing the area the OCR detected for that content block.
Use the tags and outlines to see the detected reading order and item boundaries directly on the page, and judge that sequence against how a human would naturally read it. Ignore the annotations when checking text fidelity — they overlay the content, they are not content.
For the given screenshot of a PDF's page and the attached json data, I want you to perform the following tasks in order...
Review the reading order set out in the json data and compare to what a natural reading order for that of a human would be by looking at the screenshot. Decide on any changes and re-arrange the items for the most logical reading order.
Look at all text for each item and correct any extraction errors like missing words, spelling mistakes etc.
Look at each item in the JSON and ensure that the OCR process has identified the item as the correct type: text, list item etc.
Look for any text that duplicates: if two items next to each other contain the exact same text but the text only appears once on the screenshot, one of them is an extraction error — keep the item whose box matches where the text is visible and flag the other for removal.
Make amendments as you proceed through the items and list of instructions.
Reading Order Advice: If there is columns with headings and text, I wouldnt expect the reading order to jump from one heading straight to another if there is text associated with that heading.
Return format: Give me the json data back only, with the amendments you make.
Mechanical notes (so your answer can be applied automatically):
- Each item has an `id` — keep every item and its `id` exactly as given; never invent, drop or duplicate ids. Re-arranging means changing the position of items (and their nesting) in the arrays.
- Never move text (or a type) from one item to another: each item's coordinates travel with its id, so to change reading order you must move the whole item object, and text amendments must be in-place corrections of that item's own text.
- To flag a duplicate item, keep it in the array and add `"remove": "duplicate"` to it — never just delete it (deleted items are restored automatically).
- ids are opaque labels, not sequence numbers: never renumber them. After a removal or re-arrangement, every remaining item keeps the exact id it came with, even if the ids no longer look sequential.
- Text may contain `[pN.M…]` placeholders marking where an inline formula belongs — treat them as part of the text and leave them exactly where they are.
- `box` is [left, top, right, bottom] as percentages of the page from the top-left corner; return it unchanged.
- Respond with raw JSON only: no code fences, no commentary, same shape as the input (`{"items": [...]}`).
User message (json data sent)
Page 2 json data:
{"items":[{"id":"p2.1","type":"figure","box":[3,0,96,99],"text":"","children":[{"id":"p2.1.1","type":"link","box":[84,12,88,14],"text":"201 (f)"},{"id":"p2.1.2","type":"link","box":[31,16,36,18],"text":"112-5,"},{"id":"p2.1.3","type":"link","box":[44,37,61,38],"text":"Qualified End Users?"},{"id":"p2.1.4","type":"link","box":[88,83,93,85],"text":"112.5"},{"id":"p2.1.5","type":"link","box":[83,86,87,88],"text":"112.6."},{"id":"p2.1.6","type":"link","box":[68,89,96,90],"text":"Complete the Qualified Exemption form"},{"id":"p2.1.7","type":"link","box":[9,94,26,96],"text":"21 CFR Part 11 2"}]},{"id":"p2.2","type":"text","box":[3,98,96,100],"text":"This is a decision tree titled \"Part II Qualified Exemption Eligibility,\" published by the Maryland Department of Agriculture. It helps a farm determine whether it is covered by the Produce Safety Rule or eligible for a Qualified Exemption.\n\nThe flow begins at a green diamond labeled \"Start.\" An arrow leads down to the first decision box: \"Does your farm on average (in the previous three years) as per Section 112.5, have more than $33,297 and less than $665,947 annual food* sales? Adjusted for inflation (Based on 2022, 2023, 2024).\"\n\nFrom this first decision box there are two paths. A \"NO higher sales\" branch (red circle) leaves to the left and down and leads to the final red stop-sign outcome. A \"YES\" branch (green circle) leaves downward to the next decision box.\n\nThe next decision box reads: \"Do you sell to Qualified End Users? Qualified End Users include: Farm Stands, Farmers Markets, CSAs, Restaurants and/or Retailers in MD or not more than 275 miles from the farm.\" From this box, a \"NO\" branch (red circle) leaves to the left and leads to the final red stop-sign outcome. A \"YES\" branch (green circle) leaves downward to the next decision box.\n\nThe next decision box reads: \"Do you sell to Non-Qualified End Users? Non-Qualified End Users include: Wholesale Distributors, Brokers, Produce Auctions, any sales (including Restaurants and/or Retailers) more than 275 miles from the farm.\" From this box, a \"NO\" branch (red circle) leaves to the right and leads down to the yellow-bordered Qualified Exemption outcome box on the lower right. A \"YES\" branch (green circle) leaves downward to the final decision box.\n\nThe final decision box reads: \"Are the majority (≥51%) of total food sales to Qualified End Users (QEU) or Non-Qualified End Users (NQEU)?\" This has two outcomes shown as orange arrows pointing left and right. The left orange arrow is labeled \"More sales (≥51%) to NQEU\" and leads to the red stop-sign outcome. The right orange arrow is labeled \"More sales (≥51%) to QEU\" and leads to the yellow-bordered Qualified Exemption outcome box.\n\nThe red stop-sign outcome (bottom left) reads: \"Your farm IS COVERED by the Produce Safety Rule and subject to the full requirements of 21 CFR Part 112.\" This terminus is reached by the \"NO higher sales\" branch of the first box, the \"NO\" branch of the second box (do you sell to Qualified End Users), and the \"More sales (≥51%) to NQEU\" arrow.\n\nThe yellow-bordered outcome box (bottom right) reads: \"You are eligible for a Qualified Exemption under Section 112.5 and must meet the requirements of Section 112.6. Complete the Qualified Exemption form annually as it applies. Documentation must be submitted each year to be eligible. Without documentation on file, it is assumed your operation is fully COVERED by the Produce Safety Rule.\" This terminus is reached by the \"NO\" branch of the third box (do you sell to Non-Qualified End Users) and the \"More sales (≥51%) to QEU\" arrow.\n\nOutside the flow, a blue \"Define\" circle connects to a blue-bordered note reading: \"*Food as defined in section 201(f) of the Federal Food, Drug, and Cosmetic Act and includes seeds and beans used to grow sprouts. (f) The term 'food' means (1) articles used for food or drink for man or other animals. (E.g., produce, eggs, dairy, meat, honey, processed or homemade foods (jams, pickled items, baked goods...), beverages, foods/drinks purchased for resale (commercially produce and/or purchased from other farms...), sales of live food animals, and animal feed such as pet milk, hay, silage, grain...).\"\n\nA footnote at the bottom, outside the flow, states this publication is supported by the FDA of the U.S. Department of Health and Human Services (HHS) as part of a financial assistance award U2FFD007444 totaling $1,280,384 with 100 percent funded by FDA/HHS, and that the contents do not necessarily represent the official views of, nor an endorsement by, FDA/HHS or the U.S. Government."}]}
Model response
{"items":[{"id":"p2.1","type":"figure","box":[3,0,96,99],"text":"","children":[{"id":"p2.1.1","type":"link","box":[84,12,88,14],"text":"201 (f)"},{"id":"p2.1.2","type":"link","box":[31,16,36,18],"text":"112-5,"},{"id":"p2.1.3","type":"link","box":[44,37,61,38],"text":"Qualified End Users?"},{"id":"p2.1.4","type":"link","box":[88,83,93,85],"text":"112.5"},{"id":"p2.1.5","type":"link","box":[83,86,87,88],"text":"112.6."},{"id":"p2.1.6","type":"link","box":[68,89,96,90],"text":"Complete the Qualified Exemption form"},{"id":"p2.1.7","type":"link","box":[9,94,26,96],"text":"21 CFR Part 11 2"}]},{"id":"p2.2","type":"text","box":[3,98,96,100],"text":"This is a decision tree titled \"Part II Qualified Exemption Eligibility,\" published by the Maryland Department of Agriculture. It helps a farm determine whether it is covered by the Produce Safety Rule or eligible for a Qualified Exemption.\n\nThe flow begins at a green diamond labeled \"Start.\" An arrow leads down to the first decision box: \"Does your farm on average (in the previous three years) as per Section 112.5, have more than $33,297 and less than $665,947 annual food* sales? Adjusted for inflation (Based on 2022, 2023, 2024).\"\n\nFrom this first decision box there are two paths. A \"NO higher sales\" branch (red circle) leaves to the left and down and leads to the final red stop-sign outcome. A \"YES\" branch (green circle) leaves downward to the next decision box.\n\nThe next decision box reads: \"Do you sell to Qualified End Users? Qualified End Users include: Farm Stands, Farmers Markets, CSAs, Restaurants and/or Retailers in MD or not more than 275 miles from the farm.\" From this box, a \"NO\" branch (red circle) leaves to the left and leads to the final red stop-sign outcome. A \"YES\" branch (green circle) leaves downward to the next decision box.\n\nThe next decision box reads: \"Do you sell to Non-Qualified End Users? Non-Qualified End Users include: Wholesale Distributors, Brokers, Produce Auctions, any sales (including Restaurants and/or Retailers) more than 275 miles from the farm.\" From this box, a \"NO\" branch (red circle) leaves to the right and leads down to the yellow-bordered Qualified Exemption outcome box on the lower right. A \"YES\" branch (green circle) leaves downward to the final decision box.\n\nThe final decision box reads: \"Are the majority (≥51%) of total food sales to Qualified End Users (QEU) or Non-Qualified End Users (NQEU)?\" This has two outcomes shown as orange arrows pointing left and right. The left orange arrow is labeled \"More sales (≥51%) to NQEU\" and leads to the red stop-sign outcome. The right orange arrow is labeled \"More sales (≥51%) to QEU\" and leads to the yellow-bordered Qualified Exemption outcome box.\n\nThe red stop-sign outcome (bottom left) reads: \"Your farm IS COVERED by the Produce Safety Rule and subject to the full requirements of 21 CFR Part 112.\" This terminus is reached by the \"NO higher sales\" branch of the first box, the \"NO\" branch of the second box (do you sell to Qualified End Users), and the \"More sales (≥51%) to NQEU\" arrow.\n\nThe yellow-bordered outcome box (bottom right) reads: \"You are eligible for a Qualified Exemption under Section 112.5 and must meet the requirements of Section 112.6. Complete the Qualified Exemption form annually as it applies. Documentation must be submitted each year to be eligible. Without documentation on file, it is assumed your operation is fully COVERED by the Produce Safety Rule.\" This terminus is reached by the \"NO\" branch of the third box (do you sell to Non-Qualified End Users) and the \"More sales (≥51%) to QEU\" arrow.\n\nOutside the flow, a blue \"Define\" circle connects to a blue-bordered note reading: \"*Food as defined in section 201(f) of the Federal Food, Drug, and Cosmetic Act and includes seeds and beans used to grow sprouts. (f) The term 'food' means (1) articles used for food or drink for man or other animals. (E.g., produce, eggs, dairy, meat, honey, processed or homemade foods (jams, pickled items, baked goods...), beverages, foods/drinks purchased for resale (commercially produce and/or purchased from other farms...), sales of live food animals, and animal feed such as pet milk, hay, silage, grain...).\"\n\nA footnote at the bottom, outside the flow, states this publication is supported by the FDA of the U.S. Department of Health and Human Services (HHS) as part of a financial assistance award U2FFD007444 totaling $1,280,384 with 100 percent funded by FDA/HHS, and that the contents do not necessarily represent the official views of, nor an endorsement by, FDA/HHS or the U.S. Government."}]}