> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 Pro (current TTS) and Pulse (current
> multilingual STT) — or Pulse 2.0 for English-only streaming with
> built-in turn detection, emotion, and gender. Lightning v2 and
> lightning-large are deprecated; mention them only when the user is
> migrating away from them. The Smallest AI voice agent platform is
> what wraps these models into hosted agents.

# Prompt Scoring

> Get instant, AI-powered feedback on your agent's system prompt quality.

## Seeing Your Score

On the **Prompt** tab of a single-prompt agent, click **Review** at the bottom of the prompt area to score the prompt. Once it's scored, the bar shows **Strong prompt** (overall grade Excellent or Good) or **Weak prompt** (Needs Work or Poor).

![Weak prompt badge with View N suggestions link](/_fern-files/_img/fa9a4f2b972e586a559a51c6b694990a8722f9415c2e5811f6ba25812fcdac04.webp)

Click **View N suggestions** (or **View analysis** when there are none) to open the analysis panel. If you edit the prompt after scoring, run the review again to refresh the score.

## The Analysis Panel

The panel shows your prompt on the left and the findings on the right. Each finding card names a check, suggests a fix, and shows its level: **Needs attention**, **Can improve** or **Looks good**. Use the filter buttons above the cards (**All**, **Needs attention**, **Can improve**, **Looks good**) to narrow the list.

![Prompt analysis panel](/_fern-files/_img/e608a4e693f8852a305f83e7c3c55726ef1407c869d742fdd54e4406c887b8f3.webp)

| Panel field                     | What it means                                                          |
| ------------------------------- | ---------------------------------------------------------------------- |
| **Overall grade**               | Numeric score (0–100) and label - Excellent / Good / Needs Work / Poor |
| **Estimated latency**           | Estimated time-to-first-token overhead added by your prompt length     |
| **Weak prompt / Strong prompt** | Summary label derived from the overall score                           |
| **Low / Normal / High latency** | Token-density band for the current prompt                              |

## How Scoring Works

Each time you request a score, Atoms sends your prompt through two sequential Gemini passes - a Platform Analyst pass and a Rubric Judge pass - and returns scores for 11 dimensions grouped into three priority tiers.

### Tiers and dimensions

#### Tier 1 - Core (highest priority)

| Dimension                  | What is checked                                                           |
| -------------------------- | ------------------------------------------------------------------------- |
| **Role & Objective**       | Is the agent's purpose and scope clearly defined?                         |
| **Personality & Voice**    | Are tone and style specified with concrete guidance, not just adjectives? |
| **Conversation Structure** | Are there explicit flow phases and exit criteria?                         |
| **Tool Integration**       | Are all referenced tools declared, with failure paths covered?            |
| **Constraints & Safety**   | Are safety rules, escalation paths, and hard limits spelled out?          |

#### Tier 2 - Quality

| Dimension                      | What is checked                                                                |
| ------------------------------ | ------------------------------------------------------------------------------ |
| **Conversational Naturalness** | Do examples demonstrate flexible, natural responses rather than rigid scripts? |
| **Failure-Mode Coverage**      | Are error handling and unclear-input scenarios addressed?                      |

#### Tier 3 - Integrity (gating)

| Dimension                   | What is checked                                                         | Gate                                  |
| --------------------------- | ----------------------------------------------------------------------- | ------------------------------------- |
| **Information Integrity**   | Does the prompt avoid hallucination risk and ground the agent in facts? | Score capped at 70 if Weak or Missing |
| **Variable & Tool Hygiene** | Are all variables and tools consistently declared and used?             | Score capped at 50 if Weak or Missing |
| **Internal Consistency**    | Does the prompt contradict itself anywhere?                             | -                                     |
| **Density**                 | Is the prompt the right length for what it needs to do?                 | Computed from token analysis          |

Each dimension is rated **Strong**, **Adequate**, **Weak**, **Missing**, or **Not Applicable**.

## Quality Levels and Token Bands

### Grade thresholds

| Score  | Grade      |
| ------ | ---------- |
| 90–100 | Excellent  |
| 75–89  | Good       |
| 50–74  | Needs Work |
| 0–49   | Poor       |

### Token density bands

The **Estimated latency** figure and the density band are derived from your prompt's token count.

| Band       | Token range          | Latency impact |
| ---------- | -------------------- | -------------- |
| Lean       | Fewer than 4K tokens | Very low       |
| Normal     | 4K–9.9K tokens       | Low            |
| Heavy      | 10K–14.9K tokens     | Moderate       |
| Overweight | 15K or more tokens   | High           |

> **Tip**
>
> For voice agents, aim for the **Normal** band. Heavy and Overweight prompts increase first-token latency, which makes responses feel slower to callers.

## Scoring via API

You can trigger scoring programmatically against a published version or a draft. Each call deducts **1 credit**. Re-submitting an unchanged prompt returns a `400` - retrieve the cached result via `GET /agent/{id}` instead.

```bash
# Score a published version
curl -X POST https://api.smallest.ai/atoms/v1/prompt-scoring/score \
  -H "Authorization: Bearer $SMALLEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"versionId": "6a1589b75e048394eb37bc47"}'

# Score a draft
curl -X POST https://api.smallest.ai/atoms/v1/prompt-scoring/score \
  -H "Authorization: Bearer $SMALLEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"draftId": "6a1589b75e048394eb37bc48"}'
```

The response includes `overall_score`, `overall_grade`, `band`, `estimated_ttft_overhead_ms`, and a `dimensions` array with one entry per scored dimension.

> **Note**
>
> Prompt scoring is only supported for **single-prompt agents**. Conversational flow (workflow-graph) agents return a `400`.

→ [Full API reference](/api-reference/voice-agents/prompt-scoring/score-a-prompt)

## Related

#### [Prompt](/voice-agents/build/prompt)

Best practices for structuring your system prompt

#### [Agent Versioning](/voice-agents/build/versioning)

Publish and manage agent versions safely