Prompt Management

Version, test, and optimize every prompt.

Stop guessing which prompt works best. Version control, A/B test, and cache-optimize your entire prompt pipeline.

Version Control
Full History
A/B Testing
Built-in
Cache
Optimization
Validation
Variables
Features

Everything you need for prompt ops

Template Management

Create, update, and organize prompt templates with rich metadata and tagging.

Version Control

Every change creates a new version. Roll back instantly, compare versions, and audit changes.

A/B Testing

Test prompt variants with configurable traffic allocation and metric tracking.

Traffic Allocation

Fine-grained control over how traffic is distributed between variants.

Cache Optimization

Automatic prompt caching with hit rate analytics. Reduce latency and cost.

Variable Validation

Declare required variables per template. Catch missing or mistyped variables before they reach your LLM.

Templates

Create and render in seconds

Define templates with variables, then render them with type-safe parameters.

// Create a prompt template
const template = await fold.prompts.create({
  name: "code-review",
  content: "Review this {{language}} code for {{focus_area}}: \n{{code}}",
  variables: ["language", "focus_area", "code"],
  metadata: { team: "engineering" },
});

// Use the template
const prompt = await fold.prompts.render("code-review", {
  language: "TypeScript",
  focus_area: "performance",
  code: userCode,
});
A/B Testing

Test prompts like you test code

1

Define Variants

Create prompt variants with different content, tone, or structure. Assign weights to control traffic distribution.

2

Route Traffic

Fold automatically routes each request to a variant based on your weights. Sessions are sticky for consistent user experiences.

3

Measure Results

Track metrics per variant: response quality, user satisfaction, cost, and latency. Pick the winner with confidence.

// Create an A/B test
const test = await fold.prompts.createABTest({
  name: "system-prompt-v2",
  variants: [
    { id: "control", templateVersion: 3, weight: 50 },
    { id: "concise", templateVersion: 4, weight: 50 },
  ],
  metric: "user_satisfaction",
});

// Automatically routes traffic
const prompt = await fold.prompts.resolve("system-prompt-v2");
// Returns the variant selected for this session
Performance

Cache-optimized prompts

Automatic prompt caching reduces latency and cost. Monitor cache hit rates in your dashboard.

Cache Performance
Cache Hit Rate94.2%
Avg Latency Saved180ms
Monthly Cost Saved$127.40

Stop guessing. Start testing.

Version and optimize every prompt.