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:
# List all 100 solution plays
npx frootai plays list
# Get details for Play 01
npx frootai plays get 01
Use 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-rag
This 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 wiring
Step 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 Incremental
Deploy 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 Incremental
Ensure 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 --status
Run Quality Gatesโ
# Evaluate against guardrail thresholds
node engine/index.js fai-manifest.json --eval
All 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