agentleFS
TakaGotoTakaGoto/rag-learning-academy/.claude/skills/architecture/SKILL.md

architecture

Skill24 starsChanged 19 days agoMITView on GitHub

Design a RAG architecture for a specific use case

143 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use intelligent-routing, bash-linux and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 6 projects that use this

  • xenitV1Skill

    bash-linux

    Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

    Also in 8 projects that use this

  • xenitV1Skill

    red-team-tactics

    Red team tactics principles based on MITRE ATT&CK. Attack phases, detection evasion, reporting.

    Also in 8 projects that use this

  • SKB3002Skill

    nextjs-react-expert

    React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.

    Also in 3 projects that use this

  • +8 more from xenitV1

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 123 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the learner to describe their use case.

    line 12
  2. Distinctive:

    Create an ASCII architecture diagram showing the full pipeline:

    line 66
  3. Distinctive:

    V1: Add proper chunking, metadata, and prompt engineering

    line 113
  4. Distinctive:

    V2: Add evaluation, re-ranking, and hybrid search

    line 114
  5. Distinctive:

    Production: Add caching, monitoring, error handling, and scaling

    line 115
  6. Very specific:

    Ask the learner if anything does not feel right or if they have concerns.

    line 121
  7. Distinctive:

    Start simple and add complexity only when needed

    line 132
  8. Distinctive:

    Always consider cost, maintainability, and the learner's current skill level

    line 133

“Common” is measured: kept by at least 6 in 10 of the 123 edited versions of this file we could read. “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

Architecture: Design a RAG System for Your Use Case

Guide the learner through the process of designing a complete RAG architecture tailored to a specific use case. This skill builds system design thinking.

Step 1: Understand the Use Case

Ask the learner to describe their use case. If they do not have one, offer example scenarios:

  • Customer support chatbot over product documentation
  • Legal document Q&A for a law firm
  • Internal knowledge base for a software team
  • Research paper search and synthesis
  • Multilingual FAQ system for an e-commerce platform
  • Code documentation assistant

For their use case, gather the following requirements:

  1. Document types: What kinds of documents? (PDFs, HTML, code, structured data)
  2. Corpus size: How many documents? Total size?
  3. Query patterns: What kinds of questions will users ask?
  4. Accuracy requirements: How critical is correctness? (casual chatbot vs. medical advice)
  5. Latency requirements: What response time is acceptable?
  6. Scale: How many queries per day? How often does the corpus update?
  7. Budget constraints: Open-source only, or can you use paid APIs?

Step 2: Walk Through Architecture Decisions

For each component, explain the options and help the learner choose:

Document Processing

  • File format handling and extraction
  • Cleaning and preprocessing steps
  • Metadata extraction strategy

Chunking Strategy

  • Fixed-size, semantic, document-structure, or hybrid
  • Chunk size and overlap recommendations for their document types
  • Metadata to attach to each chunk

Embedding Model

  • Open-source vs. API-based
  • Model size vs. quality trade-off
  • Domain-specific considerations (e.g., code embeddings, multilingual)

Vector Database

  • In-memory (FAISS, Chroma) vs. hosted (Pinecone, Weaviate) vs. self-hosted (Qdrant, Milvus)
  • Filtering and metadata requirements
  • Scale and cost considerations

Retrieval Strategy

  • Dense, sparse, or hybrid search
  • Top-k selection and re-ranking
  • Multi-stage retrieval if needed

Generation Model

  • Model selection (GPT-4, Claude, open-source)
  • Prompt design for their use case
  • Output format and guardrails

Step 3: Produce the Architecture Diagram

Create an ASCII architecture diagram showing the full pipeline:

  Documents          Ingestion Pipeline          Query Pipeline
  ---------          ------------------          --------------
  [PDFs]  --->  [ Loader ] --> [ Chunker ]       [ User Query ]
  [HTML]  --->  [ Cleaner ] -> [ Embedder ]          |
  [Docs]  --->  [ Metadata ]      |              [ Embedder ]
                                  v                  |
                            [ Vector DB ] <--- [ Retriever ]
                                                     |
                                               [ Re-ranker ]
                                                     |
                                               [ Generator ]
                                                     |
                                                [ Answer ]

Customize the diagram to match their specific architecture decisions.

Step 4: Create the Decision Document

Generate a structured architecture decision document saved to projects/[project-name]/architecture.md:

# RAG Architecture: [Use Case Name]

## Requirements Summary
[bulleted list from Step 1]

## Architecture Decisions
[for each component: choice, rationale, alternatives considered]

## Architecture Diagram
[ASCII diagram from Step 3]

## Implementation Plan
[ordered list of components to build, with estimated effort]

## Risks and Mitigations
[key risks and how to address them]

Step 5: Implementation Roadmap

Break the architecture into buildable stages:

  1. MVP: Minimum viable pipeline (basic chunking + embeddings + simple retrieval)
  2. V1: Add proper chunking, metadata, and prompt engineering
  3. V2: Add evaluation, re-ranking, and hybrid search
  4. Production: Add caching, monitoring, error handling, and scaling

For each stage, suggest which /build exercises to complete.

Step 6: Review and Iterate

Ask the learner if anything does not feel right or if they have concerns. Architecture is iterative — encourage them to revisit this document as they build and learn. Update progress/module-tracker.md to note the architecture exercise.

Suggest 2-3 relevant next steps using slash commands:

  • /build — start building the MVP stage of your architecture
  • /challenge — take on a real-world challenge that puts your architecture to the test
  • /compare — compare alternative approaches for any component you are uncertain about

Guidelines

  • There is no single correct architecture — help the learner understand trade-offs
  • Start simple and add complexity only when needed
  • Always consider cost, maintainability, and the learner's current skill level
  • Connect architecture decisions back to curriculum concepts

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.