CORNER CAFE 11/04/26 LATTE 5.50 CROISSANT 4.25 TAX 0.87 TOTAL 10.62
{ "merchant": "Corner Cafe", "date": "2026-11-04", "total": 10.62 }
Where receipt extraction usually starts
Most teams pass receipt text from their text recognition step to a frontier model and ask for JSON, then fix totals that come back as strings and dates in the wrong order. Every receipt pays frontier prices. A Facet model returns your fields, in your shape, on every receipt.
How it works
- Describe the task. Paste the prompt you use today, or write it plainly: “From each receipt’s text, return merchant, date as year-month-day, total as a number, and each line item.” Add a few real examples if you have them.
- Agree on what good looks like. Facet writes plain statements of a good answer, like “the total is the amount paid, after tax and tip”, each with examples. Edit any that are off.
- Create, then correct. Facet builds the model on its own, in the background, and tests it against every statement before it goes live. When a field comes back wrong, say what it should have been. Facet quotes the fix before it spends anything.
Two ways to use it
- From your agent: connect Claude, Cursor, ChatGPT, Codex or VS Code to Facet, then paste:
Use Facet to build a model that reads receipt text and returns merchant, date,
total and line items as JSON. Here are twenty real receipts as text: ... Show me the
draft and the price before you approve anything.
- In your code: keep your OpenAI SDK and change two lines, the address and the model name.
import os
from openai import OpenAI
client = OpenAI(base_url=os.environ["FACET_BASE_URL"], api_key=os.environ["FACET_API_KEY"])
reply = client.chat.completions.create(model="receipt-fields", messages=[{"role": "user", "content": receipt_text}])
Why Facet for receipt extraction
- Made for messy text. It learns the misspellings and broken lines your text recognition step produces.
- The same shape every time. Every answer comes back ready for your database.
- Checked before every update. An update goes live only if it keeps every statement the live version passes, and any update rolls back in one step.
- Yours. Export it any time, free, and run it wherever you like.
Questions
Can Facet read a photo of a receipt?
Facet reads text today. Run the photo through any text recognition tool first, then send the text to your model.
What about receipts in other languages or currencies?
Include a few in your examples and describe the rule, such as "return the currency code with the total". Facet tests every version against it.
What if the total is missing?
Write a rule for it, such as "leave total empty when none is printed", and every version is tested on it before it goes live.