REDA One Help Center
EN
Language
English EN Español ES Português PT Italiano coming soon Français FR Deutsch coming soon العربية coming soon
reda.one ↗
Home / REDA AI / Prompt Management / Prompt Quality Analyzer

Prompt Quality Analyzer

AI funding and usage

AI included uses REDA credits. Bring your own AI uses your organisation’s provider account, billed directly by that provider. The licence selects one funding model for the organisation. In either model, REDA AI governs configured tools and actions in Salesforce. Set up your licence and AI accounts.

In customer-account mode, the selected model determines which Deep Reasoning levels and capabilities are available. Review the AI Account selector’s supported levels and warnings; do not assume every provider supports the same combination. Admin AI tools and document processing use the organisation default connection. Configure the default and test the workflow.

Static Quality Analysis Every Custom Prompt is scored against seven deterministic heuristics on save — no model call, no credits, no waiting. The score and the specific issues are persisted on the prompt record so you can see at a glance which prompts are dragging your agent down.

What the Analyzer Does

The Quality Analyzer is a static-analysis engine that reads the prompt content, computes an actual token count, runs seven heuristics over it, and returns:

  • A quality score from 0 to 100 (starts at 100, deductions applied per failed check)
  • An actual token count estimate, useful for spotting prompts that are larger than admins realise
  • An estimated cost per request in REDA AI credits
  • A compression ratio comparing the actual token count to the prompt’s configured Complexity Estimate
  • A list of issues with type and message for each failed check

Results are stored on the Custom Prompt record itself, so the score and issues stay visible without re-running anything.

The Seven Heuristics

Every prompt starts at 100 and each triggered check subtracts from it. Token counts are approximated as words × 1.3, so treat them as close rather than exact. A score below 50 means there is significant room to improve.

Check What it flags Fires when Score impact
LONG The prompt is excessively long. More than 1,000 tokens −20
VERBOSE The prompt contains filler phrases like “please make sure to…” or “it is important that you…” that add tokens without adding meaning. Each verbose phrase found −5 each
REDUNDANT The prompt repeats core instructions REDA AI already enforces — “be concise”, “never fabricate”, “use tools first”, etc. Duplicates REDA AI’s core instructions −15
UNSTRUCTURED The prompt is long enough to deserve markdown headers or bullets but has none. More than 200 tokens with no headers or bullets −10
EXAMPLE_HEAVY The prompt leans on too many inline examples instead of clear instructions. More than 3 examples or e.g. instances −10
ESTIMATE_MISMATCH The actual token count is significantly higher or lower than the Complexity Estimate the admin configured for the prompt. Compression ratio above 1.5 or below 0.5 −10
NO_SECTIONS The prompt is long enough to need ## headers but has none. More than 100 tokens with no section headers −5

The score is shown on every Custom Prompt record. Multiple checks can fire on the same prompt — lower scores indicate more room to improve.

Why these rules?

Each heuristic targets a real anti-pattern that costs tokens or muddies agent behaviour:

  • LONG — Above ~1,000 tokens, returns on prompt content drop sharply. The model already has its instructions; long prompts stop adding value.
  • VERBOSE — Filler phrasing wastes tokens and dilutes signal. “Please make sure to be concise” is two issues at once.
  • REDUNDANT — Telling the model what REDA AI’s built-in framing already tells it adds tokens without changing behaviour.
  • UNSTRUCTURED / NO_SECTIONS — Long unstructured walls of text are harder for the model to navigate. Headers and bullets dramatically improve recall.
  • EXAMPLE_HEAVY — A few well-chosen examples help; many examples become noise that overwhelms the rule they’re illustrating.
  • ESTIMATE_MISMATCH — If your configured Complexity Estimate is far off the actual count, downstream budget calculations are wrong.

When It Runs

Analysis runs in two situations:

  • On every save. A trigger on the Custom Prompt object analyses each record on insert and update. The score and issue list are persisted before the save completes.
  • On demand. The Prompt Builder UI calls the analyser whenever you open or edit a prompt, so you see the live score as you type.
  • In bulk. Re-analysing a batch of prompts — e.g. after adding a new redundant phrase to the detector list — is a single Apex call.

All three paths are free. The analyser doesn’t call the model.

Reading the Results

On any Custom Prompt record you’ll find:

  • Quality Score — the 0–100 number
  • Actual Complexity — the measured complexity of the prompt’s content, computed on analysis
  • Internal: Est. Cost Per Request — credits this prompt consumes each time it is included in a turn. The label carries an Internal: prefix, but the field is readable and editable on the REDA AI Admin permission set
  • Compression Ratio — actual / configured Complexity Estimate; values close to 1.0 mean the estimate is accurate
  • Quality Issues — the triggered checks, stored as JSON, each naming an optimisation opportunity: verbosity, redundancy, poor structure, missing headers, excessive examples, or an estimate that does not match the measured complexity
  • Last Analyzed — when the analysis last ran, so you can tell a stale score from a current one

In the Prompt Builder, the same data is visible in a quality panel alongside the editor — updating in real time as you type.

Token Estimation

The analyser produces a quick token estimate that’s good enough to spot oversized prompts and budget mismatches at design time. For exact, model-accurate token counts, look at the Conversation Debugger after a real run.

What the Analyzer Does Not Do

  • It doesn’t check semantics. A prompt with a perfect score can still be wrong — bad instructions, contradictory rules, missing guardrails. The analyser only catches mechanical issues.
  • It doesn’t detect conflicts across prompts. Two prompts that contradict each other will both score 100 if each is individually clean. For cross-prompt conflict detection, see the configuration conflict report in Agent Runtime Preview.
  • It doesn’t suggest fixes. The analyser tells you what’s wrong; the Prompt Optimizer is the AI-assisted feature that proposes specific improvements.

Best Practices

Aim for 90+, not 100. A prompt scoring 100 is often shorter than it needs to be. The score is a guide; a few intentional deductions are fine if the prompt earns them.

Watch the compression ratio. If actual tokens are wildly different from your Complexity Estimate, downstream budget calculations are off. Update the estimate or trim the prompt.

Strip filler aggressively. The VERBOSE check is the single biggest tax most prompts can dodge. “Please make sure to do X” is “Do X”.

Use headers for any prompt over a paragraph. Even two ## sections improve readability and score.

Trust the model on basics. Modern models default to concise, factual responses. Telling them to “never fabricate” in every prompt is REDUNDANT — reach for that instruction only when you’ve seen real failures.

Frequently Asked Questions

No. It’s pure Apex with no model call. Save as often as you like.

The structural checks (LONG, UNSTRUCTURED, NO_SECTIONS, EXAMPLE_HEAVY, ESTIMATE_MISMATCH) work in any language. The verbose-phrase and redundant-phrase pattern matchers are English-only — non-English prompts won’t trigger those checks. The actual-token estimate is also less precise for non-English content.

You can. The score is advisory. A prompt with a few deliberate deductions is still better than a prompt that scores 100 by skipping necessary content.

Absolutely. The analyser only catches mechanical anti-patterns, not whether the instructions are correct. For real-world quality assessment, run the agent in conversations and inspect with the Conversation Debugger.

The displayed cost is computed using your org’s active licence. Different licences may produce different displayed costs for the same prompt content.

Open each prompt and save it — the trigger re-analyses on every save — or run a small Apex script that fetches the records and calls the bulk-analysis method. The scores update without consuming credits.

Next Steps

Use the Prompt Optimizer to get AI-assisted rewrites for prompts the analyser flagged, or browse the Prompt Template Gallery for reusable starting points.