Skip to Content
Solution PlaysPlay 18: Play 18 β€” Prompt Management πŸ“

Play 18 β€” Prompt Management πŸ“

Versioned prompt registry with A/B testing, injection defense, and token optimization.

Manage prompts as first-class assets. Cosmos DB stores versioned templates, A/B testing compares variants with statistical significance, injection defense layers protect against prompt attacks, and analytics track usage across applications.

Quick Start

cd solution-plays/18-prompt-management az deployment group create -g $RG -f infra/main.bicep -p infra/parameters.json code . # Use @builder for registry/A-B, @reviewer for injection audit, @tuner for token optimization

Architecture

πŸ“ Full architecture details

ServicePurpose
Cosmos DBPrompt registry (versioned storage, per-env containers)
Azure FunctionsPrompt serving API (get/create/activate/rollback)
Azure OpenAIPrompt testing and A/B evaluation
Application InsightsPrompt usage analytics

Key Capabilities

FeatureDetails
VersioningSemantic versioning with rollback
A/B TestingTraffic splitting with statistical significance
Injection DefenseInput sanitization, prompt armor, output validation
Token OptimizationTemplate compression, dynamic few-shot
AnalyticsUsage tracking per app, per prompt, per version

DevKit (Prompt Engineering-Focused)

PrimitiveWhat It Does
3 agentsBuilder (registry/A-B framework), Reviewer (injection/quality audit), Tuner (token/few-shot/caching)
3 skillsDeploy (111 lines), Evaluate (101 lines), Tune (114 lines)
4 prompts/deploy (registry + A/B), /test (templates), /review (injection/compliance), /evaluate (quality)

Note: This is a prompt engineering/MLOps play. TuneKit covers token budgets, A/B test configuration, few-shot selection strategies, template compression, and prompt caching β€” not infrastructure sizing.

Cost Estimate

ServiceDev/PoCProductionEnterprise
Blob Storage$1/mo$5/mo$15/mo
Container Apps$5/mo$60/mo$200/mo
Cosmos DB$3/mo$50/mo$180/mo
Azure OpenAI$20/mo$100/mo$350/mo
Azure Functions$0/mo$8/mo$75/mo
Key Vault$1/mo$3/mo$10/mo
Application Insights$0/mo$15/mo$50/mo
Total$30/mo$241/mo$880/mo

πŸ’° Full cost breakdown

πŸ“– Full docs Β· 🌐 frootai.dev/solution-plays/18-prompt-managementΒ 

FAI Manifest

FieldValue
Play18-prompt-management
Version1.0.0
KnowledgeR1-Prompt-Patterns, O1-Semantic-Kernel
WAF Pillarssecurity, cost-optimization, operational-excellence
Groundednessβ‰₯ 85%
Safety0 violations max
Last updated on