Learn how to write effective prompts, avoid common mistakes and optimize your AI Agent for real conversations.

In Part 1, we looked at the fundamentals of prompt engineering: writing instructions instead of prose, removing unnecessary definitions, avoiding contradictions and keeping prompts concise. In this blog, we'll go beyond prompt structure and focus on how AI models actually behave.

Understanding what a model can and can't do is just as important as knowing how to write a prompt. We'll also cover real-time voice prompting, practical testing techniques and a set of habits that can help you build more reliable 3CX AI Agents. Read on to learn more!

Know What the Model Can and Can't Do

A lot of bloat in user prompts comes from trying to fix things prompting can't fix.

Prompting is good at:

  • Setting tone, persona, and language
  • Defining the structure of a turn (e.g. "ask one question at a time")
  • Specifying when to call which tool
  • Enumerating allowed and disallowed actions
  • Recovering from specific failure modes (e.g. recognition repair, hostility)

Prompting is bad at:

  • Forcing exact phrasing across every turn. (the model will paraphrase)
  • Enforcing precise counts ("ask exactly twice, then escalate") — close, not perfect
  • Reasoning over long lists of conditional logic in a single sentence
  • Replacing missing tools - if the agent needs to look something up, give it a tool, don't describe the lookup in prose. All tools are displayed when you click the “Insert Variable” button in the AI Prompt tab.

AI Receptionist Prompts

If you find yourself writing the same rule three different ways trying to force the model to "really, definitely, always" do something, the answer is usually a tool call or a code-level guardrail — not a louder prompt. So give up, remove any extra prompts you added and contact us on the 3CX Forum.

The Realtime Difference

When you are prompting a realtime audio model, there's an extra layer: speech is not text. OpenAI publishes a Realtime Prompting Guide that is essential reading. The short version:

  • Keep sentences short. Spoken sentences read aloud at the model's pace need to land in one breath.
  • Tell it how to sound, not just what to say. "Professional, composed, calm, concise" is doing real work. So is "no routing explanation."
  • Handle the messy stuff explicitly. Background noise, partial words, interruptions, the caller saying "uh, yeah, sorry — go on." If you don't tell the model how to react, it will guess, and the guess is usually wrong.
  • One instruction per line. Voice models follow line-broken instructions more reliably than embedded clauses.

A voice prompt is even less forgiving of prose than a text prompt. Every extra word is a token the model could have spent listening.

Tips for First-Time Prompt Engineers

If this is your first time editing a 3CX system prompt, a few practical habits will save you hours:

Start from the default prompt. Don't start from scratch. The 3CX defaults have been tested and approved to work with openAI Realtime models. You almost never want to replace them — you want to add to them. Add a section. Override a specific behaviour. Leave the rest.

Change one thing at a time. If you edit five sections and the agent starts behaving oddly, you have no idea which change caused it. Make one change, test on real calls or the talk link, then make the next.

Test with realistic calls, not ideal ones. Anyone can pass a script. Test with callers who interrupt, change their mind mid-sentence, mumble a name, or ask three things at once. That's where prompt quality actually shows up.

Read your prompt out loud. Seriously. If a section is awkward to read aloud, it's awkward for the model too. Prose-heavy sections jump out immediately when you have to actually say them.

Token budget is real. Bigger prompts don't just cost more — they reduce the room available for the conversation itself. If your prompt is longer than the call usually is, something is wrong.

Don't tell the model to "be helpful" or "be polite." It already is. These instructions add nothing except length. Tell it the specific helpful or polite behaviour you want — "acknowledge the caller's frustration once before troubleshooting" — and skip the adjective.

When in doubt, delete. A shorter prompt is almost always a better prompt. If you can remove a line and the agent still behaves correctly, the line was costing you context for nothing.

The Pre-Save Checklist

Before you save a prompt, run it through this:

  1. Is every rule in exactly one place? No restatements, no near-duplicates.
  2. Are instructions positive where possible? "Do X" beats "Don't do Y, Z, or W."
  3. Could any two rules apply to the same situation and disagree? Fix it now, not in production.
  4. Are you defining anything the model already understands? Delete it.
  5. Does every sentence change what the model does? If not, delete it.
  6. Have you tokenized it? Run it through Tokenizer and look at the actual size.
  7. Have you tested with a messy call? Not just a clean one.

Knowledgebase Documents

Although not strictly a "prompt", knowledgebase documents go hand-in-hand with your prompt to give an AI Agent its persona and its, well, knowledge.

Make sure that your knowledge base documents are as clear and concise as possible for your AI Agent to work with. The gold standard for this is Markdown, and converting your already-existing document base can be handled programmatically. Microsoft's MarkItDown project is one tool you can use.

Use AI to Fix Your AI

Here's a trick worth knowing.

This blog post — and the OpenAI Realtime Prompting Guide — are both written in plain prose. That means you can save either one as a markdown file, prompt-engineering.md, and upload it to your AI agent's knowledge base as a skill.

Download the realtime-prompting.skill, and install it into your AI - typically just a drag-and-drop procedure.

Once it's there, the agent inherits the guide as expertise. You can paste your draft system prompt into a chat with that agent and ask:

"Review this system prompt against my prompt engineering skill. Flag contradictions, restatements, prose-style instructions, and unnecessary definitions. Suggest a tighter version."

And the AI will critique your prompt with the intelligence of the skill behind it — finding the kind of issues we've described above, with examples specific to your prompt.

You're using AI to fix the system prompt of another AI. This is one of the highest-leverage workflows in prompt engineering right now, and it costs you nothing to set up.

The Short Version

Write instructions, not prose. Say each rule once. Prefer positive over negative. Watch for contradictions. Use Tokenizer. Test with messy calls. Delete more than you add.

Your agent will thank you — by leaving room in the context window to actually do its job.

Editing a 3CX AI Agent prompt? Start from the default, change one thing at a time, and test against real calls. If you want to dig deeper, the OpenAI Realtime Prompting Guide is the best technical resource available right now.

Join the Discussion

Join the 3CX discussion in our dedicated Partner or Customer Forums. Follow us on X and LinkedIn to stay-up-to date on latest news and feature releases.