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

# Create Playgrounds

> Test LLM prompts in an interactive environment. Compare models side-by-side, adjust parameters, and iterate on prompts before deploying to production.

Use **Playgrounds** to:

<AccordionGroup>
  <Accordion title="Quickly test prompts" icon="flask">
    Test [Prompts](/docs/ai-studio/prompts/prompts) in an easy-to-use interactive environment before deploying to production.
  </Accordion>

  <Accordion title="Compare models side-by-side" icon="code-compare">
    Run the same prompt across multiple models simultaneously and compare outputs directly.
  </Accordion>

  <Accordion title="Test with new models" icon="swap">
    Try existing use cases and prompts against new models without touching your production configuration.
  </Accordion>

  <Accordion title="Experiment with parameters" icon="sliders">
    Adjust temperature, top-p, max tokens, and other parameters to tune model behavior.
  </Accordion>

  <Accordion title="Build fine-tuning datasets" icon="database">
    Provide feedback on responses to create curated datasets for future fine-tuning.
  </Accordion>
</AccordionGroup>

## Create a Playground

<div className="max-w-md">
  <iframe src="https://www.youtube.com/embed/SUbdtXZ4w2w" title="How to Use Playgrounds in Orq.ai: Test Prompts, Compare Models Side-by-Side, and Tune Parameters" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />
</div>

Head to the AI Studio, choose a [Project](/docs/ai-studio/get-started/projects), and use the `+` button to select **Playground**.

The following modal opens:

<Frame caption="Give the Playground a title, set a Path, and select a model. Everything can be modified later.">
  <img src="https://mintcdn.com/orqai/83k4_RKHhrJhLScC/images/playground-create-410.png?fit=max&auto=format&n=83k4_RKHhrJhLScC&q=85&s=5705934ea64e14773535031d76c8de0a" alt="Create playground modal with Title field, Model selector, and Path selector set to Default Project." width="876" height="603" data-path="images/playground-create-410.png" />
</Frame>

After which, the Playground can be configured:

<Frame caption="Configure model, parameters, and prompt template in the Playground.">
  <img src="https://mintcdn.com/orqai/sz0pmFlKGzJiFYQH/images/configuring-playground.gif?s=62edc1ac8243ed91bfbab19c9ec3e5e4" alt="Configuring a Playground" width="1200" height="789" data-path="images/configuring-playground.gif" />
</Frame>

## Layout

The Playground is split into two panels:

* **Left panel**: Parameters, Prompt template, Knowledge Bases, and Tools configuration.
* **Right panel**: Chat and generation area where responses appear.

The top-right toolbar contains **Add model**, **Variables**, and **Blocks**.

Use the **Logs** tab to view call logs for this Playground. See [Logs](/docs/ai-studio/observability/logs) for details.

## Parameters

The **Parameters** block at the top of the left panel controls the model and its settings. Click the chevron to collapse or expand it.

Available parameters include: Model, Max Tokens, Temperature, Top P, Top K, and Response Format.

To change the model, click the model name to open the list of available models.

<Info>
  See which models are available in the [AI Gateway](/docs/ai-studio/ai-gateway/add-models).
</Info>

In the Playground, you can test all available models through the **Orq.ai** API key without setting up your own API keys.

<Frame caption="When selecting a model, the block automatically updates with all corresponding parameters for that model.">
  <img src="https://mintcdn.com/orqai/MdV1JwnMjT_YJyPn/images/playground-model-parameters.png?fit=max&auto=format&n=MdV1JwnMjT_YJyPn&q=85&s=4f9e56338f17c56d9ac2ed96ae7c4d59" alt="When selecting a model, the block automatically updates with all corresponding parameters for that model." width="1194" height="260" data-path="images/playground-model-parameters.png" />
</Frame>

The **Max Tokens** parameter is especially important: make sure the model has enough tokens allocated for the expected output.

<Info>
  To learn more about the most common model parameters, see [Model Parameters](/docs/ai-studio/prompts/prompts#model-parameters).
</Info>

## Prompt Template

Define the prompt in the **Prompt template** block. Use the **Import prompt** button to load an existing prompt from your project.

Use `{{variable_key}}` syntax in the prompt message to define variables. The **Variables** button in the top toolbar lists all variables defined in the current prompt and lets you set their values before generating.

<Info>
  To learn how to set up your Prompt and Messages, see [Creating a Prompt](/docs/ai-studio/prompts/prompts).
</Info>

## Knowledge Bases

Attach a [Knowledge Base](/docs/ai-studio/ai-engineering/knowledge-bases-memory-stores) to the Playground using the **Add Knowledge Base** button in the **Knowledge Bases** section. The Knowledge Base content is included in the prompt context when generating.

## Tools

Add tools to the Playground using the **Add Tool** or **Import Tool** buttons in the **Tools** section. Tools extend what the model can do during generation.

## Generation

Once the prompt template is ready, click <kbd className="key">Generate</kbd> to produce a response.

Use **Add message** to append messages before generating. Use **Clear chat** to reset the conversation while keeping the prompt template.

<Frame caption="Responses stream in real time. Continue the conversation by adding messages and generating new answers.">
  <img src="https://mintcdn.com/orqai/MdV1JwnMjT_YJyPn/images/playground-chat.png?fit=max&auto=format&n=MdV1JwnMjT_YJyPn&q=85&s=5f1bb259cbe2d377d018f77e9b3dcf8e" alt="Responses stream in real time. Continue the conversation by adding messages and generating new answers." width="706" height="831" data-path="images/playground-chat.png" />
</Frame>

Cost and token count for the latest generation are shown at the bottom-right of the panel.

## Image Generation

Image generation models create images from text descriptions. Select a model with an `image` tag in the model picker.

**Selecting an Image Generation Model**

<Frame caption="The image tag identifies models capable of generating images.">
  <img src="https://mintcdn.com/orqai/E8L3R46ivX7g9-QI/images/docs/9b5900a-image_models.jpg?fit=max&auto=format&n=E8L3R46ivX7g9-QI&q=85&s=7aa10cf541cbd0993c2e4b3a7410700c" alt="The image tag identifies models capable of generating images." width="1273" height="765" data-path="images/docs/9b5900a-image_models.jpg" />
</Frame>

**Configuring Parameters for Image Models**

Image generation models have different parameters compared to chat models. Parameters vary per model and affect the generated output.

<Frame caption="Example parameters for the DALL-E 3 model.">
  <img src="https://mintcdn.com/orqai/CYa0API8F1HJ4dab/images/image-model-parameters.png?fit=max&auto=format&n=CYa0API8F1HJ4dab&q=85&s=4419b04a7390454cffc0b8aab9c4fcff" alt="Example parameters for the DALL-E 3 model." width="1196" height="266" data-path="images/image-model-parameters.png" />
</Frame>

**Generating Images**

Use image models in the Playground like any other model. Generated images appear as regular messages and can be viewed fullscreen.

<Frame caption="Example of image generation using Leonardo AI.">
  <img src="https://mintcdn.com/orqai/mDs6v2JrTlXp9Ikl/images/docs/e5ff6a2-image_gen_example.jpg?fit=max&auto=format&n=mDs6v2JrTlXp9Ikl&q=85&s=452583f2c0ec566e804a9cfe87003504" alt="Example of image generation using Leonardo AI." width="2291" height="1499" data-path="images/docs/e5ff6a2-image_gen_example.jpg" />
</Frame>

**Use Cases**

* **Creative Content**: Generate artwork, illustrations, and visual content for marketing materials
* **Product Design**: Create mockups and visual prototypes based on descriptions
* **Content Creation**: Generate images for blogs, social media, and presentations
* **Concept Visualization**: Turn abstract ideas into visual representations

**Best Practices**

* **Be Specific**: Provide detailed descriptions for better results
* **Style Guidelines**: Include artistic style, mood, and visual elements in the prompt
* **Parameter Tuning**: Experiment with model-specific parameters to achieve desired output quality
* **Iterative Refinement**: Use generated images as starting points for further refinement

## Vision

Vision models analyze and interpret images. Select a model with a `vision` tag in the model picker.

<Frame caption="The vision label identifies models that can interpret images.">
  <img src="https://mintcdn.com/orqai/E8L3R46ivX7g9-QI/images/docs/9b2f041-vision_models2.jpg?fit=max&auto=format&n=E8L3R46ivX7g9-QI&q=85&s=10971cc6aecba6ded85c22a8a16a491b" alt="The vision label identifies models that can interpret images." width="1265" height="743" data-path="images/docs/9b2f041-vision_models2.jpg" />
</Frame>

To include an image as input, click the **image icon** at the top-right of the message. Share a link or upload a file to pass to the model.

<Frame caption="An example use case using a vision model.">
  <img src="https://mintcdn.com/orqai/E8L3R46ivX7g9-QI/images/docs/ab478c4-vision_model_insurance_example.jpeg?fit=max&auto=format&n=E8L3R46ivX7g9-QI&q=85&s=3930bf9180dbab646cf7c9eb42d303b9" alt="An example use case using a vision model for insurance claims processing." width="3209" height="2065" data-path="images/docs/ab478c4-vision_model_insurance_example.jpeg" />
</Frame>

<Info>
  To send images or files to a model via the API in production, see [Attach Files](/docs/ai-studio/ai-engineering/deployments#attach-files) in Deployments.
</Info>

**Use Cases**

* **Document Processing**: Extract text and information from scanned documents and forms
* **Visual Quality Control**: Analyze product images for defects or compliance
* **Content Moderation**: Automatically review images for inappropriate content
* **Medical Imaging**: Analyze medical scans and diagnostic images (with appropriate models)
* **Insurance Claims**: Process damage assessment photos and documentation

**Best Practices**

* **Image Quality**: Ensure images are clear and well-lit for best analysis results
* **Specific Questions**: Ask focused questions about the information to extract or understand
* **Context Provision**: Provide context about what the image represents for better interpretation
* **Multiple Angles**: For complex analysis, consider providing multiple views of the same subject

## Comparing Multiple Models

Click **Add model** in the top toolbar to add a second model block. Each model gets its own block, allowing side-by-side comparison with the same prompt.

### Copying and Duplicating Models

Use the <kbd><Icon icon="ellipsis" /></kbd> menu at the top-right of any model block to:

* **Copy Prompt Template**: copy the template to one or all other model blocks.
* **Duplicate Block**: create a copy of the block including its configuration.

### Blocks

Use the **Blocks** button in the top toolbar to toggle which model blocks are visible or delete blocks you no longer need.

<Frame caption="Use the Blocks menu to view all models in your Playground, toggle visibility, and delete blocks.">
  <img src="https://mintcdn.com/orqai/MdV1JwnMjT_YJyPn/images/playground-blocks-menu.png?fit=max&auto=format&n=MdV1JwnMjT_YJyPn&q=85&s=0a9bfa6664383273983d6ed581be138b" alt="Use the Blocks menu to view all models in your Playground, toggle visibility, and delete blocks." width="752" height="322" data-path="images/playground-blocks-menu.png" />
</Frame>
