"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
- 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.
- 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.
- 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
- From your agent: connect Claude, Cursor, ChatGPT, Codex or VS Code to Facet, then paste:
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.
- 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="email-orders", messages=[{"role": "user", "content": email}])
Why Facet for orders from email
- Your customers’ shorthand. It learns how they name your products and quantities.
- The same shape every time. Every answer is ready for your order system.
- 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
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.