Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add RBraga01/builder-ai --skill rag-pipeline-designgit clone --depth 1 https://github.com/RBraga01/builder-aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rbraga01/builder-ai/rag-pipeline-design)<a href="https://agentmods.dev/skills/rbraga01/builder-ai/rag-pipeline-design"><img src="https://agentmods.dev/badge/skills/rbraga01/builder-ai/rag-pipeline-design/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rbraga01/builder-ai/rag-pipeline-design"><img src="https://agentmods.dev/badge/skills/rbraga01/builder-ai/rag-pipeline-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.01255 |
| Opus 5.5 | $0.00016 | $0.00502 |
| Sonnet 5.5 | $0.00008 | $0.00251 |
| Haiku 4.5 | $0.00004 | $0.00126 |
Grade A, and why
rag-pipeline-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RAG Pipeline Design
The Law
YOU CANNOT DESIGN A RAG PIPELINE WITHOUT FIRST AUDITING THE DATA AND THE QUERIES.
"Standard chunking" fails on structured documents.
"The embedding model worked for someone else" is not a validation.
A data audit + query audit + stage-by-stage decision log IS a design.
When to Use
Trigger when:
- Starting a new RAG feature from scratch
- Debugging retrieval quality issues (hallucination, missed context, low recall)
- Upgrading an embedding model or retrieval strategy
- Adding or removing a reranker
- Changing chunk size, overlap, or ingestion strategy
The Process
A RAG pipeline has five stages. Design each explicitly — do not accept defaults.
Step 0 — Audit Before Designing
Answer both audits before making any pipeline decision:
Data Audit:
- Source format: PDF / HTML / JSON / code / mixed?
- Average document length (tokens)?
- Is document structure (headings, sections, tables) load-bearing for meaning?
- How frequently does content change?
- Any formatting that will survive chunking (tables, numbered lists, code blocks)?
Query Audit:
- Dominant query type: lookup / comparison / synthesis / aggregation?
- Expected answer length: short fact / paragraph / multi-section?
- Does the user need source attribution?
- Is multi-hop reasoning required (answer requires combining facts across documents)?
Every design decision below flows from these two audits.
Step 1 — Chunking
| Document Type | Strategy | Chunk Size | Overlap |
|---|---|---|---|
| Prose / narrative | Sentence boundary | 256–400 tokens | 15% |
| Structured (headings, sections) | Section boundary | 512–800 tokens | 10% |
| Code | Function / class boundary | Variable | None |
| Tables / CSV | Row or row-group | 128–256 tokens | None |
Always attach metadata to every chunk: source, date, section, page, chunk_index.
Step 2 — Embedding
Choose based on domain, not on general benchmark:
- Select 3 candidate models
- Build a 20-example similarity test set from your actual corpus (10 similar pairs, 10 dissimilar)
- Run all 3 candidates against the test set
- Pick the model with the highest correct rank correlation on your domain
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 130 lines · 40 tokens per session scan A 93d5125d3471
rag-pipeline-design is a skill published in the GitHub repository RBraga01/builder-ai (2 stars, last pushed 2d ago), licensed MIT. It adds 40 tokens to every session and 1,255 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
rag-pipeline-design compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rag-pipeline-designRBraga01/builder-ai | Skill | 2 | 2d ago | MIT | A | 40 | Claude Code |
| ai-engineering-toolkitsickn33/agentic-awesome-skills | Skill | 51k | today | MIT | A | 47 | Claude Code |
| ai-llm-integration-expertroedyrustam/vibes-plug | Skill | 129 | 3d ago | MIT | A | 45 | Cursor |
| graph-rag-knowledge-expertroedyrustam/vibes-plug | Skill | 129 | 3d ago | MIT | A | 45 | Cursor |
| context-window-engineerroedyrustam/vibes-plug | Skill | 129 | 3d ago | MIT | A | 38 | Cursor |
| fga-rebac-authorization-expertroedyrustam/vibes-plug | Skill | 129 | 3d ago | MIT | A | 44 | Cursor |
| vector-db-rag-expertroedyrustam/vibes-plug | Skill | 129 | 3d ago | MIT | A | 47 | Cursor |