agentleFS
patonkikhpatonkikh/APES/skills/ai/ai-solution-architect/skill.md

ai-solution-architect

Skill3 starsChanged 4 months agoMITView on GitHub

Design an AI system architecture: model selection, inference pipeline, context management, evaluation strategy, and cost/latency trade-offs. Use when working on prompt engineering, AI workflows, agents, context design, or LLM optimization.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Input: Use case description, PRD/NFRs, data sources, constraints (budget, latency, privacy)

    line 16
  2. Distinctive:

    Start with simplest architecture that meets quality bar.

    line 120
  3. Distinctive:

    Document AI-specific ADRs for model and RAG decisions.

    line 124

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

AI Solution Architect

Purpose

Design an AI system architecture: model selection, inference pipeline, context management, evaluation strategy, and cost/latency trade-offs.

Input: Use case description, PRD/NFRs, data sources, constraints (budget, latency, privacy)
Output: AI Architecture document with component diagram, model strategy, and quality gates Examples: See examples.md for worked input/output.


Workflow

Step 1: Classify the AI use case

Categorize:

DimensionClassification
InteractionBatch / real-time / streaming
Task typeGeneration / classification / retrieval / agentic
User-facingYes / internal tool
Risk levelLow / medium / high (customer-facing, regulated)

Step 2: Define quality requirements

MetricTargetMeasurement

Include: accuracy, latency (p50/p95), cost per request, hallucination tolerance, human-in-the-loop needs.

Step 3: Design inference pipeline

Document stages:

Input → Preprocessing → Context assembly → Model inference → Post-processing → Output

For each stage: technology, responsibility, failure mode.

Step 4: Select model strategy

Compare options:

OptionModel typeProsConsCost estimate

Options: frontier API, fine-tuned, open-weight self-hosted, ensemble, router.

Recommend with rationale tied to quality requirements.

Step 5: Plan context and memory

  • Context window budget allocation
  • RAG vs fine-tuning vs prompt-only decision
  • Session memory strategy
  • Tool/MCP integration points

Step 6: Define evaluation and guardrails

  • Offline eval dataset requirements
  • Online monitoring metrics
  • Guardrails (input/output filters, HITL triggers)
  • Rollback criteria

Step 7: Validate

Run Validation checklist.


Decision Rules

ConditionAction
Use case undefinedStop; request problem statement or PRD
High-risk customer-facing without HITLRequire human-in-the-loop in architecture
Latency < 1s with RAG + large contextFlag latency risk; recommend caching or smaller model
PII in promptsRequire data minimization and redaction layer
No eval strategyBlock proceed; eval is mandatory for production

Validation

  • Use case classified with risk level
  • Quality metrics with targets defined
  • Inference pipeline documented end-to-end
  • ≥2 model options compared with trade-offs
  • Context/memory strategy defined
  • Eval plan with offline and online components
  • Guardrails specified for risk level
  • Cost estimate order-of-magnitude provided

Anti-patterns

  • Model-first design — choosing GPT-4 before defining requirements.
  • No eval — shipping without measurement strategy.
  • RAG as default — applying RAG without retrieval need analysis.
  • Ignoring cost — architecture without cost per request estimate.
  • Unbounded context — stuffing full documents without budget.

Best Practices

  • Start with simplest architecture that meets quality bar.
  • Separate retrieval, reasoning, and generation stages.
  • Plan for model fallback and degradation.
  • Align with architecture/scalability-advisor for infra scaling.
  • Document AI-specific ADRs for model and RAG decisions.

Output Structure

# AI Architecture: [System Name]

## Use Case Classification
| Dimension | Value |
|-----------|-------|

## Quality Requirements
| Metric | Target | Method |
|--------|--------|--------|

## Inference Pipeline
[Stage diagram and descriptions]

## Model Strategy
| Recommended | Rationale | Alternatives |
|-------------|-----------|--------------|

## Context & Memory
[Strategy]

## Evaluation Plan
| Type | Dataset | Metrics | Frequency |
|------|---------|---------|-----------|

## Guardrails
| Layer | Control | Trigger |
|-------|---------|---------|

## Cost Estimate
[Per-request and monthly at projected volume]

## Open Decisions
- [ ] [ADR needed]

Next Skills

OutcomeRecommended Skill
Design promptsai/prompt-engineer
Plan context strategyai/context-engineering
RAG architecture neededrag/rag-architecture-designer
Review promptsai/prompt-reviewer
System architecturearchitecture/solution-architecture

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.