HomeGuidesAnnouncementsCommunity
Guides

Playground

Playground is a tool designed to help users understand, test, and manipulate various elements of the chat pipeline. It allows you to explore different conversational inputs, outputs, and functions within an existing chat thread or through manual setup. This guide walks you through accessing Playground, using its features, and testing different configurations.

Prerequisites

  • Playground and Query Browser security rights

Accessing Playground

Through a Chat Thread

  1. Select a Chat Thread: Open a thread from your chats where you want to test different options. This could include a thread with multiple artifacts (1 or 2 are sufficient) or without any artifacts if you want to experiment.
  2. Open Diagnostics Panel: Once in the chat, open the Diagnostics panel. You'll see an Open in Playground button on each tab.
    • If there are multiple tabs (e.g., Answer, Processing), select the latest one to maintain context.
  3. Open Playground: Click the Open in Playground button, which will launch a new Playground window.

Direct Access via Admin

You can also access Playground by navigating to Skill Studio > Playground. Click the Playground (beaker icon) to begin.

Playground Layout and Features

Left Panel: Input Context

The left side of the Playground shows all the input context from the selected chat thread, including:

  • System Messages: Such as system prompts.
  • User Questions and Assistant Responses.
  • Functions: Functions in Playground will display the underlying information and code rather than fully formatted outputs.
  • Parameter Assignments and Extractions: Information about how parameters are handled during the conversation.

Right Panel: Tabs and Functions

On the right-hand side, you'll find several key tabs:

  1. Output: Displays the output of the current conversation or the test you are running.
  2. Skills: Lists active skills and allows you to add custom functions by clicking Add Function.
  3. Function Call Settings: Lets you force a function call for testing specific configurations.
  4. Raw JSON: This section shows the raw conversation data, allowing you to copy or edit the JSON for further testing or to recreate conversations.

Running and Manipulating Conversations

Editing and Adding Messages

  • Use the dropdown in the bottom-left corner to choose the type of message to add (e.g., system prompts, user questions, assistant responses, or function outputs).
  • At the top, you can select the model from the Model dropdown to change or configure models for your test.

Modifying the Conversation

Each element in the Playground can be edited, duplicated, or removed. This flexibility allows you to:

  • Duplicate Elements: Copy conversation elements to edit and rerun.
  • Delete Elements: Remove any unwanted parts of the conversation.
  • Edit JSON: Directly modify the raw JSON to adjust parameters or conversation flow.

Promoting Outputs to Input

You can promote a response from the Playground's output back into the conversation thread by clicking Promote to Output. This adds the response to the main thread, allowing you to build on the adjusted conversation.

Advanced Features

  1. Model Selection: Choose a different model to test by using the model dropdown at the top left. Adjust models through API Config in the left-hand navigation.
  2. Function Editing: Modify system prompts, parameters, or function outputs directly in the JSON view. After making changes, hit Run to generate a new output.
  3. Testing Scenarios: Use Playground to simulate different conversational scenarios by tweaking parameters, system prompts, or models. This is useful for testing responses or fine-tuning chatbot behavior.

Exporting and Reusing Conversations

  • Raw JSON Export: You can extract the conversation history and its details via the raw JSON tab. This is especially useful if you want to recreate a conversation in another environment or make programmatic changes to it.

Additional Tips

  • When adjusting system prompts or modifying function calls, always check the raw JSON tab for underlying changes.
  • If testing new skills or function calls, make sure to promote key outputs to maintain an ongoing conversation flow in Playground.

Conclusion

Playground is a robust tool for testing chat pipelines, tweaking system prompts, experimenting with functions, and reviewing JSON data. Whether you're simulating conversations or extracting data for further analysis, Playground provides comprehensive control and visibility over your interactions.