Your First Solution Play
This guide walks you through scaffolding, exploring, deploying, and evaluating Play 01: Enterprise RAG Q&A β the most popular FrootAI solution play.
What Youβll Build
A production-ready RAG (Retrieval-Augmented Generation) pipeline that deploys:
| Service | Purpose | SKU (Dev) |
|---|---|---|
| Azure OpenAI | LLM inference (GPT-4o) | S0, 30K TPM |
| Azure AI Search | Vector + hybrid retrieval | Basic |
| Azure Container Apps | Application hosting | Consumption |
| Azure Key Vault | Secrets management | Standard |
Prerequisites
- FrootAI installed (Installation)
- Azure CLI authenticated (
az login) - Azure subscription with Contributor role
Step 1 β Choose Your Play
Browse available plays to find the right fit:
CLI
# List all 100 solution plays
npx frootai plays list
# Get details for Play 01
npx frootai plays get 01Use the ConfiguratorΒ for an interactive recommendation wizard that matches your requirements to the best play.
Step 2 β Initialize the DevKit
Scaffold the complete play structure:
npx frootai init-devkit 01
cd solution-plays/01-enterprise-ragThis creates the full four-kit structure:
01-enterprise-rag/
βββ .github/ # DevKit β Copilot brain
β βββ copilot-instructions.md # Always-on solution context (under 150 lines)
β βββ agents/
β β βββ builder.agent.md # Builds the RAG pipeline
β β βββ reviewer.agent.md # Reviews security + quality
β β βββ tuner.agent.md # Validates config + thresholds
β βββ instructions/
β β βββ rag-patterns.instructions.md
β βββ skills/
β β βββ rag-indexer/SKILL.md # Step-by-step indexing procedure
β βββ hooks/
β βββ guardrails.json # SessionStart event guardrails
βββ config/ # TuneKit β customer-tunable params
β βββ openai.json # Model, temperature, tokens
β βββ guardrails.json # Quality thresholds
βββ spec/ # SpecKit β architecture docs
β βββ 001-architecture.md
βββ infra/ # Infrastructure β Azure Bicep
β βββ main.bicep
β βββ parameters.json
βββ evaluation/ # Evaluation pipeline
β βββ test-set.jsonl
βββ fai-manifest.json # FAI Protocol wiringStep 3 β Explore the Generated Files
The Manifest (fai-manifest.json)
The manifest is the playβs DNA β it wires everything together:
{
"play": "01-enterprise-rag",
"version": "1.0.0",
"context": {
"knowledge": ["R2-RAG-Architecture", "O4-Azure-AI-Services"],
"waf": ["security", "reliability", "cost-optimization"]
},
"primitives": {
"agents": ["./.github/agents/builder.agent.md"],
"instructions": ["./.github/copilot-instructions.md"],
"skills": ["./.github/skills/rag-indexer"],
"hooks": ["../../hooks/frootai-secrets-scanner/"],
"guardrails": {
"groundedness": 0.95,
"coherence": 0.90,
"safety": 0,
"costPerQuery": 0.02
}
}
}TuneKit Config (config/openai.json)
Customer-tunable AI parameters β adjust these for your use case:
{
"model": "gpt-4o",
"temperature": 0.3,
"max_tokens": 4096,
"top_p": 0.95,
"fallback_model": "gpt-4o-mini"
}Step 4 β Deploy to Azure
Create the Resource Group
PLAY="01-enterprise-rag"
ENV="dev"
RG="rg-frootai-${PLAY}-${ENV}"
az group create --name "$RG" --location eastus2 \
--tags play="$PLAY" environment="$ENV" managed-by="frootai"Preview Changes
Always preview before deploying:
az deployment group what-if \
--resource-group "$RG" \
--template-file infra/main.bicep \
--parameters infra/parameters.json \
--mode IncrementalDeploy Infrastructure
az deployment group create \
--resource-group "$RG" \
--template-file infra/main.bicep \
--parameters infra/parameters.json \
--name "frootai-${PLAY}-$(date +%Y%m%d)" \
--mode IncrementalEnsure you have sufficient Azure OpenAI quota in your target region. Request quota increases in the Azure Portal if needed.
Step 5 β Run Evaluation
Validate Primitive Wiring
# Schema + naming + frontmatter validation
npm run validate:primitives
# Load play in the FAI Engine
node engine/index.js fai-manifest.json --statusRun Quality Gates
# Evaluate against guardrail thresholds
node engine/index.js fai-manifest.json --evalAll guardrails defined in fai-manifest.json must pass:
| Metric | Threshold | What It Measures |
|---|---|---|
| Groundedness | β₯ 0.95 | Responses supported by retrieved sources |
| Coherence | β₯ 0.90 | Logical consistency and readability |
| Safety | 0 violations | No harmful content generated |
| Cost per Query | β€ $0.02 | Token usage within budget |
Post-Deployment Health Check
APP_URL="https://your-container-app.azurecontainerapps.io"
# Health check
curl -sf "${APP_URL}/health" | jq .
# Smoke test
curl -sf -X POST "${APP_URL}/api/chat" \
-H "Content-Type: application/json" \
-d '{"query":"What is the onboarding process?"}' | jq '.answer'Whatβs Next?
- FAI Protocol β understand how the manifest wires primitives
- Solution Plays β explore all 100 plays
- Well-Architected Framework β the 6 WAF pillars
- How to Contribute β create your own play