Prompt Management
Version-controlled prompt templates with variables, changelogs, and rollback capabilities
What is a Prompt?
A Prompt in LaikaTest is a reusable template for your LLM interactions. Each prompt can have multiple versions, allowing you to:
- Manage Changes: Track modifications with detailed changelogs
- Version Control: Maintain multiple versions and roll back when needed
- Template Variables: Use
{{placeholders}}for dynamic content - Type Support: Text prompts or structured chat message arrays
Prompt Types
You are a helpful customer support assistant.Customer: {{customerQuery}}Assistant:[ { "role": "system", "content": "You are a helpful customer support assistant for {{companyName}}." }, { "role": "user", "content": "{{customerQuery}}" }]Creating a Prompt
Via Dashboard
- Navigate to your project
- Click "Create Prompt"
- Enter prompt name and description
- Select type (text or chat)
- Write your initial prompt content
- Add a changelog message
- Click "Create" - the first version is auto-published
Note: Prompts are created and managed through the dashboard. Once created, you can fetch them programmatically using the SDK.
Prompt Versioning
Every time you modify a prompt's content, you create a new version. Versions are immutable once published.
Version States
- Draft: Work-in-progress versions not yet published
- Published: Live versions that can be fetched via the SDK
Creating a New Version
New versions are created through the dashboard by editing an existing prompt and saving changes.
Version Numbering
Versions are automatically numbered sequentially (1, 2, 3, ...). The first version is always 1.
Tip: Use meaningful changelog messages. They help your team understand why changes were made and make it easier to choose the right version when rolling back.
Variable Substitution
Use double curly braces {{variableName}} to create placeholders in your prompts. Variables are automatically replaced when you fetch and compile prompts using the SDK.
Template: "Hello {{customerName}}, how can we help with {{issue}}?"Compiled: "Hello Alice, how can we help with billing question?"See the SDK Documentation for implementation details on compiling prompts with variables.
Fetching Prompts via SDK
Current Version
// Fetch the current published versionconst prompt = await client.getPrompt('customer-greeting');console.log(prompt.getContent());Specific Version
// Fetch version 5const prompt = await client.getPrompt('customer-greeting', { versionId: '5'});// Also accepts 'v5' formatconst prompt2 = await client.getPrompt('customer-greeting', { versionId: 'v5'});Managing Prompts
Prompt management (updating metadata, viewing version history, deleting prompts) is done through the dashboard. The SDK is used for fetching prompts in your application at runtime.
Best Practices
- Descriptive Names: Use clear, hyphenated names like
customer-support-greeting - Meaningful Changelogs: Document what changed and why in each version
- Test Before Publishing: Create draft versions and test them before publishing
- Use Variables Wisely: Keep variable names simple and consistent across prompts
- Organize with Tags: Use tags to categorize prompts by feature, team, or purpose
- Version Strategically: Don't create a new version for minor typo fixes - batch related changes
Next Steps
- Experiments - Run A/B tests with different prompt versions
- SDK Documentation - Learn all SDK methods for prompt fetching