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

# Quick Start: Simulation

> Run your first AI agent simulation in Netra. Set up multi-turn conversations with a simulated user to test agent behavior before going to production.

This guide walks you through setting up [simulations](/Simulation/Simulation-overview) to test your AI agents in realistic, goal-oriented conversations.

## 1. Prerequisites

Before setting up simulations, ensure you have:

* [Netra SDK installed and initialized](/quick-start/Overview)
* Your API key configured

## 2. Configure Evaluators

[Evaluators](/Simulation/Evaluators) assess the entire simulated conversation after it completes. Netra provides 8 library evaluators in two categories:

**Quality** (6 evaluators): Guideline Adherence, Conversation Completeness, Profile Utilization, Conversational Flow, Conversation Memory, Factual Accuracy

**Agentic** (2 evaluators): Goal Fulfillment, Information Elicitation

All evaluators use LLM-as-Judge with a default pass threshold of >= 0.6.

<Tip>Start with Goal Fulfillment and Factual Accuracy as your core evaluators, then add more as needed. You can also create custom evaluators before setting up your dataset.</Tip>

## 3. Create a Multi-Turn Dataset

[Datasets](/Simulation/Datasets) define the scenarios you want to test—multi-turn conversations with specific goals.

<Steps>
  <Step title="Navigate to Datasets">
    Go to **Evaluation → Datasets** and click **Create Dataset**.
  </Step>

  <Step title="Configure Basics">
    * **Name**: "Customer Refund Scenarios" - **Type**: Select **Multi-turn** -
      **Data Source**: **Add manually** - Click **Next**
  </Step>

  <Step title="Configure Scenario">
    Define your simulation scenario:

    | Field             | Value                                                                               |
    | ----------------- | ----------------------------------------------------------------------------------- |
    | **Scenario Goal** | "The customer wants to get a refund for a product that arrived damaged 15 days ago" |
    | **Max Turns**     | 5 (recommended for support scenarios)                                               |
    | **User Persona**  | Frustrated 😤 (tests patience and de-escalation)                                    |
    | **Provider**      | OpenAI                                                                              |
    | **Model**         | GPT-4.1 (for realistic user simulation)                                             |

    Click **Next**
  </Step>

  <Step title="Add User Data & Facts">
    Provide context and success criteria:

    **Simulated User Data** (JSON format):

    ```json theme={null}
    {
      "order_number": "ORD-123456",
      "purchase_date": "2024-01-15",
      "product_name": "Wireless Headphones",
      "order_total": "$129.99"
    }
    ```

    **Fact Checker** (what the agent MUST communicate):

    ```json theme={null}
    {
      "refund_processing_time": "5-7 business days",
      "refund_method": "Original payment method",
      "return_label_delivery": "Within 24 hours via email"
    }
    ```

    Click **Next**
  </Step>

  <Step title="Select Evaluators">
    Choose evaluators to score the conversation. Select from the library evaluators you reviewed in Step 2, or any custom evaluators you created:

    * **Agentic**: Goal Fulfillment (did the agent achieve the objective?)
    * **Quality**: Factual Accuracy (were facts communicated correctly?), Conversation Completeness

    Click **Next** then **Create Dataset**
  </Step>
</Steps>

## 4. Run Your First Simulation

Once your dataset is configured, trigger simulations through your agent code:

<Steps>
  <Step title="Get Dataset ID">
    Open your dataset in the Netra dashboard and copy the **Dataset ID** from the top of the page.
  </Step>

  <Step title="Integrate with Your Agent">
    The simulation runs automatically when your agent code executes. Ensure your
    agent is instrumented with Netra tracing.
  </Step>

  <Step title="Monitor Progress">
    Navigate to **Evaluation → Test Runs** and filter by **Multi** turn type to see your simulation in progress.
  </Step>
</Steps>

## 5. Review Results

<Steps>
  <Step title="View Test Runs">
    Go to **Evaluation → Test Runs** and click on your completed simulation.
  </Step>

  <Step title="Check Summary Metrics">
    Review high-level performance: - Total scenarios run - Pass/fail rate -
    Average cost and latency
  </Step>

  <Step title="Examine Conversations">
    Click on any scenario to view: - **Conversation tab**: Full turn-by-turn
    dialogue - **Evaluation Results tab**: Turn-level and session-level scores -
    **Scenario Details tab**: Goal, user data, and facts
  </Step>

  <Step title="Debug with Traces">
    Click **View Trace** on any turn to see detailed execution traces for debugging.
  </Step>
</Steps>

## What's Next?

<CardGroup cols={2}>
  <Card title="Simulation Overview" icon="flask" href="/Simulation/Simulation-overview">
    Learn more about the simulation framework and use cases
  </Card>

  <Card title="Create Advanced Scenarios" icon="layer-group" href="/Simulation/Datasets">
    Build complex multi-turn scenarios with custom personas
  </Card>

  <Card title="Custom Evaluators" icon="chart-mixed" href="/Simulation/Evaluators">
    Create custom evaluators for your specific requirements
  </Card>
</CardGroup>

## Common Patterns

### Testing Customer Support

* **Personas**: Test with Frustrated, Confused, and Neutral personas
* **Evaluators**: Conversation Completeness, Factual Accuracy, Guideline Adherence
* **Max Turns**: 4-6 for typical support scenarios

### Testing Technical Assistants

* **Personas**: Confused (needs extra clarification)
* **Evaluators**: Conversational Flow, Conversation Completeness, Goal Fulfillment
* **Max Turns**: 6-8 for complex troubleshooting

### Guideline Compliance Testing

* **Scenarios**: Create edge cases that challenge agent boundaries
* **Evaluators**: Guideline Adherence, Goal Fulfillment
* **Personas**: Frustrated (more likely to push boundaries)

<Tip>
  Start with 3-5 scenarios covering your most critical use cases, then expand
  coverage as you gain confidence in the system.
</Tip>
