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

# Run Experiments in Playgrounds

> Learn about running experiments in the Galileo console using Playgrounds and datasets

This section will guide you through the process of running experiments in the Galileo console.

## Experiment walkthrough

Follow these steps to test and improve your AI projects using the [Galileo console UI](https://app.galileo.ai).

<Steps>
  <Step title="Select a project and open the Playground">
    In the [Galileo console](https://app.galileo.ai), 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/v2galileo/3x7j6xNWoqu7HXwr/images/console-ui/experiment-select-or-create-project.png?fit=max&auto=format&n=3x7j6xNWoqu7HXwr&q=85&s=61106a7a7d89858bf173a06695e45a9a" alt="Select or create a project" width="6026" height="1872" data-path="images/console-ui/experiment-select-or-create-project.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 [integrations page](https://app.galileo.ai/settings/integrations) in the Galileo console.

    <img src="https://mintcdn.com/v2galileo/3x7j6xNWoqu7HXwr/images/console-ui/experiment-select-a-model.png?fit=max&auto=format&n=3x7j6xNWoqu7HXwr&q=85&s=e4352c737dce149331dc1e69256ed913" alt="Select a model for an experiment" width="2992" height="1198" data-path="images/console-ui/experiment-select-a-model.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/v2galileo/3x7j6xNWoqu7HXwr/images/console-ui/experiment-configure-model-settings.png?fit=max&auto=format&n=3x7j6xNWoqu7HXwr&q=85&s=aff67b3e05fe08438609e0d099fe0714" alt="Configure model settings for an experiment" width="1784" height="966" data-path="images/console-ui/experiment-configure-model-settings.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 console 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/v2galileo/3x7j6xNWoqu7HXwr/images/console-ui/experiment-add-variables.png?fit=max&auto=format&n=3x7j6xNWoqu7HXwr&q=85&s=3dccf5de2b2aa8ee43a88e7a745ac9bc" alt="Add variables to an experiment" width="2628" height="1398" data-path="images/console-ui/experiment-add-variables.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)

    <img src="https://mintcdn.com/v2galileo/3x7j6xNWoqu7HXwr/images/console-ui/experiment-add-create-dataset.png?fit=max&auto=format&n=3x7j6xNWoqu7HXwr&q=85&s=f7e573b1cb6dad9c85ed3774c62f35ff" alt="Add or create a dataset for an experiment" width="2634" height="972" data-path="images/console-ui/experiment-add-create-dataset.png" />
  </Step>

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

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

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

    [Learn more about metrics →](/concepts/metrics/overview)

    <img src="https://mintcdn.com/v2galileo/3x7j6xNWoqu7HXwr/images/console-ui/experiment-add-metric.png?fit=max&auto=format&n=3x7j6xNWoqu7HXwr&q=85&s=3c1614fdc04573ac1522dab284f262e8" alt="Add metrics to an experiment" width="2708" height="820" data-path="images/console-ui/experiment-add-metric.png" />
  </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.

    <img src="https://mintcdn.com/v2galileo/3x7j6xNWoqu7HXwr/images/console-ui/experiment-add-more-adjustments.png?fit=max&auto=format&n=3x7j6xNWoqu7HXwr&q=85&s=f767c3bf65b60dd34e8cb0a4d5fbec74" alt="Add more adjustments to an experiment" width="2670" height="1344" data-path="images/console-ui/experiment-add-more-adjustments.png" />
  </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 metrics.
  </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)

    <img src="https://mintcdn.com/v2galileo/3x7j6xNWoqu7HXwr/images/console-ui/experiment-log-as-experiment.png?fit=max&auto=format&n=3x7j6xNWoqu7HXwr&q=85&s=d5cf16f498059a582d95fa33ec6746e9" alt="Log results" width="2660" height="1044" data-path="images/console-ui/experiment-log-as-experiment.png" />
  </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>
