Building an expense-policy AI agent: what we learned reverse-engineering Ramp

Ramp, the fintech app for business expense management, launched a feature where an employee can text and ask "can I expense this?" and an AI agent answers based on their company's policy. It got very good feedback online, in reviews and LinkedIn posts. We tried to reverse-engineer it, to see what accuracy you could expect if you built the same thing from scratch, which instructions work best, and where it fails.
The setup
We prepared three versions of the system prompt, all referencing the same expense policy. We did not have a real policy on hand, so we generated one with AI and used that same policy across all three prompts, formatted differently each time.
The first version was basic. It used a placeholder for the company name and a placeholder for the policy, with a simple instruction: when an employee asks about an expense, determine if it is allowed based on the policy.
The second version formatted the policy as XML, by asking a chat model to convert the document into XML tags, since Anthropic's prompting guide recommends putting domain knowledge in XML tags so the model reads it better. It added more instruction too: analyse the request, respond with approved, not approved, or needs review, give a brief explanation, and reference the specific policy sections. It did not say when something should be "needs review," leaving the model to figure that out.
You might also like

We tested the viral prompt tricks. Most of them do nothing.
Threatening the model, all caps, high-stakes framing — we ran the viral prompt techniques across nine models on real extraction tasks. Structure and clarity beat hacks every time.

What is AI experimentation, and why do you need it?
One idea. One prompt. Five real cases. Several models. Read every response. That's where AI-native products start. An 8-step playbook for product thinkers running their first experiment.

The model selection blind spot: why the newest model is not always the best
Teams default to the newest model before checking whether it fits the task. Frontier models do not win every time — and accuracy, cost, and latency rarely peak in the same place.