LearnAI
Новинки AI · AI, который видит · Lesson 3/10
← To the catalog
Task

Extract data from photo of receipt

Make a request to the sighted AI so that it turns the photo of the receipt into structured data. Return JSON {"prompt":"...","output_format":"...","anti_hallucination":"..."}: prompt - task, output_format - in what form to return the data (which fields/structure), anti_hallucination - rule that will prevent AI from inventing numbers if the position is poorly read.

Unlock access to submit solutions for instant AI review.
Digitize a receipt in seconds
💡 A piece of theory

For AI, a receipt is a picture in which it recognizes text and arranges it into an understandable structure. Strengths: Turns 12 rows into a table in seconds. Weak: smudged or faded numbers. AI does not like “emptiness” and can substitute a plausible number instead of an unreadable one - this is fiction. Therefore, the first technique: set the exact structure of the output - not “rewrite the receipt”, but “return the fields: store, date, list of goods with price, total, VAT.” So the answer is immediately ready to be inserted into the table. The second, key technique against fiction: write the rule directly - mark the unreadable position as “unknown” or “?”, DO NOT guess. The third self-test lever: ask the AI ​​to add up the prices of the positions and compare with the total on the receipt; If it doesn’t match, it means something was recognized incorrectly, and you can see it right away. A typical rookie mistake: simply ask “digitize the check” and trust the numbers without checking the amount - one substituted figure will quietly ruin the entire budget.

How is it assessed · passing 70

  • 1Valid JSON without text around it25%
  • 2There are fields prompt, output_format, anti_hallucination25%
  • 3Inference structure and protection against fiction50%
Your promptClaude ⌄
🔒

Unlock access to submit solutions for instant AI review.