Writing the System Prompt
This is the single most important thing you'll do. A great prompt = a great agent.
The system prompt is a paragraph (or two, or three) telling your AI what to do. Everything else — voice, tools, channels — is configuration. The prompt is the actual brain.
If your bot does weird things, 99% of the time the fix is to rewrite the prompt.
The minimum viable prompt
You are <NAME>, a <ROLE> at <COMPANY>.
Your job:
1. Greet the caller warmly
2. <WHAT_TO_DO>
3. Hang up politely when done
Rules:
- Keep replies under 2 sentences
- Never make up facts you don't know
- If you can't help, say so honestlyThat's the skeleton. Fill in the angle-bracket parts and you have a working agent.
A real working example
You are Priya, the receptionist at Greenleaf Dental Clinic in Mumbai.
We're open Mon-Fri 9 AM to 7 PM IST.
Your job:
1. Greet the caller and ask how you can help
2. If they want an appointment, ask for:
- Their name
- Their phone number
- Reason for the visit (cleaning, root canal, emergency, other)
- Preferred date and time (we have slots every 30 minutes)
3. Confirm the booking by repeating it back
4. End the call by saying "We'll see you then. Have a good day."
Special rules:
- If they say "emergency" or "in a lot of pain", ask them to come within 30 minutes
- If they want a doctor by name, we have Dr. Aisha (general) and Dr. Rohan (root canal)
- If they ask about price, say "₹500 for cleaning, ₹3000 for root canal, others vary — we'll confirm at the visit"
- If they say they're calling from outside Mumbai, say "We only serve patients in Mumbai for in-person visits, but we can do a video consultation"
- If they ask anything unrelated to dental care, politely redirect
Speak warmly but stay concise. Don't repeat the same phrase twice in a row.That's it. Paste that into the system prompt, and your agent works.
The 7 rules of good prompts
1. Start with the role
You are <name>, a <role> at <company>.The model needs to know what hat to wear. Without this, it defaults to a generic ChatGPT-like assistant — bad.
2. Use numbered steps for workflows
Bad:
Help customers book appointments, take their information, confirm the slot.
Good:
- Ask why they're calling.
- If they want an appointment, ask for name, phone, reason, date/time.
- Confirm by repeating the booking back.
- Say goodbye politely.
LLMs follow numbered steps much more reliably than prose.
3. Tell it what NOT to do (negative rules)
Bad:
Be helpful and accurate.
Good:
- Never invent prices, dates, or names. If you don't know, say "I'll need to check that and call you back."
- Don't repeat the same phrase twice in a row.
- Don't say "let me check" — you can't check; just answer or escalate.
Negative rules prevent the most embarrassing failures.
4. Add example dialogues for tricky cases
Example handling of "How much does it cost?":
USER: How much for a cleaning?
YOU: For a standard cleaning it's ₹500. If you'd like to book, what date works?The model copies the pattern. If you don't show it, it improvises.
5. Keep it SHORT
A 5,000-word prompt:
- Costs 5x more per call
- Adds 200-400ms latency on every turn
- Confuses the model (more rules = more conflicts)
Aim for under 800 words. If you're past 1,500, your prompt has redundancy.
6. Don't tell it the channel it's on (osmTalk handles that)
You don't need to say "This is a phone call, so don't use bullet points." osmTalk automatically appends:
- TTS rules (no emojis, no markdown, no special characters)
- Channel info (phone vs web vs WhatsApp)
- Language rules (respond in user's language)
Trust the system. Focus on the business logic.
7. Test, observe, edit
Write v1. Make a test call. The bot does something wrong. Read the transcript. Add a rule to the prompt that fixes it. Test again.
Most prompts are right by version 3.
Personalize per-call with {{variables}}
You can put placeholders in the prompt that get filled in at call time:
You are calling {{first_name}} about their {{order_id}} order.When you start the call, you pass { first_name: "Arjun", order_id: "ORD-1234" } and the bot speaks the real values. Full guide: Dynamic Variables.
This is how outbound campaigns personalize 10,000 calls without 10,000 prompts.
The welcome message
The first thing the bot says when a call starts. It speaks this BEFORE the caller says anything.
| Good | Bad |
|---|---|
| "Hi, this is Priya from Greenleaf Dental. How can I help?" | "Hello user, welcome to my service." |
| "Hello! Thanks for calling osmTalk support. What's going on?" | "Greetings. I am an AI assistant designed to help you." |
Keep it under 15 words. Sound like a human picking up the phone, not a IVR menu.
Language setting
Pick the primary language the bot will hear and speak. osmTalk supports:
| Language | Best STT to pair with | Best TTS voice |
|---|---|---|
English (en) | Deepgram nova-3-general | Deepgram Helena / ElevenLabs Sarah |
Hindi (hi) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Tamil (ta) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Telugu (te) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Kannada (kn) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Malayalam (ml) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Marathi (mr) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Bengali (bn) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Gujarati (gu) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Punjabi (pa) | Sarvam saaras:v3 | ElevenLabs Multilingual |
Multilingual (multi) | Deepgram nova-3 | ElevenLabs Multilingual |
If your callers might mix English and Hindi mid-sentence ("aap kaise hain, tomorrow ka appointment chahiye"), pick multi.
Common prompt mistakes
| Mistake | What goes wrong | Fix |
|---|---|---|
| Too vague ("be helpful") | Bot gives generic, off-topic answers | Add numbered steps |
| Too long (3000+ words) | Bot ignores rules, slow responses | Cut everything that's not load-bearing |
| Tells the user how the AI thinks | Bot mentions it's "an AI" mid-conversation | Talk about the role, not the model |
| Markdown in the prompt | Bot speaks "asterisk asterisk" | Keep prompt in plain text |
| Tells the bot to "ask clarifying questions" | Bot interrogates everyone | Be specific about WHEN to clarify |
| No name | Bot answers "Hello, this is your AI assistant" | Always set a name |
When to escalate to a human
Add this to almost every prompt:
If the caller:
- asks for a human or supervisor
- sounds upset, frustrated, or distressed
- asks a question you don't have information for
then say "Let me get someone who can help" and call the transfer_to_human tool.The transfer_to_human tool is built in. Just configure the destination phone number under Configure → Tools → Call Transfer.
More
- Voice settings — pick the right voice for the language
- Tools & actions — let the bot call your API, book on a calendar
- Dynamic variables — personalize each call
- Post-call analysis — auto-extract structured data after every call