Understand the structure of prompts in LangWatch
id
: Unique identifier for the prompthandle
: Optional globally unique identifierscope
: Either "PROJECT"
(default) or "ORGANIZATION"
for shared promptsprojectId
: The project this prompt belongs toorganizationId
: The organization this prompt belongs to (null for project scope)createdAt
: When the prompt was createdupdatedAt
: When the prompt was last updateddeletedAt
: Soft delete timestamp (null if not deleted)id
: Unique identifier for this versionversion
: Version number (incremental)configId
: Reference to the parent prompt configurationprojectId
: The project this version belongs toconfigData
: The actual prompt configuration (see Config Data Structure below)schemaVersion
: Version of the config schema (currently “1.0”)commitMessage
: Optional description of changesauthorId
: User who created this version (nullable)createdAt
: When this version was createdconfigData
contains the actual prompt configuration with comprehensive metadata:
version
: Version number within the config dataprompt
: The main prompt text with variable placeholdersmessages
: Array of chat messages with roles and contentinputs
: Array of input variable definitions with identifiers and typesoutputs
: Array of output variable definitions with identifiers and typesmodel
: The LLM model to use (e.g., "openai/gpt-4o-mini"
) - model names follow the litellm structure (“provider/model”)temperature
: Optional temperature setting for the modelmax_tokens
: Optional maximum token limitdemonstrations
: Optional few-shot examples with columns and rows structuredemonstrations
field supports few-shot learning with example inputs and outputs:
"string"
- Text data"boolean"
- True/false values"number"
- Numeric data"date"
- Date/time values"list"
- Array data"json"
- JSON objects"spans"
- Trace span data"rag_contexts"
- RAG context data"chat_messages"
- Chat message arrays"annotations"
- Annotation data"evaluations"
- Evaluation results{{ variable_name }}
syntax for dynamic content:
{{user_name}}
{{count}}
{{is_premium}}
{{items}}
{{user_data}}
(will be converted to string)inputs
and outputs
arrays define the expected variable types:
Input Types:
"str"
- String values"float"
- Floating point numbers"bool"
- Boolean values"image"
- Image data"list[str]"
- List of strings"list[float]"
- List of floats"list[int]"
- List of integers"list[bool]"
- List of booleans"dict"
- Dictionary/object"str"
- String responses"float"
- Numeric responses"bool"
- Boolean responses"json_schema"
- Structured JSON responsesscope: "PROJECT"
organizationId: null
scope: "ORGANIZATION"
organizationId: "org_456"