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

# Prompt Tuning

Identifying and fixing bugs in a prompt is simply prompt tuning.

## How to Prompt Tune

1. Go to Call History.
2. Filter out the call batch you want to analyse using the filters.
3. Select a non-converted call with a long call duration. (Long calls are not required, but we usually pick them to save time — to find out why a call did not convert even with such a long conversation.)
4. After clicking the suspicious call, Call Details will appear on the screen. Go through it and find out the reason the call did not convert.
5. If you find an issue, click the “Fine Tune Prompt” option. A new page will open.

Some common issues you might find:

* The user gives a PIN code, but instead of calling the take\_pincode\_from\_user function, the agent generates something gibberish.
* The agent calls a function when it is not supposed to.
* The agent switches language without any need.

1. Now try to identify the root cause of the issue. You can do it manually, or by giving an LLM (Claude, GPT) the full context of the call — the System Prompt, Prompt Snippets, and Call Transcript — so it is easier to spot the issue.
2. After finding the root cause, try to fix it by trial and error, by prompt tuning, or any other way. Your experience will play a major role in bug fixing.
3. To test whether your prompt tune works, hover on the plus icon under the transcript, just after the line where the issue starts. You will see 4 options:

* **Generate:** this removes all the conversation after the line where you click Generate.
* **Debug:** the main part of prompt tuning. When you click Debug, it simulates the same case 10 times and gives you the result, telling you the probability of each response if the same case happens 10 times.
* **Edit:** to edit any existing snippet as per the need.
* **Delete:** to delete any snippet for testing.

<Warning>
  **Important:** Building agents, identifying bugs, and fixing them is not an easy task — it takes experience. You should not be totally dependent on LLM models like Claude or GPT, because there is always a simple line: “Claude is AI and can make mistakes. Please double-check responses.”
</Warning>

## Tune prompts with AI FDE

<CardGroup cols={2}>
  <Card title="Choose Ask, Auto, or Plan" icon="toggle-on" href="/ai-fde/choose-a-mode">
    Use Ask to understand the problem and Plan to approve the proposed fix.
  </Card>

  <Card title="Build and Update Agents" icon="wand-magic-sparkles" href="/ai-fde/build-and-manage-agents">
    Apply an approved prompt change in a new agent version.
  </Card>
</CardGroup>
