Playground

Estimated reading: 5 minutes

The Playground is a testing environment for creating, executing, and refining prompts before integrating them into applications or workflows. It allows you to configure model settings, provide input values, execute prompts, and review responses in real time.

Prerequisites

Before using the Playground, ensure that:

  • A supported Large Language Model (LLM) is connected.
  • Required API credentials and integrations are configured.
Note: Without an active model connection, prompts cannot be executed.

Playground Features

The Playground provides features to help you create, test, and manage prompts efficiently.

Split Window

The Split Window displays the prompt editor, input values, and model response side by side, allowing you to test and compare prompt behavior efficiently.

Playground Split Window
Save as Prompt

The Save as Prompt option saves the current prompt configuration for future reuse.

Saved prompts can be reused, modified, and executed whenever required.

Save as Prompt
Run All

The Run All option executes the configured prompt using the selected model settings, input values, and prompt configuration.

Run All
Reset Playground

The Reset Playground option clears the configured prompts, input values, settings, and generated responses, restoring the Playground to its default state.

Playground Interface

The following animation demonstrates the overall Playground interface and its key features during prompt creation and execution.

Playground Interface

Model Settings

The Model Settings section allows you to configure parameters that control model behavior during prompt execution. These settings help adjust response consistency, creativity, length, and reasoning capability based on your requirements.

Temperature

Temperature controls the randomness of the generated response.

Range Behavior Recommended Use
0.0 – 0.3 More deterministic Suitable for code generation, technical documentation, and factual responses.
0.4 – 0.7 Balanced Suitable for general-purpose tasks.
0.8 – 1.0 More creative Suitable for brainstorming, storytelling, and ideation.

Lower values produce more consistent responses, while higher values generate more diverse outputs.

Max Tokens

Max Tokens defines the maximum number of tokens that the model can generate in a response.

Range Response Length Recommended Use
100 – 300 Short Suitable for summaries and quick answers.
300 – 1000 Medium Suitable for explanations and overviews.
1000+ Long Suitable for detailed analysis and reports.
Top P

Top P controls the diversity of token selection during response generation.

Range Behavior Recommended Use
0.1 – 0.5 More focused Suitable for precise and factual responses.
0.6 – 0.9 Balanced Suitable for general-purpose tasks.
1.0 Maximum diversity Suitable for creative content generation.
Note: Adjust either Temperature or Top P, but not both simultaneously.
Max Reasoning Tokens

Max Reasoning Tokens controls the reasoning budget used before generating a response for supported models.

Range Behavior Recommended Use
0 Minimal reasoning Suitable for simple queries requiring faster responses.
50 – 200 Moderate reasoning Suitable for multi-step tasks.
200+ Extensive reasoning Suitable for complex analysis, debugging, and logical reasoning.
Additional Options

Additional Options allows you to provide advanced, model-specific parameters as a JSON object.

Usage

  1. Enable Additional Options.
  2. Enter a valid JSON object.
  3. Execute the prompt.

Example

{
  "frequency_penalty": 0.5,
  "presence_penalty": 0.2,
  "stop": ["\n\n"]
}

Use this option only when model-specific parameters are required.

API Key

The API Key option overrides the default API key configured for the project.

If left blank, the project default API key is used during prompt execution.

Model Settings Interface

The following animation demonstrates the Model Settings available in the Playground, including model parameters and advanced configuration options.

Model Settings

Prompt Configuration

The Prompt Configuration section allows you to define and manage the components that control prompt behavior, including tools, structured outputs, variables, messages, and placeholders.

Tools

Tools allow the model to invoke predefined functions during prompt execution.

Each tool is defined using a JSON schema that specifies its inputs and enables the model to interact with external functions during execution.

Tool Definition Includes

  • Tool name
  • Description of the tool purpose
  • Input parameters
  • JSON schema definition

Configured tools can be tested within the Playground before being reused across the project.

Structured Output

Structured Output ensures that the model response follows a predefined JSON schema, making responses consistent and easier for downstream applications to process.

Schema Defines

  • Required fields
  • Data types
  • Validation constraints
Note: Structured Output and Tools cannot be used in the same request.
Prompt Variables

Prompt Variables allow dynamic values to be supplied during execution, enabling the same prompt to be reused with different inputs.

Variables are defined using double curly braces.

Examples

{{user_input}}

{{question}}

{{context}}
Note: Variables must use double curly braces.

Variable Format

{{variable_name}}
Messages

Messages define the role of each interaction within a prompt and determine how instructions, user inputs, and generated responses are handled.

Message Type Description
System Defines the model behavior, rules, and instructions.
User Represents the input provided by the end user.
Assistant Represents responses generated by the model.
Developer Provides additional implementation-specific instructions.
Tool Represents input or output exchanged with tools.
Variables and Placeholders

Variables allow dynamic input values to be injected into prompts during execution.

Message placeholders allow chat messages and conversation history to be inserted into prompts dynamically.

Each message placeholder contains one or more messages in JSON format.

[
  {
    "role": "user",
    "content": "..."
  }
]

Message Placeholders Can Inject

  • Previous conversation history
  • System instructions
  • User messages
  • Assistant responses
  • External conversation data

Usage

  1. Create a message placeholder.
  2. Assign a descriptive name.
  3. Provide one or more messages in JSON format.
  4. Execute the prompt.
Note: Multiple message placeholders can be defined within the same prompt to inject different sets of contextual messages.
Share this Doc

Playground

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online