> ## Documentation Index
> Fetch the complete documentation index at: https://www.traceloop.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt Registry

> Manage your prompts on the Traceloop platform

Traceloop's Prompt Registry is where you manage your prompts. You can create, edit, evaluate and deploy prompts to your environments.

## Configuring Prompts

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/img/prompt-configuration-light.png?fit=max&auto=format&n=GspX1ocwd1gETLy0&q=85&s=f02ab8b4912d10fd398785e7aaeb524c" width="3024" height="1808" data-path="img/prompt-configuration-light.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/img/prompt-configuration-dark.png?fit=max&auto=format&n=GspX1ocwd1gETLy0&q=85&s=7fc4c5cebcbef9a037d36738354afc7a" width="3024" height="1809" data-path="img/prompt-configuration-dark.png" />
</Frame>

The prompt configuration is composed of two parts:

* The prompt template (system and/or user prompts)
* The model configuration (temperature, top\_p, etc.)

<Tip>
  Your prompt template can include variables. Variables are defined according to
  the syntax of the parser specified. For example, if using `jinjia2` the syntax
  will be `{{ variable_name }}`. You can then pass variable values to the SDK
  when calling `get_prompt`. See the example on the [SDK
  Usage](/prompts/sdk-usage) section.
</Tip>

Initially, prompts are created in `Draft Mode`. In this mode, you can make changes to the prompt and configuration. You can also test your prompt in the playground (see below).

## Testing a Prompt Configuration (Prompt Playground)

By using the prompt playground you can iterate and refine your prompt before deploying it.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/img/prompt-playground-light.png?fit=max&auto=format&n=GspX1ocwd1gETLy0&q=85&s=c538ba31864dc369f5f53787eff52edb" width="3024" height="1809" data-path="img/prompt-playground-light.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/img/prompt-playground-dark.png?fit=max&auto=format&n=GspX1ocwd1gETLy0&q=85&s=9fcac82a6348ba53fa431744b80b4743" width="3021" height="1808" data-path="img/prompt-playground-dark.png" />
</Frame>

Simply click on the `Test` button in the playground tab at the bottom of the screen.

If your prompt includes variables, then you need to define values for them before testing.
Choose `Variables` in the right side bar and assign a value to each.

Once you click the `Test` button your prompt template will be rendered with the values you provided and will be sent to the configured LLM with the model configuration defined.
The completion response (including token usage) will be displayed in the playground.

## Deploying Prompts

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/img/prompt-deployment-light.png?fit=max&auto=format&n=GspX1ocwd1gETLy0&q=85&s=8f2584bf665c9147ad09d334f214d599" width="3024" height="1808" data-path="img/prompt-deployment-light.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/img/prompt-deployment-dark.png?fit=max&auto=format&n=GspX1ocwd1gETLy0&q=85&s=e4b36122965eeac6d561ad7796d7a8d3" width="3024" height="1805" data-path="img/prompt-deployment-dark.png" />
</Frame>

Draft mode prompts can only be deployed to the `development` environment.

Once you are satisfied with the prompt, you can publish it and make it available to deploy in all environments.
Once published, the prompt version cannot be edited anymore.

Choose the `Deploy` Tab to navigate to the deployments page for your prompt.

Here, you can see all recent prompt versions, and which environments they are deployed to.
Simply click on the `Deploy` button to deploy a prompt version to an environment. Similarly, click `Rollback` to revert to a previous prompt version for a specific environment.

<Note>
  As a safeguard, you cannot deploy a prompt to the `Staging` environment before
  first deploying it to `Development`. Similarly, you cannot deploy to
  `Production` without first deploying to `Staging`.
</Note>

To fetch prompts from a specific environment, you must supply that environment's API key to the Traceloop SDK. See the [SDK Configuration](/openllmetry/integrations/traceloop) for details

## Prompt Versions

If you want to make changes to your prompt after deployment, simply create a new version by clicking on the `New Version` button. New versions will be created in `Draft Mode`.

<Warning>
  If you change the names of variables or add/remove existing variables, you
  will be required to create a new prompt.
</Warning>
