Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/intelligentapps/images/playground/model-playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/intelligentapps/images/playground/parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 27 additions & 35 deletions docs/intelligentapps/playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DateApproved: 10/03/2025
MetaDescription: Chat with selected generative AI model in playground. Change system prompt and parameters. Add attachment for Multi-Modal models. Keep chat history.
---
# Model playground in Foundry Toolkit
The Foundry Toolkit playground provides an interactive environment to experiment with generative AI models. You can test various prompts, adjust model parameters, compare responses from different models and explore multi-modal capabilities by attaching different types of input files.
The Foundry Toolkit playground provides an interactive environment to experiment with generative AI models. You can test prompts, adjust model parameters, compare responses from different models, and use model-specific capabilities such as attachments, image input, web search, and local resource usage when the selected model supports them.

![Foundry Toolkit playground interface showing a chat interaction with a generative AI model.](./images/playground/model-playground.png)

Expand All @@ -14,44 +14,35 @@ To access the playground:

- In Foundry Toolkit view, select **Developer Tools** > **Build** > **Model Playground**
- Select **Try in Playground** from a model card in the model catalog
- Double-click a model from **MY Models** to open it in the playground
- Select a model from the list of deployed Models to open it in the playground

![Screenshot of model list](./images/playground/foundry-model-support.png)

To test a model in the playground, follow these steps:

1. In **Model Preferences**, select a model from the dropdown list.
2. Optionally, add a **System Prompt** to guide the model response.
3. Optionally, configure the model parameters available for the selected model.
2. Optionally, add a **System prompt** to guide the model response.
3. Optionally, configure the inference parameters available for the selected model.
4. Enter a chat prompt in the chat input box

### Local model execution in the Playground

Foundry Toolkit supports running local models in the playground. You can select a local model from the model dropdown list in the **Model Preferences** panel.
Foundry Toolkit supports running local models in the playground. You can select a configured local model from the model dropdown list in the **Model Preferences** panel. Local model support depends on your platform, installed runtimes, and the model provider.

![Screenshot of local model support](./images/playground/local-model-support.png)

## GitHub Pay-as-you-go Model Support

Foundry Toolkit now supports GitHub pay-as-you-go models, so you can keep working after passing free tier limits.

- When you reach GitHub’s model usage limit, Foundry Toolkit shows a warning with a link to GitHub’s paid usage documentation.

![Screenshot of the GitHub Pay-as-you-go Model support](./images/playground/github-pay-as-you-go.png)

- Turn on billing for models in your [GitHub settings](https://github.com/settings/billing) (requires signing in to your GitHub account).

- After enabling billing, keep using the model in Playground or Agent Builder without changing your workflow.

## Model preferences

![Model Preferences panel displaying adjustable parameters for generative AI models](./images/playground/parameters.png)

The **Model Preferences** panel allows you to select a model for playground interaction, set system prompts to guide the model's behavior and configure the model parameters for the selected model.
The **Model Preferences** panel allows you to select a model for playground interaction, set a system prompt to guide the model's behavior, and configure inference parameters for the selected model. The available settings depend on the model and provider.

### Select a model
The dropdown list in the **Model Preferences** panel shows the models you have added to Foundry Toolkit. You can select **Browse Models** to open the model catalog and add more models.

### System prompt
A system prompt is a predefined instruction that guides the model's behavior and response style. You can add, edit, or delete the system prompt in the input text area to influence how the model generates responses.

A system prompt is an instruction that guides the model's behavior and response style. You can add, edit, or delete the system prompt in the input text area to influence how the model generates responses.

### Configure inference parameters
The available parameters depend on the model type and publisher. Common parameters include:
Expand All @@ -63,7 +54,7 @@ The available parameters depend on the model type and publisher. Common paramete

### Show resource usage

For local models, there's an additional option **Show resource usage**. When enabled, resource usage is shown with each response.
For supported local models, there's an additional option **Show resource usage (preview)**. When enabled, resource usage is shown with each response.

![Screenshot showing 'Show resource usage' in Model Preferences panel](./images/playground/parameters-show-resource-usage.png)

Expand All @@ -74,18 +65,19 @@ For local models, there's an additional option **Show resource usage**. When ena

The chat prompt is the input text you provide to the model. You can enter a question, statement, or any text that you want the model to respond to. The model generates a response based on the provided prompt and the configured system prompts and parameters.

Available features in the chat prompt input box:
Available features in the chat prompt input box depend on the selected model and provider:
- **Send**: Submit the chat prompt to the model for processing.
- **Clear**: Clear the chat prompt input box.
- **File Attachment**: Attach files to the chat prompt for multi-modal models.
- **Image Attachment**: Attach images to the chat prompt for multi-modal models.
- **Web Search**: Perform a web search to find information related to the chat prompt.
- **File Attachment**: Attach files to the chat prompt for models that support file input.
- **Image Attachment**: Attach images to the chat prompt for models that support image input.
- **Web Search**: Perform a web search for models that support web search. Some models require **Use Responses API** for web search.
- **Mode Switch**: Switch between different modes for using AI features.

### Switch between modes
You can switch between different modes in the chat prompt input box:
- **Use native supported AI features from a model**: This mode allows you to use the native capabilities of the selected model, such as web search or file attachment.
- **Use all AI features**: This mode allows you to use AI feature implemented by Foundry Toolkit, such as file attachment regardless of the model's native capabilities.
- **Use [model] Native Supported AI Features**: Use the native capabilities of the selected model, such as web search or attachments when the model supports them.
- **Use All AI Features**: Use capabilities implemented by Foundry Toolkit when available for the selected model and provider.
- **Use Responses API**: Use the Responses API for supported models and features that require it, such as web search for some OpenAI models.

If a capability is not supported by the selected model or by Foundry Toolkit, a warning appears above the chat prompt input box. The warning recommends that you switch to a different model that supports the feature.

Expand All @@ -101,11 +93,11 @@ Available features in the model response area:
- **Regenerate Response**: Regenerate the model's response based on the same prompt or regenerate response with another model.
- **Copy Code**: Copy the generated code in the response to the clipboard or insert it into a new file.
- **Rendering**: Playground supports rendering of code snippets, images, markdown, LaTex and other content in the model's response.
- **Token Count**: Displays the number of tokens used in the model's response. This helps you understand the cost and performance of the model.
- **Token Count**: Displays token usage when the selected model returns token count information.

### Resource usage

When **Show resource usage** is enabled for a local model, a summary of usage is shown with each response. You could also switch to the [Profiling](/docs/intelligentapps/profiling) details by selecting **Usage details**.
When **Show resource usage (preview)** is enabled for a supported local model, a summary of usage is shown with each response. You can also switch to [Profiling](/docs/intelligentapps/profiling) details by selecting **Usage details**.

![Screenshot showing resource usage for one response](./images/playground/response-resource-usage.png)

Expand All @@ -118,16 +110,16 @@ The tool bar in the playground provides quick access to various actions and feat
- **History**: View, rename, delete, and switch to a chat history.
- **Automatic Naming**: Names of chat sessions are automatically generated based on the user prompt.
- **Compare**: Compare responses from different models side by side.
- **View Code**: View the generated code for the chat prompt from LLM integration.
- **Open Code in VS Code**: View generated code for the selected model and prompt in {% data variables.product.prodname_vscode_shortname %}.

### Compare model responses
![Screenshot showing side by side comparison of responses from different models in the Foundry Toolkit playground.](./images/playground/compare.png)

The **Compare** feature allows you to compare responses from different models side by side. This is useful for evaluating the performance of different models on the same prompt.
The **Compare** feature allows you to compare responses from configured models side by side. This is useful for evaluating the performance of different models on the same prompt. Available models and features depend on each model's provider and capabilities.

To compare model responses:
1. Select the **Compare** button in the tool bar.
2. Choose the models you want to compare from the dropdown list.
2. Choose another configured model from the dropdown list.
3. Enter the same chat prompt in one of the input boxes. Your prompt is copied to the other input boxes.
4. Select **Send** to submit the prompt to all selected models.
5. The responses from each model appear side by side for easy comparison.
Expand All @@ -142,11 +134,11 @@ For each model you are comparing, you can:
In this article, you learned how to:

- Use the Foundry Toolkit playground to interact with generative AI models.
- Test models in the playground, configure system prompts and parameters, and explore multi-modal capabilities by attaching files.
- Test models in the playground, configure system prompts and parameters, and use supported multimodal capabilities.
- Use the Compare feature to evaluate the performance of different models on the same prompt and view responses side by side.
- Use the chat prompt input box to send prompts, attach files or images, perform web searches, and switch between modes for AI features.
- Use the chat prompt input box to send prompts, attach files or images, perform web searches, and switch between modes when those features are supported by the selected model and provider.
- View model responses, copy or regenerate responses, and render code snippets, images, markdown, and LaTeX.
- Track token count in model responses to understand cost and performance.
- Track token count when the selected model returns token usage.
- Use the Model Preferences panel to select models, set system prompts, and adjust inference parameters.
- Use the tool bar to create new playground sessions, view and manage chat history, automatically name sessions, compare models, and view generated code.
- Use the tool bar to create new playground sessions, view and manage chat history, automatically name sessions, compare models, and open generated code in {% data variables.product.prodname_vscode_shortname %}.
- Manage chat history, including viewing, renaming, deleting, and switching between sessions.