LLM App Builder — LLM App Development Pipeline
An agent team collaborates to develop LLM apps through prompt engineering > RAG pipeline > evaluation > optimization > deployment.
Execution Mode
Agent Team — Five agents communicate directly via SendMessage and perform cross-validation.
Agent Composition
| Agent |
File |
Role |
Type |
| prompt-engineer |
.claude/agents/prompt-engineer.md |
Prompt design |
general-purpose |
| rag-architect |
.claude/agents/rag-architect.md |
RAG pipeline |
general-purpose |
| eval-specialist |
.claude/agents/eval-specialist.md |
Evaluation framework |
general-purpose |
| optimization-engineer |
.claude/agents/optimization-engineer.md |
Cost/performance optimization |
general-purpose |
| deploy-engineer |
.claude/agents/deploy-engineer.md |
Production deployment |
general-purpose |
Workflow
Phase 1: Preparation (performed directly by the orchestrator)
- Extract the following from user input:
- App purpose: What the LLM app does
- Data sources: Documents/data for RAG (optional)
- LLM model: Model to use (default: Claude/GPT-4o)
- Deployment environment: API/web app/chatbot/internal tool
- Budget: Monthly API cost budget
- Constraints (optional): Security, regulatory, performance requirements
- Create the
_workspace/ directory at the project root
- Organize the input and save it to
_workspace/00_input.md
- Create the
_workspace/src/ directory
- Determine the execution mode based on the scope of the request
Phase 2: Team Assembly and Execution
| Order |
Task |
Owner |
Dependencies |
Deliverable |
| 1a |
Prompt design |
prompt |
None |
_workspace/01_prompt_design.md |
| 1b |
RAG pipeline |
rag |
None |
_workspace/02_rag_pipeline.md + src/ |
| 2 |
Evaluation framework |
eval |
Tasks 1a, 1b |
_workspace/03_eval_framework.md + src/ |
| 3 |
Optimization |
optimizer |
Task 2 |
_workspace/04_optimization.md + src/ |
| 4 |
Deployment config |
deploy |
Tasks 1b, 3 |
_workspace/05_deploy_config.md + src/ |
Tasks 1a (prompt) and 1b (RAG) run in parallel.
Inter-agent communication flow:
- prompt completes > passes context injection format to rag, passes expected outputs to eval
- rag completes > passes retrieval test data to eval, passes vector DB infra requirements to deploy
- eval completes > passes performance baseline to optimizer, passes weakness feedback to prompt
- optimizer completes > passes cache/routing config to deploy
- deploy integrates all components to complete the production deployment configuration
Phase 3: Integration and Final Deliverables
- Verify that the code in
_workspace/src/ is executable
- Confirm that evaluation metrics meet the standards
- Validate that deployment configuration is complete
- Report the final summary to the user:
- Prompt design —
01_prompt_design.md
- RAG pipeline —
02_rag_pipeline.md
- Evaluation framework —
03_eval_framework.md
- Optimization strategy —
04_optimization.md
- Deployment config —
05_deploy_config.md
- Source code —
src/
Execution Modes by Request Scope
| User Request Pattern |
Execution Mode |
Agents Deployed |
| "Build me an LLM app", "full RAG app" |
Full pipeline |
All 5 agents |
| "Just design prompts" |
Prompt mode |
prompt + eval |
| "Just build the RAG pipeline" |
RAG mode |
rag + eval + deploy |
| "Build an LLM app evaluation system" |
Eval mode |
eval only |
| "Optimize the cost of an existing app" |
Optimization mode |
optimizer + eval |
| "Set up production deployment" |
Deploy mode |
deploy only |
When RAG is not needed: If the user specifies there is no external data source, skip the rag agent.
Reusing existing files: If the user provides existing prompts, RAG configs, or code, copy them to the appropriate numbered location in _workspace/ and skip the corresponding agent. Example: Existing prompt provided > copy to _workspace/01_prompt_design.md > skip prompt and deploy remaining agents.
Data Transfer Protocol
| Strategy |
Method |
Purpose |
| File-based |
_workspace/ directory |
Design documents and configuration sharing |
| Message-based |
SendMessage |
Real-time key information transfer, feedback |
| Code-based |
_workspace/src/ |
Executable source code |
Error Handling
| Error Type |
Strategy |
| No LLM API key |
Provide environment variable setup guide, suggest local model alternatives |
| No RAG data source |
Build as a pure LLM app without RAG, provide guide for adding RAG later |
| No evaluation dataset |
Generate synthetic data with LLM, provide manual verification guide |
| Projected budget overrun |
Suggest small model routing, enhanced caching, request limits |
| Agent failure |
Retry once > if still failing, proceed without that deliverable |
Test Scenarios
Normal Flow
Prompt: "Build me an employee Q&A chatbot based on internal company documents. About 500 Confluence docs. Monthly budget $200"
Expected result:
- Prompt: Q&A system prompt, forced source citation, hallucination prevention guardrails
- RAG: Confluence > markdown conversion > semantic chunking > text-embedding-3-small > Chroma
- Evaluation: 20 golden Q&A sets, Recall@5, faithfulness LLM-as-Judge
- Optimization: Semantic caching (expected 40% hit rate), small model routing (simple questions)
- Deployment: FastAPI + Docker + cost ceiling $200/month
Existing File Reuse Flow
Prompt: "Based on this RAG code, just do evaluation framework and optimization" + RAG code attached
Expected result:
- Copy existing code to
_workspace/src/, copy RAG design to _workspace/02_rag_pipeline.md
- Skip rag; deploy eval + optimizer + deploy
- Extract prompt from existing code
Error Flow
Prompt: "Build me an AI app" (purpose/data unclear)
Expected result:
- Request user to clarify app purpose and data sources
- Ask questions to determine RAG necessity
- Proceed with appropriate mode after confirmation
Agent Extension Skills
Extension skills that enhance agent domain expertise:
| Skill |
File |
Target Agent |
Role |
| prompt-optimizer |
.claude/skills/prompt-optimizer/skill.md |
prompt-engineer, eval-specialist |
CRISP rubric, RCTF template, guardrail patterns, A/B testing, token optimization |
| chunking-strategy-guide |
.claude/skills/chunking-strategy-guide/skill.md |
rag-architect, eval-specialist |
Chunking strategy comparison, semantic chunking algorithm, per-document preprocessing, quality metrics |
1---2name: llm-app-builder3description: Full pipeline where an agent team collaborates to develop an LLM app. Use this skill for requests like 'build me an LLM app', 'AI app development', 'build a RAG system', 'GPT app', 'AI chatbot development', 'prompt engineering', 'LLM pipeline', 'AI assistant development', 'generative AI app', 'RAG pipeline', and other LLM-based app development tasks. Also supports prompt-only mode when only prompt design is needed. Note: LLM model training (running fine-tuning), GPU infrastructure construction, and model serving (vLLM/TGI deployment) are outside the scope of this skill.4---56# LLM App Builder — LLM App Development Pipeline78An agent team collaborates to develop LLM apps through prompt engineering > RAG pipeline > evaluation > optimization > deployment.910## Execution Mode1112**Agent Team** — Five agents communicate directly via SendMessage and perform cross-validation.1314## Agent Composition1516| Agent | File | Role | Type |17|-------|------|------|------|18| prompt-engineer | `.claude/agents/prompt-engineer.md` | Prompt design | general-purpose |19| rag-architect | `.claude/agents/rag-architect.md` | RAG pipeline | general-purpose |20| eval-specialist | `.claude/agents/eval-specialist.md` | Evaluation framework | general-purpose |21| optimization-engineer | `.claude/agents/optimization-engineer.md` | Cost/performance optimization | general-purpose |22| deploy-engineer | `.claude/agents/deploy-engineer.md` | Production deployment | general-purpose |2324## Workflow2526### Phase 1: Preparation (performed directly by the orchestrator)27281. Extract the following from user input:29 - **App purpose**: What the LLM app does30 - **Data sources**: Documents/data for RAG (optional)31 - **LLM model**: Model to use (default: Claude/GPT-4o)32 - **Deployment environment**: API/web app/chatbot/internal tool33 - **Budget**: Monthly API cost budget34 - **Constraints** (optional): Security, regulatory, performance requirements352. Create the `_workspace/` directory at the project root363. Organize the input and save it to `_workspace/00_input.md`374. Create the `_workspace/src/` directory385. **Determine the execution mode** based on the scope of the request3940### Phase 2: Team Assembly and Execution4142| Order | Task | Owner | Dependencies | Deliverable |43|-------|------|-------|-------------|-------------|44| 1a | Prompt design | prompt | None | `_workspace/01_prompt_design.md` |45| 1b | RAG pipeline | rag | None | `_workspace/02_rag_pipeline.md` + `src/` |46| 2 | Evaluation framework | eval | Tasks 1a, 1b | `_workspace/03_eval_framework.md` + `src/` |47| 3 | Optimization | optimizer | Task 2 | `_workspace/04_optimization.md` + `src/` |48| 4 | Deployment config | deploy | Tasks 1b, 3 | `_workspace/05_deploy_config.md` + `src/` |4950Tasks 1a (prompt) and 1b (RAG) run **in parallel**.5152**Inter-agent communication flow:**53- prompt completes > passes context injection format to rag, passes expected outputs to eval54- rag completes > passes retrieval test data to eval, passes vector DB infra requirements to deploy55- eval completes > passes performance baseline to optimizer, passes weakness feedback to prompt56- optimizer completes > passes cache/routing config to deploy57- deploy integrates all components to complete the production deployment configuration5859### Phase 3: Integration and Final Deliverables60611. Verify that the code in `_workspace/src/` is executable622. Confirm that evaluation metrics meet the standards633. Validate that deployment configuration is complete644. Report the final summary to the user:65 - Prompt design — `01_prompt_design.md`66 - RAG pipeline — `02_rag_pipeline.md`67 - Evaluation framework — `03_eval_framework.md`68 - Optimization strategy — `04_optimization.md`69 - Deployment config — `05_deploy_config.md`70 - Source code — `src/`7172## Execution Modes by Request Scope7374| User Request Pattern | Execution Mode | Agents Deployed |75|---------------------|---------------|----------------|76| "Build me an LLM app", "full RAG app" | **Full pipeline** | All 5 agents |77| "Just design prompts" | **Prompt mode** | prompt + eval |78| "Just build the RAG pipeline" | **RAG mode** | rag + eval + deploy |79| "Build an LLM app evaluation system" | **Eval mode** | eval only |80| "Optimize the cost of an existing app" | **Optimization mode** | optimizer + eval |81| "Set up production deployment" | **Deploy mode** | deploy only |8283**When RAG is not needed**: If the user specifies there is no external data source, skip the rag agent.8485**Reusing existing files**: If the user provides existing prompts, RAG configs, or code, copy them to the appropriate numbered location in `_workspace/` and skip the corresponding agent. Example: Existing prompt provided > copy to `_workspace/01_prompt_design.md` > skip prompt and deploy remaining agents.8687## Data Transfer Protocol8889| Strategy | Method | Purpose |90|----------|--------|---------|91| File-based | `_workspace/` directory | Design documents and configuration sharing |92| Message-based | SendMessage | Real-time key information transfer, feedback |93| Code-based | `_workspace/src/` | Executable source code |9495## Error Handling9697| Error Type | Strategy |98|-----------|----------|99| No LLM API key | Provide environment variable setup guide, suggest local model alternatives |100| No RAG data source | Build as a pure LLM app without RAG, provide guide for adding RAG later |101| No evaluation dataset | Generate synthetic data with LLM, provide manual verification guide |102| Projected budget overrun | Suggest small model routing, enhanced caching, request limits |103| Agent failure | Retry once > if still failing, proceed without that deliverable |104105## Test Scenarios106107### Normal Flow108**Prompt**: "Build me an employee Q&A chatbot based on internal company documents. About 500 Confluence docs. Monthly budget $200"109**Expected result**:110- Prompt: Q&A system prompt, forced source citation, hallucination prevention guardrails111- RAG: Confluence > markdown conversion > semantic chunking > text-embedding-3-small > Chroma112- Evaluation: 20 golden Q&A sets, Recall@5, faithfulness LLM-as-Judge113- Optimization: Semantic caching (expected 40% hit rate), small model routing (simple questions)114- Deployment: FastAPI + Docker + cost ceiling $200/month115116### Existing File Reuse Flow117**Prompt**: "Based on this RAG code, just do evaluation framework and optimization" + RAG code attached118**Expected result**:119- Copy existing code to `_workspace/src/`, copy RAG design to `_workspace/02_rag_pipeline.md`120- Skip rag; deploy eval + optimizer + deploy121- Extract prompt from existing code122123### Error Flow124**Prompt**: "Build me an AI app" (purpose/data unclear)125**Expected result**:126- Request user to clarify app purpose and data sources127- Ask questions to determine RAG necessity128- Proceed with appropriate mode after confirmation129130## Agent Extension Skills131132Extension skills that enhance agent domain expertise:133134| Skill | File | Target Agent | Role |135|-------|------|-------------|------|136| prompt-optimizer | `.claude/skills/prompt-optimizer/skill.md` | prompt-engineer, eval-specialist | CRISP rubric, RCTF template, guardrail patterns, A/B testing, token optimization |137| chunking-strategy-guide | `.claude/skills/chunking-strategy-guide/skill.md` | rag-architect, eval-specialist | Chunking strategy comparison, semantic chunking algorithm, per-document preprocessing, quality metrics |