The playground is a place where you can create, test, and debug prompts.
Prompt
.
The selected prompt and version show in the upper left corner.With Code
: Get a code snippet to get the prompt programmaticallyExperiment on Dataset
: Run experiments against a dataset of your choice.Save
: Save the current prompt as a new version — check out Prompt ManagementPlayground Overview
System
: Instructions about the role of the assistant. For example, you can say that the assistant should provide concise answers.User
: The user’s input, often enriched with context.Assistant
: An LLM response, to simulate a conversation flow.Tool
: Response to a tool call.Prompt Template
System
messages and letting user input reach. Prefer to use variables in User
and Assistant
messages.chunks
: The chunks retrieved, say from a vector database.question
: The user’s query.{{variable}}
.If-statements and for-loops are written as {{#x}} ... {{/x}}
:x
is a boolean value, the section tags act like a conditional if
statementx
is an array, they behave like a for
loop: access each element with {{.}}
Tool
message type.Output formats
text
: free-text response
json_object
: JSON response with no specific schema enforced. Some providers ask to explicitly instruct the LLM to output JSON.
json_schema
: JSON response following the given JSON schema.
score_schema
: specific to Literal AI and particular useful for LLM-as-a-Judge prompts.
You can choose a Score Schema which forces your LLM to output a JSON of the form:
json_schema
itself varies from provider to provider.LLM Interaction
![]() Provider & Model | ![]() LLM Settings |
Top P
values consider more possible tokens, even the less likely ones, which makes the generated text more diverse.Frequency Penalty: Penalizes new tokens based on their existing frequency in the text so far. Decreases the model’s likelihood to repeat the same line verbatim.Presence Penalty: Penalizes new tokens based on whether they appear in the text so far. Increases the model’s likelihood to talk about new topics.Cmd+Enter
to send your message.Multiple tabs