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

# Editor and Versioning

> Create prompts, edit messages, test changes, and review version history in the Prompt Registry.

Prompt templates are the core artifact in Prompt Registry. Each template stores the messages, input variables, model settings, and version history your application uses at runtime.

Use the prompt editor when you want to update prompt behavior without changing application code.

## Create a prompt

From the PromptLayer dashboard, click **New** -> **Prompt**.

<Frame>
  <img src="https://mintcdn.com/promptlayer/Uwb3ZGD7ch34XkjE/new-quickstart-images/prompt-creation-access.png?fit=max&auto=format&n=Uwb3ZGD7ch34XkjE&q=85&s=34382dd2de9bd6798c863d02f02e7c37" alt="Creating a new prompt" width="2880" height="1624" data-path="new-quickstart-images/prompt-creation-access.png" />
</Frame>

A prompt usually starts with a **System** message and a **User** message.

<Accordion title="System, user, and assistant messages">
  **System messages** define the model's behavior, tone, output format, and guardrails.

  **User messages** contain the request that changes each time the prompt runs. This is where input variables usually appear.

  **Assistant messages** can show example responses, which helps the model follow an expected format.
</Accordion>

Input variables such as `{{customer_name}}` or `{{question}}` are placeholders that your application fills in at runtime. Learn more in [Template Variables](/features/prompt-registry/template-variables).

<Frame>
  <img src="https://mintcdn.com/promptlayer/Uwb3ZGD7ch34XkjE/new-quickstart-images/variables-explained.png?fit=max&auto=format&n=Uwb3ZGD7ch34XkjE&q=85&s=3b2d6c2203652e7937090e8d9abfcc1a" alt="Input variables in prompt" width="5760" height="3240" data-path="new-quickstart-images/variables-explained.png" />
</Frame>

## Test in Playground

Use Playground to test a prompt before saving or releasing it. Define values for each input variable, run the prompt, and inspect the generated response.

<Frame>
  <img src="https://mintcdn.com/promptlayer/Uwb3ZGD7ch34XkjE/new-quickstart-images/running-in-playground.gif?s=ed164d69a23135b28ff76f7bd8f425ea" alt="Running a prompt in the playground" width="800" height="453" data-path="new-quickstart-images/running-in-playground.gif" />
</Frame>

When the result looks right, save the template.

## Edit prompts with AI

Click the magic wand icon to open the AI prompt writer. It can rewrite or improve prompts based on your instructions, such as adding a new output requirement or tightening formatting rules.

<Frame>
  <img src="https://mintcdn.com/promptlayer/Uwb3ZGD7ch34XkjE/new-quickstart-images/ai-prompt-writer-zoomed.png?fit=max&auto=format&n=Uwb3ZGD7ch34XkjE&q=85&s=c064bd7d0af96a73a21845d129cd10a9" alt="AI prompt writer" width="1430" height="1004" data-path="new-quickstart-images/ai-prompt-writer-zoomed.png" />
</Frame>

## Save versions

Each save creates a new version. Before saving, PromptLayer shows a diff of exactly what changed so you can review additions and deletions.

Add a commit message that explains why the prompt changed, then save the new version.

<Frame>
  <img src="https://mintcdn.com/promptlayer/Uwb3ZGD7ch34XkjE/new-quickstart-images/bakers-tip.png?fit=max&auto=format&n=Uwb3ZGD7ch34XkjE&q=85&s=3834b0e2794b8d8d3de9ca3a8b01dff4" alt="Saving with diff view" width="2204" height="1318" data-path="new-quickstart-images/bakers-tip.png" />
</Frame>

Your version history appears beside the editor. Select any previous version to inspect it.

<Frame>
  <img src="https://mintcdn.com/promptlayer/Uwb3ZGD7ch34XkjE/new-quickstart-images/prompt-versioning-display.png?fit=max&auto=format&n=Uwb3ZGD7ch34XkjE&q=85&s=28c0e42cbc79f3fc7b2d860d17158384" alt="Version history" width="2880" height="1624" data-path="new-quickstart-images/prompt-versioning-display.png" />
</Frame>

Hover over a version and click **View Diff** to compare versions side by side.

<Frame>
  <img src="https://mintcdn.com/promptlayer/Uwb3ZGD7ch34XkjE/new-quickstart-images/prompt-diffing-display.png?fit=max&auto=format&n=Uwb3ZGD7ch34XkjE&q=85&s=b55cc082d4255b5245e2aa24cde74f58" alt="Comparing versions with diff" width="2880" height="1624" data-path="new-quickstart-images/prompt-diffing-display.png" />
</Frame>

## Next steps

* [Release Labels](/features/prompt-registry/release-labels) - Choose which prompt version production code should use
* [Dynamic Release Labels](/features/prompt-registry/dynamic-release-labels) - Split traffic across versions
* [Playground](/why-promptlayer/playground) - Test and replay prompt requests
* [Evaluations](/features/evaluations/overview) - Score prompt changes before release
