Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This document refers to the Microsoft Foundry (classic) portal.
🔍 View the Microsoft Foundry (new) documentation to learn about the new portal.
Learn how to use the chat playground in Microsoft Foundry to explore AI model capabilities interactively. This quickstart focuses on the web-based UI experience; to build applications programmatically, see Build a custom chat app using the SDK.
Deploy (or reuse) a chat model and send prompts to receive AI-generated responses.
In this quickstart, you learn how to:
- Configure a system message to guide model behavior.
- Send a user question and receive a response.
- Interpret model responses and recognize limitations.
- Add safety system messages to ensure responsible AI use.
For this quickstart, you can use either a hub-based project or a Foundry project. For more information about the differences between these two project types, see Project types.
Prerequisites
An Azure account with an active subscription. If you don't have one, create a free Azure account, which includes a free trial subscription.
Deploy a model
In the portal, you can explore a rich catalog of cutting-edge models from many different providers. For this tutorial, search and then select the gpt-4o model.
-
Sign in to Microsoft Foundry. Make sure the New Foundry toggle is off. These steps refer to Foundry (classic).
If you're in a project, select Microsoft Foundry in the upper-left breadcrumb to leave the project. You'll create a new one in a moment.
From the landing page or Model catalog, select gpt-4o (or gpt-4o-mini).
Select Use this model. When prompted, enter a new project name and select Create.
Review the deployment name and select Create.
Then select Connect and deploy after selecting a deployment type.
Select Open in playground from the deployment page after it's deployed.
You land in the Chat playground with the model pre-deployed and ready to use.
If you're building an agent, you can instead start with Create an agent. The steps are similar, but in a different order. Once the project is created, you arrive at the Agent playground instead of the Chat playground.
You need the following permissions and setup:
- Azure role: Contributor or higher on the project. To verify your role, see Manage access control.
- Deployed model: A chat model already deployed in your Foundry project (for example, GPT-4o). If you don't have one, see Deploy a model using serverless API deployment.
Use the chat playground
Use the Foundry playground to interact with deployed chat models and test prompts in real time.
To get answers from your deployed model in the chat playground:
In the System message text box, provide a prompt to guide the assistant. For example, for a customer support scenario, use: "You're a helpful customer support agent. Answer questions about product features, pricing, and troubleshooting. If you don't know the answer, offer to escalate to a specialist." You can tailor the prompt for your specific use case.
Optionally, add a safety system message by selecting the Add section button, and then Safety system messages. Choose from the prebuilt messages, and then edit them to your needs.
Select Apply changes to save your changes. When prompted to see if you want to update the system message, select Continue.
In the chat session pane, enter the following question: "How much do the TrailWalker hiking shoes cost?"
Select the right arrow icon to send.
The assistant either replies that it doesn't know the answer or provides a generic response, such as noting price variability. This is expected because the model doesn't have access to current product data.
Understanding the response: The model generated text based on its training data and system message, but without grounding data (like a product catalog), it can't provide accurate domain-specific answers. This limitation is normal and expected in this scenario.
Next, add your data so the model can answer domain-specific questions. Try the enterprise chat web app tutorial.
Troubleshooting
| Issue | Action |
|---|---|
| No deployed models listed | Deploy a model from the model catalog first. |
| Repeated generic answers | Refine system message or add domain data. |
| Safety message overrides tone | Adjust or remove conflicting safety sections. |
| Slow first response | Allow for cold start; subsequent prompts are faster. |