Home/Help Center/AI debugger

Automation

Use the AI Debugger

Test your system prompt's token usage before it ships, using the AI Context Debugger under Settings to see exactly how much of the model's window it consumes.

By Chirag Darji · Updated 27 Aug 2026 · 7 min read

On this page
  1. Before you start
  2. Steps
  3. What you will see
  4. Settings and options
  5. Troubleshooting
  6. Related reading
Chat widget setup in VGraple CRM: appearance, welcome message, position and AI settings

The AI Context Debugger, under Settings, lets you paste a system prompt and a test question and see exactly how many tokens it costs, whether it fits comfortably inside the model's context window, and what the model actually replies. It is a token and prompt-testing tool, not a live replay of a real customer conversation.

AI debugger: first 5 of 6 steps

  1. 1Open Settings, then find the AI Context
  2. 2Paste your full system prompt
  3. 3Enter a test question
  4. 4Choose a provider to test with
  5. 5Click Run Context Test
The steps on this page, in order.

Before you start

  • The debugger needs the AI Assistant plan feature (Growth and above, or grandfathered) and at least one of an OpenAI or Anthropic key configured in Settings, then AI & Flows. It does not test with Groq.
  • It does not automatically pull in your knowledge base content or a real conversation's history; you paste in exactly what you want tested, nothing more.
  • Use it before shipping a long or complex system prompt, particularly one built for the AI Response flow node or the website chat widget, to catch a prompt that is unexpectedly large before customers ever see it.
  • Only Owner and Admin roles typically reach Settings pages that touch AI configuration; if you cannot see the debugger, check your role's access.
  • The tool tests the prompt in isolation, on a single question with no conversation history behind it, so it will not reproduce every nuance of a multi-turn conversation exactly. Treat its numbers as a strong signal, not a guarantee of identical behavior in production.

Steps

  1. Open Settings, then find the AI Context Debugger page. It shows a warning if no AI key is configured yet, with a direct link to add one.

AI and flows settings in VGraple CRM with provider keys and the Cron secret

  1. Paste your full system prompt into the System Prompt field. The field shows a live estimated token count as you type or paste, before you even run the test.
  2. Enter a test question, or use the default "Hello, what can you help me with?" if you just want a general check.
  3. Choose a provider to test with. OpenAI (GPT-4o Mini) and Anthropic (Claude Haiku) are the two options; whichever has no key configured is greyed out.
  4. Click Run Context Test. The tool sends your prompt and question to the real provider and reports back actual, not estimated, token usage.
  5. Read the verdict banner and stats. It reports the percentage of the model's context window used, the exact prompt and completion token counts, and the model's actual reply text.

A real-estate agency that has been adding rules to its AI Response node's system prompt for months, one edge case at a time, is a good example of when this tool earns its place: what started as 200 words describing the business can quietly grow into several thousand words of accumulated instructions. Pasting the current prompt into the debugger before adding one more rule shows whether it is still comfortably small, or whether it is time to trim before the next customer conversation pays for it in latency and cost.

What you will see

A short, focused system prompt returns a verdict like "Context is short, AI receives 100% of your prompt every time," with a low percentage bar. A very long prompt, built up over months of additions, might return "Context is very large, consider trimming your system prompt," with the percentage bar most of the way full. Either way, you get the model's actual reply to your test question underneath the stats, so you can judge the prompt's quality at the same time as its size.

The stats grid breaks the total down into four figures: the estimated system prompt tokens and question tokens (calculated before the API call, from a rough character count), and the actual prompt tokens and response tokens (reported back by the provider itself after the call completes). Comparing the estimated and actual prompt figures is a useful sanity check on its own, since a large gap between them usually means the character-based estimate undercounted something, most often a prompt with a lot of non-English text or unusual formatting.

Settings and options

Setting or fieldWhat it doesDefault
System PromptThe full prompt text to test; shows a live estimated token count as you typeEmpty
Test QuestionThe question sent alongside the system prompt"Hello, what can you help me with?"
ProviderOpenAI (GPT-4o Mini, 128,000-token window) or Anthropic (Claude Haiku, 200,000-token window)Whichever provider has a key configured; OpenAI preferred if both do
Context used percentageActual prompt tokens divided by the selected model's context windowCalculated per test run
Verdict messageA plain-language read of whether the prompt fits comfortably, is large, or should be trimmedCalculated per test run

Troubleshooting

SymptomLikely causeFix
Both provider buttons are greyed outNo OpenAI or Anthropic key is configured for the organisationAdd at least one in Settings, then AI & Flows; the debugger does not test with Groq
Run Context Test does nothingNo system prompt was entered, since a blank prompt has nothing to measurePaste your system prompt into the field before running the test
The debugger's reply does not match what a real flow's AI Response node said for the same promptThe debugger does not include your knowledge base content or conversation history; a real flow turn includes retrieved chunks the debugger never seesPaste the retrieved knowledge base content into the System Prompt field alongside your instructions to approximate a real turn more closely
The page says AI Assistant is not availableThe organisation is below the Growth plan and not grandfatheredUpgrade the plan, or confirm grandfathered status if your organisation had a key configured before the gate shipped
The token count feels too high for a short-looking promptEstimated counts use a rough character-to-token ratio before the real test runs; the actual count reported after Run Context Test is provider-measured and more accurateTrust the post-run "actual" figures over the pre-run estimate shown while typing

If a bot's system prompt seems too large or is producing inconsistent answers, use this tool before assuming a deeper problem; if the bot is not answering at all, the cause is more likely one of the gates covered in AI on but not replying than a prompt-size issue.

Frequently asked questions

What exactly does the AI debugger test?
It takes a system prompt and a test question you paste in, sends both to a real AI provider, and reports back the actual token counts used, the model's context window size, and the resulting reply. It is a token-usage and context-fit test, not a replay of a real customer conversation.
Does the AI debugger show me the knowledge base chunks a real conversation retrieved?
No. The debugger tests only what you paste into it; it does not pull in your knowledge base sources or replay retrieved context from a real chat. To see what a real turn actually retrieved, you would need to reconstruct the system prompt and knowledge base content by hand and paste them in yourself.
Which AI providers can I test with?
OpenAI (GPT-4o Mini) and Anthropic (Claude Haiku) from the debugger's own buttons. Whichever provider has no key configured shows as greyed out and disabled until you add one in Settings, then AI & Flows.
What plan does the AI debugger need?
The AI Assistant plan feature, available on Growth and above, or grandfathered if your organisation had a provider key configured before the gate shipped. It is the same gate that covers reply suggestions, conversation summaries, and the website widget's AI.
What does the "context used" percentage actually mean?
The percentage of the selected model's total context window (128,000 tokens for GPT-4o Mini, 200,000 for Claude Haiku) consumed by your system prompt plus the test question, calculated from the provider's own reported token usage, not an estimate.
My system prompt is short but the debugger still warns about size. Why?
It probably is not warning; the verdict message only escalates in tone once your prompt tokens climb past roughly 10,000, and turns into an explicit trim suggestion past about 80,000. A short prompt should show the "short, receives 100%" message with no warning tone at all.
Can I use this tool to test an AI Response flow node's actual prompt?
Yes, indirectly. Copy the exact system prompt text from the flow node's settings and paste it into the debugger's System Prompt field to see its token footprint and get a sample reply from the same underlying models the node itself can use.

Run your WhatsApp on VGraple CRM

Free forever plan, official Meta WhatsApp Business API, set up in 15 minutes. No card needed.