All field notes

Product

·

8 min read

Prompt contracts: instructions agents actually follow

Long, clever prompts are fragile. Short, testable contracts are not. How we write instructions for production agents.

Priya Raman

Head of AI Engineering

A prompt is a contract between your business and a model. Like any contract, it should be specific, testable and boring to read.

Separate the what from the how

We split every agent instruction into four parts: the job, the inputs, the rules and the output format. Each part is versioned and tested on its own.

  • Job: one sentence describing the outcome

  • Inputs: exactly what the agent will see

  • Rules: numbered, each one testable

  • Output: a schema, never free text

Every rule gets a test

If a rule says “never offer a discount above 10%”, there’s a test conversation that tries to get a 15% discount. Rules without tests are wishes.

Treat prompts like code

Prompts live in version control, change through review, and ship only when the evaluation suite passes. It sounds heavy. It’s what lets us change things quickly without fear.

Written by

Priya Raman

Leads the team that designs, evaluates and ships our agents. Former research engineer in applied NLP.

Keep reading

Put your operations on reflex.

Tell us where your team loses the most time. We’ll show you what an agent could take off their plate — and what it would save — in one call.

Create a free website with Framer, the website builder loved by startups, designers and agencies.