What is a system prompt?

Definition

A system prompt is the standing text an LLM receives before the conversation begins, setting its role, tone, goals and limits. In a voice agent, it is the main way to control what the agent says and when.

How a system prompt works

An LLM is given its input as a sequence of messages. The system prompt is the first one, written by the developer instead of the caller. The model reads it again on every turn, before the conversation so far and before the caller’s latest words. Because it is sent each time, it counts against the model’s context window and adds to the processing done before each reply.

Providers and platforms use different names. Cartesia’s Managed Agents calls the field instructions, and its documentation describes it as defining the agent’s role, speaking style, objectives and limits. It suggests organizing the text under headings such as identity, speaking rules, objectives and guardrails.

A system prompt for a voice agent usually answers these questions:

  • Who is the agent and whom does it speak for?
  • How should it sound: sentence length, formality, how to read numbers?
  • What is each task, and when is it done?
  • Which tools may it use, and when?
  • What must it never do, and what does it do instead?
  • When does it hand the call to a person?

The text can include placeholders that are filled when the call starts, such as the customer’s name. See dynamic variables. In Managed Agents, instructions pick up the latest variable values each time the model responds.

Why it matters for voice agents

The system prompt is where a caller’s experience is mostly decided. It sets how long each turn runs, whether the agent asks one question or three, and whether it reads a code aloud digit by digit. A prompt written for a chat window produces lists and long paragraphs that sound wrong when spoken. Writing for speech is covered under prompt engineering for voice.

It is not a security boundary, though. A system prompt asks the model to behave in a certain way. It does not enforce that behavior, and a caller can try to talk the agent out of its instructions. Rules that must hold, such as which accounts the agent may read, belong in the tools and the systems behind them, with guardrails around the model. Treat anything in the prompt as visible to a determined caller, and keep secrets out of it.

A long prompt costs time. More text to process means a slower first word on every turn, so cut rules that do not change behavior.

Example

An illustrative opening of a system prompt for a clinic line:

“You are the scheduling assistant for Riverside Clinic. Speak in short sentences. Ask one question at a time. Read dates as ‘Thursday, October 8’. You can book, move and cancel appointments. For billing questions, offer to transfer the call.”

Guides

Sources

Get started today

Talk to an expert.

Connect with a member of our team and learn how Cartesia can help you build world-class voice experiences.

Contact Sales

Start building.

Access our models via API and bring a voice agent into production in minutes.

Try Cartesia