Prompt Data Model
This page explains the structure of prompts in LangWatch and how they’re organized.Overview
Prompts in LangWatch contain all the information needed to generate AI responses, including the prompt text, model configuration, and optimization settings.Complete Prompt Structure
When you retrieve a prompt, you get all the configuration in a single response:Field Descriptions
Core Fields
Unique identifier for the prompt
Human-readable identifier for the prompt (primary way to reference prompts)
The project that owns the prompt
The organization that owns the prompt
Current version number
Unique identifier for this version
When this version was created
When the prompt was last updated
The user who created this version
Soft delete timestamp (null if not deleted)
Scope and Access
PROJECT
- Prompts are only accessible within the projectORGANIZATION
- Prompts are shared across all projects in the organization
Model Configuration
The LLM model to use (e.g., “openai/gpt-4o-mini”). Model names follow the litellm structure (“provider/model”)
Fine-tune creativity vs. consistency (0.0 = deterministic, 2.0 = very creative)
Control response length and costs
Content Fields
The main prompt text (system message)
Array of chat messages with roles and content (alternative to prompt field)
Variable System
Variable Formatting
Prompts use{{ variable_name }}
syntax for dynamic content:
Supported Variable Types
- Strings:
{{user_name}}
- Numbers:
{{count}}
- Booleans:
{{is_premium}}
- Lists:
{{items}}
- Objects:
{{user_data}}
(will be converted to string)
Optimization Features
Studio Only: These advanced optimization features require the optimization studio interface for proper experimentation,
performance measurement, and A/B testing. They cannot be configured via the API.
Input/Output Definitions
Array of input variable definitions with identifiers and types
Array of output variable definitions with identifiers and types
Type System
Input 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
Output Types
Output Types
"str"
- String responses"float"
- Numeric responses"bool"
- Boolean responses"json_schema"
- Structured JSON responses
Advanced Features
Configuration for advanced prompting strategiesThe prompting strategy to use.
"few_shot"
- Few-shot learning with examples"in_context"
- In-context learning approach"chain_of_thought"
- Chain-of-thought reasoning
Few-shot examples with columns and rows structure