Skip to main content

Prompt Engineering

The system prompt is the most important setting for your assistant. It tells the agent who it is and how it should behave on every call. Don't want to write it by hand? Use the Generate Prompt button in the editor instead — see below for how.

What Is a System Prompt​

The system prompt is a set of instructions given to the agent before the call starts. The caller never hears it — it works silently in the background and shapes everything the assistant says.

Keep the Prompt Short​

Before the agent can join any call, it first has to load what we call its "config." Think of this the same way a phone loads its apps and contacts before it's ready to ring — the agent needs to load everything it will use for that call before the conversation can begin. This config is made up of two things combined: your system prompt and your Knowledge Base content. Both count toward the same load.

If this combined config becomes too heavy — meaning the prompt is too long, or the Knowledge Base attached to the assistant is too large — the agent can hit its size limit while trying to load. When that happens, the call itself still connects on the phone line, but the agent fails to finish loading in time, and it simply never speaks. From the caller's side, this looks like dead air. To prevent this from happening, we enforce a fixed size limit on the backend, which is exactly why keeping your prompt short and focused matters — it is not just a style preference, it directly affects whether the agent can join the call at all.

warning

A prompt (or Knowledge Base) that is too large is one of the most common reasons an assistant goes silent on a call. If your assistant connects but doesn't speak, check the size of your prompt and Knowledge Base first before assuming anything else is broken.

Never Paste Full Articles Into the Prompt​

A common mistake is copying entire knowledge articles, FAQs, ticket-field lists, or policy documents directly into the system prompt so the agent "has everything it needs." This feels safe, but it works against you: it makes the prompt large and slow to load, and every time you need to update one article, you end up having to edit and re-test the entire prompt again.

Instead, keep all of that content — the actual article text, product details, ticket field definitions, and policies — inside your Knowledge Base, where it belongs. In the prompt, simply tell the agent to refer to the relevant article by name or link when needed, for example: "For refund questions, follow the Refund Policy article in the Knowledge Base." The agent will pull in only the relevant article content for that specific customer question, instead of carrying the full library of articles in the prompt on every single call.

This separation means you can add, edit, or remove articles at any time without touching the prompt at all — and it keeps the prompt small enough to load quickly and reliably.

Instruct the Agent — Don't Script It​

Write the prompt as instructions that describe the agent's behaviour, not as a script of exact words to repeat back to the caller. Tell the agent what to do at each step, and trust it to phrase that naturally in its own voice — this is what makes the conversation sound human rather than robotic, and it also keeps your prompt much shorter than writing out every possible line of dialogue.

Write This (Instruction)Not This (Scripted Line)
Ask the caller for their full name."May I have your full name, please?"
Confirm the email address by spelling it back before continuing."Let me repeat that back to you: A, R, T, dot, S, M, I, T, H, at Gmail dot com — is that correct?"
If the caller sounds angry, acknowledge it calmly before continuing.A fixed, word-for-word script for every possible angry response
Greet the caller and ask how you can help."Thank you for calling. How may I assist you today?"

Writing Tips for Voice​

DoAvoid
Write in short, clear sentencesLong paragraphs — they confuse the model
Use numbered steps for flows (e.g. "1. Greet 2. Ask name 3. Confirm")Markdown — headers and bullets are ignored in voice
State what the agent should NOT do explicitlyVague instructions like "be helpful"
Specify language expectations: "Respond in Hindi only"Assuming the agent will pick the right language
Limit scope: "Only answer questions about product X"Open-ended prompts that allow topic drift

Generate Prompt Button​

You don't need to write a system prompt entirely by hand. Open the assistant editor's Model tab and click Generate Prompt — Sprio's prompt-engineering rules, the guidance on this page, and best practices for voice calls are already built into this tool for you. All you need to do is describe your use case in plain, everyday language, the same way you would explain it to ChatGPT or any other AI assistant.

What You Fill In​

FieldDescription
Use CaseRequired. Describe what this agent is for in a sentence or two — e.g. "Education counsellor calling leads about a course — goal is to book a free 20-minute video call."
Merge with existing promptOnly shown if the assistant already has a Core Directive. Check this to add the new use case into your current prompt instead of replacing it — leave unchecked to start fresh
Business / Brand NameOptional. The company or brand the agent represents
ToneOptional. Pick a suggestion (e.g. Warm and confident, Professional and formal) or type your own
LanguageOptional. Which language the generated prompt should be written to use
AccentOptional. Pick a suggested accent for the voice — not shown for Sprio Voice Vaani, since that engine can't change accent via prompt. Pick an accented voice directly in Voice Library instead
warning

Each click of Generate runs an AI generation and adds a small extra cost — fill in the fields thoughtfully rather than clicking repeatedly without need.

Steps​

  1. Click Generate Prompt in the Model tab.
  2. Fill in Use Case (required) and any of the optional fields above.
  3. Click Generate. The tool combines your description with Sprio's fixed rules and any tools already connected to this assistant, and returns a complete, well-structured prompt.
  4. Review the result. Not happy with it? Click Regenerate to try again.
  5. Click Use this prompt to replace your Core Directive with it — it only applies once you click this.
tip

Always read through the generated prompt before saving it, and adjust any specific names, tone, or wording that's unique to your business. Treat the generated prompt as a strong starting point, not a final, untouched answer.

Prefer to write your own instead of using Generate Prompt? Here are two complete, ready-to-adapt system prompts that follow the writing guidelines above — short instructions, no scripted lines, and a clear scope.

Example — Hindi Customer Support​

Aap Sprio ka ek customer support agent hain.
Aapka naam Priya hai.
Sirf Hindi mein baat karein, jab tak caller English mein baat na kare.

Aapka kaam:
1. Caller ka naam poochhe.
2. Unki samasya samjhe.
3. Agar aap jawab de sakte hain, toh clearly explain karein.
4. Agar nahi, toh kehein "Main aapki call ek senior agent ko transfer kar raha/rahi hoon."

Kisi bhi offer ya discount ki baat na karein.
Haath nahi bandh karein jab tak caller keh de "shukriya" ya "theek hai".

Example — English Lead Qualification​

You are a lead qualification agent for Acme Solar.
Your name is Alex.
Speak only in English.

Your goal:
1. Ask the caller's name and city.
2. Ask if they own or rent their home.
3. Ask about their monthly electricity bill.
4. If they qualify (owner, bill > 2000 INR), say "Great! A consultant will call you within 24 hours."
5. If they don't qualify, politely end the call.

Do not discuss pricing, installation timelines, or make guarantees.

Common Patterns​

PatternHow to Write It
Persona with name"Your name is Priya. You work for Acme Corp support."
Language restriction"Respond only in Hindi, regardless of what language the caller uses."
Topic scope"Only answer questions about order status and returns. Redirect all other topics."
Escalation trigger"If the caller is angry or repeats the same issue twice, say you'll escalate."
Data collection"Ask for the customer's order ID before answering any questions."
Article reference"For return questions, follow the Return Policy article in the Knowledge Base."

Test Before You Go Live​

A generated or edited prompt should never go straight to production without being tested first. After making any change to the prompt, use the Talk to Assistant button in the assistant editor to place a few live test calls yourself.

Make sure to cover all of your real use cases during testing, not just the simplest, "happy path" conversation — for example, test what happens when the caller gives an unclear answer, changes their mind midway, asks something outside the agent's scope, or gets angry. Only once you're confident the agent handles these situations correctly should you move the assistant to real customer calls.