Skip to main content

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.

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.
Creating a new prompt
A prompt usually starts with a System message and a User message.
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.
Input variables such as {{customer_name}} or {{question}} are placeholders that your application fills in at runtime. Learn more in Template Variables.
Input variables in prompt

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.
Running a prompt in the playground
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.
AI prompt writer

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.
Saving with diff view
Your version history appears beside the editor. Select any previous version to inspect it.
Version history
Hover over a version and click View Diff to compare versions side by side.
Comparing versions with diff

Next steps