Read merchant, date and total from every receipt

Name the fields your expense app needs. Facet builds a model that reads the text of each receipt and returns those fields in your shape, and checks it against your rules before any update goes live.

Receipt text

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

  1. 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.
  2. 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.
  3. 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

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.
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

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.