Skip to main content

How to Use This FAQ

This guide is organized by topic to help you quickly find answers: Each question includes working code examples for both Python and JavaScript/TypeScript SDKs.

Getting Started

ABV provides comprehensive prompt management through the UI, SDKs, and API.Creating Prompts:Via UI:
  1. Sign in to ABV
  2. Navigate to Prompts section
  3. Click “Create Prompt”
  4. Enter prompt content with {{variables}}
  5. Add configuration (model, temperature, etc.)
  6. Assign labels for deployment
Via Python SDK:
Via JavaScript/TypeScript SDK:
Fetching Prompts:
Updating Labels:
Key Features:
  • Version control with automatic versioning
  • Labels for deployment management (production, staging, etc.)
  • Config versioning alongside prompts
  • Diff view to see changes between versions
  • Protected labels for production safety
  • Rollback capability with one click or API call
  • Variables with {{mustache}} syntax for dynamic content
Prompt engineering is the practice of designing and optimizing text prompts to get better outputs from Large Language Models (LLMs).Why it matters:
  • Better prompt = better LLM output quality
  • Can significantly impact accuracy, relevance, and usefulness
  • More cost-effective than fine-tuning models
  • Faster iteration cycle than model training
Key Techniques:1. Clear Instructions: Be specific about what you want, provide context and constraints, and define the output format.
2. Few-Shot Examples: Show the model examples of desired output to establish patterns and format.
3. Role/Persona: Define who the LLM should act as, which influences tone and expertise level.
4. Chain of Thought: Ask the model to think step-by-step to improve reasoning and accuracy.
5. Constraints and Format: Specify output format (JSON, markdown, etc.), set length limits, and define what to avoid.
ABV’s Role in Prompt Engineering:ABV helps you iterate on prompts systematically:
  • Version control to track changes and compare iterations
  • A/B testing to compare variants with statistical rigor
  • Metrics tracking to measure improvements objectively
  • Tracing to see prompts in context with real user interactions
  • Team collaboration via UI for cross-functional input
  • Quick rollbacks when changes don’t work as expected
Best Practices:
  1. Start simple, then iterate based on results
  2. Test with diverse inputs representing edge cases
  3. Measure performance metrics (latency, cost, quality)
  4. Use version control to track what works
  5. A/B test significant changes in production
  6. Document what works and why for team knowledge
  7. Keep prompts maintainable and readable for future iterations

Configuration & Setup

ABV prompts are cached client-side by default, so network-related issues are minimized after the first fetch. However, you can configure network behavior for initial requests.Caching Configuration:The default cache TTL is 60 seconds. You can customize this to reduce network calls:Python SDK:
JavaScript/TypeScript SDK:
Guaranteed Availability:For critical applications requiring 100% availability, use these strategies:1. Pre-fetch prompts on startup to populate the cache:
2. Provide fallback prompts for when the API is unavailable:
How caching works:
  • Cache hit: Prompt returned immediately from memory (no network call)
  • Stale cache: Old prompt returned immediately while revalidating in background (stale-while-revalidate pattern)
  • Cache miss: Prompt fetched from API (ABV uses Redis cache for low latency ~15-50ms median)
See also: Guaranteed Availability Guide for comprehensive strategies.

Performance & Reliability

ABV prompts are automatically cached client-side in the SDKs with intelligent background revalidation, ensuring minimal latency impact.How Caching Works:
  1. Cache Hit - Prompt in cache and fresh → returned immediately (0ms network overhead)
  2. Stale Cache - Prompt in cache but expired → returned immediately, revalidated in background
  3. Cache Miss - First request → fetched from API (low latency, Redis-backed on ABV side)
Default Behavior:
Custom Cache Duration:Python SDK:
JavaScript/TypeScript SDK:
Pre-fetching for Zero Latency:Load prompts during application startup to eliminate runtime latency:
Fallback for 100% Availability:
Performance Benchmarks:From ABV’s testing (1000 sequential requests):Without caching (cache_ttl_seconds=0):
  • Median latency: ~50ms
  • 95th percentile: ~100ms
  • 99th percentile: ~150ms
With caching enabled (default):
  • Cached requests: 0ms (instant, in-memory)
  • Stale-while-revalidate: 0ms (instant return, background update)
Best Practices:
  1. Production: Use default 60s cache or longer (5-10 minutes) for stable prompts
  2. Development: Disable cache to see changes immediately
  3. Critical paths: Pre-fetch prompts on application startup
  4. High availability: Implement fallback prompts for mission-critical flows
  5. Staging: Use moderate cache (30-60s) for balance between freshness and performance
  6. Monitor: Check ABV status page (status.abv.dev) for API availability
When to Adjust Cache TTL:
  • Increase TTL: Stable production prompts, reduce API calls, improve performance
  • Decrease TTL: Frequently updated prompts, need faster updates
  • Disable (0s): Local development, testing prompt changes in real-time
  • Pre-fetch: Startup-critical prompts, serverless cold start optimization
See also: Client-Side Caching Guide for technical implementation details.

Advanced Features

ABV provides built-in version control for all prompts with automatic versioning and label-based deployment.Automatic Versioning:Every time you create or update a prompt, ABV automatically assigns an incrementing version number:
Labels for Deployment:Use labels to manage which version is deployed to different environments:
Fetching Specific Versions:
Version Comparison:The ABV UI provides a diff view to compare prompt versions:
  • See exactly what changed between versions (text diff)
  • Track who made changes and when (audit trail)
  • Review config changes alongside prompt changes
  • View commit messages explaining why changes were made
Rollback:To rollback to a previous version, simply reassign the production label:
Or perform the rollback in the UI with one click.Protected Labels:For additional production safety, admins can mark labels as “protected”:
  • Only admins/owners can modify protected labels
  • Prevents accidental changes to production prompts
  • Enforces change management process
  • Configure in project settings
Best Practices:
  1. Always use production label for deployed versions
  2. Use staging for testing before promoting to production
  3. Use descriptive labels for experiments (e.g., experiment-longer-context, variant-a)
  4. The latest label is automatically maintained by ABV (always points to newest version)
  5. Never delete old versions - keep history for debugging and rollback
  6. Use commit messages to document why changes were made
  7. Review diffs before promoting to production to catch unintended changes
Common Workflow:
  1. Develop prompt changes locally (use label="latest" and cache_ttl_seconds=0)
  2. Deploy to staging (labels=["staging"])
  3. Test in staging environment
  4. Review metrics and validate quality
  5. Promote to production by reassigning production label
  6. Monitor production metrics
  7. Rollback if issues detected (reassign production to previous version)
See also: Version Control Guide for deployment workflows.
ABV enables A/B testing by using labels to identify different prompt variants, then randomly selecting between them in your application.Step 1: Create Prompt VariantsCreate multiple versions and label them for your test:
Step 2: Implement Random SelectionPython SDK:
JavaScript/TypeScript SDK:
Step 3: Analyze ResultsNavigate to your prompt in the ABV UI and view the Metrics tab:Compare Metrics by Variant:
  • Response latency (median, p95, p99)
  • Token usage (input tokens, output tokens)
  • Cost per request
  • Quality scores (if you’re scoring responses via evaluations)
  • Volume/distribution between variants
Statistical Significance:
  • Run tests long enough to gather sufficient data (minimum 100-200 requests per variant)
  • Use statistical tests (t-test, Mann-Whitney U) to determine significance
  • Consider using staged rollout (90/10 split initially) for safety
See also: A/B Testing Guide for statistical rigor and best practices.Advanced: Weighted Distribution
Best Practices:
  1. Start with canary deployment (90/10 or 95/5) to limit blast radius
  2. Monitor error rates and user feedback closely during initial rollout
  3. Use A/B testing for significant changes (major rewrites, different approaches)
  4. Run tests long enough for statistical significance (don’t stop early)
  5. Consider user segments (test on subset of users first)
  6. Have rollback plan ready (can immediately switch back to variant A)
  7. Track multiple metrics (not just one - latency, cost, quality, user satisfaction)
  8. Document test hypotheses and results for organizational learning
When to Use A/B Testing:
  • Testing prompt improvements in production with real users
  • Validating changes before full rollout
  • When evaluation datasets don’t capture real usage patterns
  • For consumer apps where some variation is acceptable
  • After thorough testing on evaluation datasets (A/B test is final validation)

Integration & Tracing

ABV provides comprehensive metrics when you link prompts to traces, enabling performance tracking by prompt version.Step 1: Link prompts to generationsPython SDK:
JavaScript/TypeScript SDK:
Step 2: View metrics in ABV UINavigate to your prompt in the ABV UI and click the Metrics tab to see:Available Metrics:
  • Median generation latency - How long generations take
  • Median input tokens - Token count for prompts sent to LLM
  • Median output tokens - Token count for LLM responses
  • Median generation costs - Cost per generation (based on model pricing)
  • Generation count - Total number of generations using this prompt
  • Median score values - From evaluations or custom scores
  • First and last generation timestamps - When prompt was first/last used
Compare versions:
  • Use the UI to compare metrics across different prompt versions
  • A/B test variants to see which performs better
  • Track improvements over time as you iterate on prompts
Custom metrics: Add custom scores via the Scores API to track domain-specific metrics:
  • Accuracy (for tasks with right/wrong answers)
  • Relevance (how well response addresses the query)
  • User satisfaction (thumbs up/down, star ratings)
  • Hallucination rate (factual correctness)
  • Tone appropriateness (for customer-facing apps)
Example: Adding custom scores
Best Practices:
  1. Always link prompts to generations for metrics tracking
  2. Track multiple metrics (latency, cost, quality) not just one
  3. Use custom scores for domain-specific quality measures
  4. Compare versions systematically using A/B tests
  5. Monitor trends over time to catch regressions
  6. Set up alerts for anomalies (cost spikes, latency increases)
See also:

Next Steps

Get Started with Prompt Management

Complete quickstart guide for creating, versioning, and deploying prompts

Caching Prompts

Client-side caching implementation and stale-while-revalidate strategy

Version Control

Deploy and rollback prompts safely using labels and versions

A/B Testing Prompts

Run statistical A/B tests on prompt variants in production