Skip to content

Prompt Engineering

Reviewed by , Co-Founder · Updated

What is Prompt Engineering?

Prompt engineering is the practice of writing and testing what a language model is told so an agent behaves reliably. The core of it is the system prompt: the standing instructions that set the agent's role, rules, tone and handoff conditions, read by the model before every reply. Related product: Chat Agents.

Deep dive

The prompt is the agent's job description, and most agent failures are specification failures. Prompt engineering is less about clever phrasing than about writing that job description precisely and checking it against real conversations.

The system prompt: the agent's standing orders

The system prompt is the block of instructions the model reads before every customer message. For each turn the platform assembles it with the other inputs, in roughly this order: the system prompt, the tool descriptions, the passages retrieved from the knowledge base, the conversation so far, then the newest message.

A working system prompt for a phone agent has a recognizable shape:

SectionExample line for a plumbing company
Who you are and what you cover"You answer the phone for Northgate Plumbing. You book visits and take emergency details."
Hard rules"Never quote a repair price. Give the diagnostic fee from the price list only."
What to collect"For every job: address, the problem, a callback number. Read each back."
Tone and length"One or two short sentences per turn. One question at a time."
When to hand off"Transfer if the caller reports flooding that cannot be shut off, or asks for a person."
What to do when unsure"If the answer is not in the documents, say so and offer to take a message."

(Northgate Plumbing is an invented example.) Facts such as prices, hours and service areas belong in documents, not in the prompt, so the prompt stays short and stable when a price changes.

The loop: write, test, read, revise

  1. Draft the prompt from the business rules.
  2. Run a test set of 30-50 real customer messages or call openings through it.
  3. Compare each output with what your best office person would have said.
  4. Change the prompt, run the same set again, and note what changed.

Keep each version, so a regression can be traced to the edit that caused it.

Rules that work and rules that do not

  • Behavior, not personality. "Answer the question first, then ask one question" works. "Be helpful and friendly" does nothing.
  • A negative rule needs an alternative. "Never discuss pricing" leaves the model guessing. "For price questions, give the diagnostic fee and say the technician quotes on site" does not.
  • Examples only where rules fail. Two or three sample exchanges fix tone or format faster than a paragraph of description. More than a handful and the model starts copying them word for word.
  • Shorter beats longer. Adding a rule for every incident produces a prompt so long that the early rules get skipped, and every turn costs more.

Example: fixing one wrong answer

An illustration, not a customer result. A restoration company's agent is handling intake well but sometimes tells callers "your insurance will cover this". Nothing in the company's documents says that; the phrase came from the model's general training. The fix is one rule near the top, "Never say whether a loss is covered. Say the adjuster decides coverage and offer to note the carrier and claim number", plus one sample exchange. The test set is run again, the phrase is gone, and the edit is saved with the three transcripts that prompted it.

What a prompt cannot do

A prompt lowers the rate of wrong answers; it does not remove them. A model can still ignore a rule, especially late in a long conversation. That is why prompts are paired with guardrails, a grounded knowledge base and a person reading a weekly sample of transcripts.

On Botcadence chat agents and voice agents you write the business instructions for each agent: who it answers for, what to ask, what never to say and when to transfer. The platform supplies the channel mechanics around them, such as how numbers are read aloud on a call. Document training holds the facts.

Try a Botcadence chat agent. Start on the Free plan and train a website chat agent on your own documents. No card needed. Get Started Free (Website chat live in about 5 minutes)

More terms: PropTech AI, RAG (Retrieval-Augmented Generation), Real-time CRM Sync, Sales Velocity, Scalable Support

Prompt Engineering FAQs

How long should an agent's prompt be?

As short as the rules allow; a few hundred to a thousand tokens is common for a support agent. Facts belong in retrieval and only behaviors in the prompt. When a prompt passes a couple of thousand tokens, rules at the top start being skipped and every turn costs more.

What is the difference between a system prompt and prompt engineering?

The system prompt is one artifact: the standing instructions the model reads before every reply. Prompt engineering is the practice that produces it and keeps it working: how tools are described, which examples are included, and the test set every change is run against.

Do I need an engineer to write prompts?

No, but you need someone who reads transcripts and writes precise instructions, usually the person who trains new office staff. Engineering helps with versioning, test sets and tool descriptions; the content itself is operational knowledge.

How often should prompts be revised after launch?

Weekly for the first month, driven by transcript review, then whenever a policy changes or a recurring error appears. Every revision should be run against the same test set so improvements in one area do not regress another.

Does a prompt written for one model work on another?

Mostly, with drift in verbosity and rule adherence. Re-run the test set after any model change; prompts tuned to suppress one model's habits can over-correct on a model that did not have them.

Sources

  1. Claude Docs: Prompt engineering overview (checked November 2026)
  2. OpenAI Docs: Prompt engineering (checked November 2026)

Ask AI about this page