create_prompt
Create or update prompts for LLM applications by specifying text or chat formats, with version control and labeling for organization.
Instructions
Creates a new version of a prompt. If the prompt name does not exist, a new prompt is created. If it does exist, a new version is appended. type values: text (plain string prompt) | chat (array of message objects). For text prompts, provide prompt as a plain string. For chat prompts, provide prompt as a JSON array of message objects with role and content fields. labels examples: production, staging, latest. The 'latest' label is managed by Langfuse automatically. Returns the created prompt version with its assigned version number. name, type, and prompt are required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Prompt name. If it already exists, a new version is created. Required. | |
| type | Yes | Prompt type: text | chat. Required. | |
| prompt | Yes | Prompt content. Plain string for text type; JSON array of messages for chat type. Required. | |
| labels | Yes | Comma-separated labels to apply, e.g. production,staging. Omit to create without labels. | |
| tags | Yes | Comma-separated tags for organisation, e.g. summarisation,rag. Omit if no tags needed. |