Turn every order email into a clean order

Describe your products and how customers write. Facet builds a model that reads each email and returns the order lines, quantities and delivery date in your shape, and checks it against your rules before any update goes live.

Order email

"Two dozen 12 oz cups, deliver Friday"

{ "product": "12 oz cup", "quantity": 24, "deliver": "Friday" }

Where orders from email usually starts

Most teams have someone retype order emails, or send them to a frontier model and check its JSON by hand. Retyping is slow, and the model misreads the shorthand your customers use. A Facet model learns how your customers write.

How it works

  1. Describe the task. Paste the prompt you use today, or write it plainly: “From each email, return every order line with product, quantity and delivery date. A dozen is 12; a case of lids is 1,000.” 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 “half a dozen is 6”, 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 it misreads an order, 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 a customer email and returns the order lines
with product, quantity and delivery date as JSON. Our catalog: ... Here are twenty
real order emails: ... 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="email-orders", messages=[{"role": "user", "content": email}])

Why Facet for orders from email

Questions

What if an email isn't an order?

Add a rule for it, such as "return no lines when the email has no order", and Facet tests every version against it.

Can it match products to our catalog codes?

Yes. Give the catalog in your description or examples and say to return the code. Facet tests every version against it.

Can someone check orders before they go through?

Your app decides. Many teams send orders the model marks unclear to a person, and flag any wrong ones to Facet so the next version learns from them.