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

# Run Experiments in Playgrounds

> Learn about running experiments in the UI using Playgrounds and datasets

This section will guide you through the process of running experiments in the Splunk Agent Observability UI.

## Experiment walkthrough

Follow these steps to test and improve your AI projects using the Splunk Agent Observability UI.

<Steps>
  <Step title="Select a project and open the Playground">
    In the Splunk Agent Observability UI, use the left-hand navigation menu to select the project you would like to experiment with. You can also select the **Create new project** button in the upper-right corner to create a new project.

    <img src="https://mintcdn.com/agent-observability-docs/Y4gaVgpsSUs8MBdT/images/console-ui/experiment-select-or-create-project-sao.png?fit=max&auto=format&n=Y4gaVgpsSUs8MBdT&q=85&s=f4cdc7578562f7b6beed2be8f5806705" alt="Select or create a project" width="5976" height="2052" data-path="images/console-ui/experiment-select-or-create-project-sao.png" />

    On the **Overview** for the project, the **Playgrounds** table lists the existing Playgrounds for the project. To open an existing Playground, select the row for the Playground from the table.

    You can also select the **Create Playground** button to create a new Playground.
  </Step>

  <Step title="Select a model and enter API keys">
    After you create or select a Playground, choose a model using the **Select a model** drop-down menu.

    Some models require that you enter your corresponding API key. Visit their respective API platforms to obtain your keys, then add it using the **LLM Integrations** page in the Splunk Agent Observability UI.

    To navigate to the **LLM Integrations** page, select your user profile in the upper-right corner and select **Integrations** from the menu.

    <img src="https://mintcdn.com/agent-observability-docs/Y4gaVgpsSUs8MBdT/images/console-ui/experiment-select-a-model-sao.png?fit=max&auto=format&n=Y4gaVgpsSUs8MBdT&q=85&s=3dd63f07efd9a3e963504da6b47a26b6" alt="Select a model for an experiment" width="2428" height="1306" data-path="images/console-ui/experiment-select-a-model-sao.png" />
  </Step>

  <Step title="Configure model settings">
    Select the settings icon to the right of your model name to adjust its behavior:

    * **Max Tokens:** Sets the maximum number of tokens the model can generate in its output.
    * **Temperature:** Controls randomness in output—higher values make responses more creative, lower values make them more focused and deterministic.
    * **Frequency Penalty:** Reduces the likelihood of the model repeating the same tokens by penalizing frequent ones.
    * **Presence Penalty:** Discourages the model from mentioning tokens that have already appeared, promoting new content.
    * **Top P:** Limits sampling to the most likely tokens whose cumulative probability is within this threshold (a form of nucleus sampling).

          <img src="https://mintcdn.com/agent-observability-docs/Y4gaVgpsSUs8MBdT/images/console-ui/experiment-configure-model-settings-sao.png?fit=max&auto=format&n=Y4gaVgpsSUs8MBdT&q=85&s=96f92839949b687f63868393f3ef5ebb" alt="Configure model settings for an experiment" width="2428" height="996" data-path="images/console-ui/experiment-configure-model-settings-sao.png" />
  </Step>

  <Step title="Configure prompt data">
    There are two ways to set the prompt data for your experiment:

    1. Add prompts and variables through the UI. Ideal for quick tests.
    2. Use datasets from past experiments or create new ones. Ideal for real, fully-configured experiments.

    ### Add prompt and variables

    In the prompt text field, add your prompt.

    In your prompt, you can use variable names with curly brackets (e.g. `{{variable_name}}`). Add new variable options with the duplicate icon next to **Variable Set** and fill them in with different values to be used in place of your variable.

    You can also use nested variables by entering JSON formatted key-value pairs into the **Variable Set** text input field. Then, refer to their values with either `{{key}}` or `{{input.key}}`

    ```json theme={null}
    {
      "pepperoni": "pepperoni pizza",
      "anchovy": "pizza with anchovies"
    }
    ```

    In this example, both `{{pepperoni}}` and `{{input.pepperoni}}` will result in "pepperoni pizza" being used in the prompt. This approach is great for testing how changing individual words in a prompt structure affects outputs.

    Add new messages beyond the initial prompt with the **Add Message** button below the prompt field. New messages can be from the user or the model ("system").

    <img src="https://mintcdn.com/agent-observability-docs/Y4gaVgpsSUs8MBdT/images/console-ui/experiment-add-variables-sao.png?fit=max&auto=format&n=Y4gaVgpsSUs8MBdT&q=85&s=58fb9e6ffe662aba99bbeb9b796228f0" alt="Add variables to an experiment" width="2704" height="1374" data-path="images/console-ui/experiment-add-variables-sao.png" />

    ### Add dataset

    Select the **Add dataset** button in the upper-right corner to choose the dataset your model will use.

    The datasets listed are from your past experiments. You can also [add your own](/sdk-api/experiments/datasets) by selecting **Create new dataset**.

    [Learn more about datasets →](/sdk-api/experiments/datasets)
  </Step>

  <Step title="Add evaluators">
    Select the **Add evaluator** button in the upper-right corner to choose evaluators by which your experiment's outputs are measured.

    Filter and select from the preset evaluators, or add your own by selecting **Create evaluator** in the upper-right corner.

    Scores are produced for each selected evaluator after running an experiment.

    [Learn more about evaluators →](/concepts/evaluators/overview)
  </Step>

  <Step title="Add more models, prompts, and settings">
    Add additional prompt sections by selecting the actions (...) menu in the upper-right corner of the **Variables** panel, then the **Add Prompt** button.

    Each new prompt section can have its own distinct configuration of:

    * Model
    * Model settings
    * Prompt
    * Message conversation

    Add new prompt sections and customize their settings as needed for your experiment.
  </Step>

  <Step title="Run experiments">
    Select the **Run all** button in the upper-right corner to run your experiments, generate outputs, and calculate evaluations based on your chosen evaluators.
  </Step>

  <Step title="Review outputs">
    After the experiment has completed, scroll down to view their outputs and evaluations.

    The more distinct prompts and variable sets you used, the more results there will be.
  </Step>

  <Step title="Log your experiment results">
    Select the **Log as experiment** button above the outputs to record all the details of the experiment.

    Use a descriptive name for your experiment so that it's easy to keep track of your progress.

    [Learn more about logging →](/sdk-api/logging/logging-basics)
  </Step>

  <Step title="Continue experimenting!">
    That's it! Now, further customize and configure your experiment to meet your testing goals. Log your experiment results, and create new projects to try out different configurations.

    If you encounter any errors, visit our [Common Errors guide](/references/faqs/errors).
  </Step>
</Steps>
