> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ringg.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To search or read these docs, connect the Ringg docs MCP server at https://docs.ringg.ai/mcp (no key needed; tools search_ringg_ai and query_docs_filesystem_ringg_ai) instead of browsing pages one by one. Setup for each client: https://docs.ringg.ai/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants.md
> The dashboard labels agents "Assistants"; these docs say "agent". Both mean the same object, identified by agent_id.
> API base URL: https://prod-api.ringg.ai/ca/api/v0. Send the workspace API key in the X-API-KEY header, from server-side code only.
> Placing a call dials a real phone number and spends credits. Confirm the number with the user before calling.
> To act on a Ringg workspace (place calls, edit agents, read transcripts), use the separate Ringg workspace MCP server at https://mcp.ringg.ai/mcp: https://docs.ringg.ai/resources/mcp-server/workspace-mcp-server/overview.md

# Lesson: Fix the prompt

> Turn one problem seen in Logs and Evals into a single prompt change on a new version of the EMI reminder agent, hear it, then split traffic and finalize.

export const Quiz = ({question, answers, correctFeedback, incorrectFeedback}) => {
  const [selected, setSelected] = React.useState(null);
  const [checked, setChecked] = React.useState(false);
  const quizId = React.useId();
  const isCorrect = checked && answers[selected]?.correct;
  const reset = () => {
    setSelected(null);
    setChecked(false);
  };
  const optionStyle = (answer, i) => {
    const base = {
      display: "flex",
      alignItems: "flex-start",
      gap: "0.6rem",
      padding: "0.6rem 0.8rem",
      marginTop: "0.5rem",
      borderRadius: "0.6rem",
      border: "1px solid rgba(128, 128, 128, 0.35)",
      cursor: checked ? "default" : "pointer",
      lineHeight: 1.45
    };
    if (checked && answer.correct) {
      return {
        ...base,
        borderColor: "rgba(22, 163, 74, 0.8)",
        background: "rgba(22, 163, 74, 0.12)"
      };
    }
    if (checked && selected === i && !answer.correct) {
      return {
        ...base,
        borderColor: "rgba(220, 38, 38, 0.8)",
        background: "rgba(220, 38, 38, 0.1)"
      };
    }
    if (!checked && selected === i) {
      return {
        ...base,
        borderColor: "currentColor",
        background: "rgba(128, 128, 128, 0.12)"
      };
    }
    return base;
  };
  const buttonStyle = disabled => ({
    marginTop: "0.9rem",
    padding: "0.45rem 0.9rem",
    borderRadius: "0.5rem",
    border: "1px solid rgba(128, 128, 128, 0.5)",
    background: "rgba(128, 128, 128, 0.1)",
    color: "inherit",
    font: "inherit",
    fontSize: "0.9em",
    cursor: disabled ? "not-allowed" : "pointer",
    opacity: disabled ? 0.5 : 1
  });
  return <div style={{
    marginTop: "1.5rem",
    padding: "1rem 1.1rem",
    borderRadius: "0.8rem",
    border: "1px solid rgba(128, 128, 128, 0.35)"
  }}>
      <Badge color="green">Quiz</Badge>
      <p id={quizId + "-question"} style={{
    fontWeight: 600,
    margin: "0.6rem 0 0.2rem"
  }}>
        {question}
      </p>
      <div role="radiogroup" aria-labelledby={quizId + "-question"} aria-disabled={checked}>
        {answers.map((answer, i) => <label key={i} style={optionStyle(answer, i)}>
            <input type="radio" name={"quiz-" + quizId} checked={selected === i} onChange={() => !checked && setSelected(i)} disabled={checked} style={{
    marginTop: "0.3rem",
    flexShrink: 0
  }} />
            <span>{answer.text}</span>
          </label>)}
      </div>
      {checked && <div role="status" aria-live="polite" aria-atomic="true" style={{
    marginTop: "0.9rem",
    padding: "0.7rem 0.9rem",
    borderRadius: "0.6rem",
    lineHeight: 1.5,
    background: isCorrect ? "rgba(22, 163, 74, 0.12)" : "rgba(220, 38, 38, 0.1)"
  }}>
          <strong style={{
    marginRight: "0.4rem"
  }}>{isCorrect ? "✓" : "✗"}</strong>
          {isCorrect ? correctFeedback : incorrectFeedback}
        </div>}
      {!checked ? <button type="button" onClick={() => selected !== null && setChecked(true)} disabled={selected === null} style={buttonStyle(selected === null)}>
          Check answer
        </button> : <button type="button" onClick={reset} style={buttonStyle(false)}>
          Try again
        </button>}
    </div>;
};

export const RelatedTopics = ({items}) => <div className="not-prose mt-12">
    <div className="text-sm font-medium text-gray-500 dark:text-zinc-400 mb-3">Related topics</div>
    <div className="flex flex-col gap-2.5">
      {items.map(([title, href]) => <a key={href} href={href} className="flex items-center gap-2.5 text-sm text-gray-700 hover:text-gray-950 dark:text-zinc-300 dark:hover:text-white">
          <Icon icon="file-text" size={16} color="currentColor" />
          {title}
        </a>)}
    </div>
  </div>;

**Part 6: Measuring and improving your agent · Lesson 4 of 4 · 20 minutes**

## Objective

Change one thing in Ananya's prompt because the calls showed it was needed, ship it as a version, and know when to send it all the traffic.

## The scenario

Suppose the dry-run transcripts show Ananya reading `₹4,500` as "four comma five zero zero" and `15 October` as "fifteen ten", and Evals flags it under **Instruction following**. One rule in the prompt fixes it. It goes on a new version so **A/B Analytics** can show whether it helped.

## Hands-on

<Frame caption="Adding a version and splitting traffic in the dashboard">
  <video alt="Adding a version and splitting traffic in the dashboard" aria-label="Adding a version and splitting traffic in the dashboard" controls muted playsInline className="w-full rounded-xl" style={{ aspectRatio: "16 / 10" }} preload="metadata" controlsList="nodownload noremoteplayback" poster="/media/agents-versions/poster.webp">
    <source src="https://mintcdn.com/ringgai-0da73d20/zhzhS2waLZvF8qXk/media/agents-versions/video.webm?fit=max&auto=format&n=zhzhS2waLZvF8qXk&q=85&s=6bab2eafdf725b8a06996fb587015463" type="video/webm; codecs=&#x22;av01.0.09M.08&#x22;" data-path="media/agents-versions/video.webm" />
  </video>
</Frame>

<Steps>
  <Step title="Pick one problem">
    Open the transcript in Logs or the issue card in Evals, and choose one thing to change. A version that changes three things at once tells you nothing about which one worked.
  </Step>

  <Step title="Choose the fix from the voice rules">
    The [voice prompt rules](/documentation/build-agents/customize-agent-behaviour/agent-prompt#write-prompts-for-voice) list the usual culprits: long turns, several questions at once, no script for "no" or "call me later", no way to end, numbers read as written. Add this rule: `Say amounts in words, in rupees: ₹4,500 is "four thousand five hundred rupees". Say dates as "15 October", never "15/10".`
  </Step>

  <Step title="Add a version for it">
    Open **EMI reminder - Hindi**. **Create Versions** is on from part 5, so the version bar shows **V1** and **V2**. Click **+** and pick the **Base** version to copy, the one that did better in lesson 2. The new **V3** appears with a red dot: 0% traffic.
  </Step>

  <Step title="Edit and save V3">
    Click **V3** to switch to it, open **Prompt**, and paste the rule into **Response Guidelines**. Click **Save** or press Cmd/Ctrl+S: "Changes saved successfully". Add notes from V3's menu: `Amounts and dates in words`.
  </Step>

  <Step title="Hear it before it has traffic">
    To be sure a call runs V3 while it still has 0% traffic, copy V3's version ID from its menu and pass it as `version_id` on [Initiate Individual Call](/documentation/build-agents/test-and-improve/drafts-and-versions#call-a-specific-version-with-the-api), with `due_amount` `₹4,500` and `due_date` `15 October` in `custom_args_values`. Listen for the amount.
  </Step>

  <Step title="Give it traffic">
    Split the traffic as in [part 5, lesson 3](/resources/learn/designing-multi-step-conversations/versions-and-a-b): 70% on the current winner, 30% on V3. Once V3 is ahead in **A/B Analytics**, click **Finalize** in the sidebar row **A/B Tests Live!**, select V3 and **Confirm & Finalize**: all traffic goes to V3 and A/B testing turns off.
  </Step>
</Steps>

## Checkpoint

<Check>
  The version bar shows **V3** with a green dot and its share. New calls in Logs carry a version chip in the **Assistant** column.
</Check>

## Exercise

In Evals, open the test case from lesson 3 and click **Run again**. Expected result: the new run's detail names which agent version ran and when it was published, so a pass is tied to V3.

## What you learned

* One change per version, so **A/B Analytics** can attribute the difference.
* The voice rules to reach for first: how to say amounts and dates, short turns, scripted "no" and "call me later", and how to end.
* **Finalize** is the end of a test: all traffic to the winner, A/B testing off.

<Quiz
  question="The transcripts show two problems: amounts read as digits and a first message that runs long. You want to know which fix helps. How do you ship them?"
  answers={[
{ text: "Both on V3, then split traffic; A/B Analytics attributes each", correct: false },
{ text: "One change per version: V3 for the number rule, a later version for the opening", correct: true },
{ text: "Both on V1 directly, since Save goes live at once", correct: false },
{ text: "Both on V3 with 100% traffic, to see the effect sooner", correct: false },
]}
  correctFeedback="Right. A version that changes three things at once tells you nothing about which one worked. One change per version, a 70/30 split and A/B Analytics attribute the difference; Finalize once a winner is clear."
  incorrectFeedback="Not quite. A/B Analytics compares versions, not individual edits, so two changes on one version cannot be told apart. Ship one change per version, give it a share of traffic, and finalize the winner."
/>

<RelatedTopics items={[["Write the prompt", "/documentation/build-agents/customize-agent-behaviour/agent-prompt"], ["Drafts and versions", "/documentation/build-agents/test-and-improve/drafts-and-versions"]]} />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.