rag-architect
Designs and implements production-grade RAG systems by chunking documents, generating embeddings, configuring vector stores, building hybrid search pipelines…
Skill by https://github.com/Jeffallan
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mnsgrosa-rag-architect
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
rag-architect- Description
- Designs and implements production-grade RAG systems by chunking documents, generating embeddings, configuring vector stores, building hybrid search pipelines, applying reranking, and evaluating retrieval quality. Use when building RAG systems, vector databases, or knowledge-grounded AI applications requiring semantic search, document retrieval, context augmentation, similarity search, or embedding-based indexing.
- License
- MIT
- Metadata
- role: architect · scope: system-design · author: https://github.com/Jeffallan · domain: data-ml · version: 1.1.0 · triggers: RAG, retrieval-augmented generation, vector search, embeddings, semantic search, vector database, document retrieval, knowledge base, context retrieval, similarity search · output-format: architecture · related-skills: python-pro, database-optimizer, monitoring-expert, api-designer
- Instructions
- 181 lines in SKILL.md · view on GitHub
Files (6)
- SKILL.md
- chunking-strategies.md · references/
- embedding-models.md · references/
- rag-evaluation.md · references/
- retrieval-optimization.md · references/
- vector-databases.md · references/
SKILL.md (first lines)
# RAG Architect
## Core Workflow
1. **Requirements Analysis** — Identify retrieval needs, latency constraints, accuracy requirements, and scale
2. **Vector Store Design** — Select database, schema design, indexing strategy, sharding approach
3. **Chunking Strategy** — Document splitting, overlap, semantic boundaries, metadata enrichment
4. **Retrieval Pipeline** — Embedding selection, query transformation, hybrid search, reranking
5. **Evaluation & Iteration** — Metrics tracking, retrieval debugging, continuous optimization
For each step, validate before moving on (see checkpoints below).
## Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|-------|-----------|-----------|
| Vector Databases | `references/vector-databases.md` | Comparing Pinecone, Weaviate, Chroma, pgvector, Qdrant |
| Embedding Models | `references/embedding-models.md` | Selecting embeddings, fine-tuning, dimension trade-offs |
| Chunking Strategies | `references/chunking-strategies.md` | Document splitting, overlap, semantic chunking |
| Retrieval Optimization | `references/retrieval-optimization.md` | Hybrid search, reranking, query expansion, filtering |
| RAG Evaluation | `references/rag-evaluation.md` | Metrics, evaluation frameworks, debugging retrieval |
## Implementation Examples
### 1. Chunking Documents
```python
from langchain.text_splitter import RecursiveCharacterTextSplitter
# Evaluate chunk_size on your domain data — never use 512 blindly
splitter = RecursiveCharacterTextSplitter(
chunk_size=800,
chunk_overlap=100,
separators=["\n\n", "\n", ". ", " "],
)
chunks = splitter.create_documents(
texts=[doc.page_content for doc in raw_docs],
metadatas=[{"source": doc.metadata["source"], "timestamp": doc.metadata.get("timestamp")} for doc in raw_docs],
)
```
**Checkpoint:** `assert all(c.metadata.get("source") for c in chunks), "Missing source metadata"`
### 2. Generating Embeddings & Indexing
```python
from openai import OpenAI
import qdrant_client
from qdrant_client.models import VectorParams, Distance, PointStruct
client = OpenAI()
qdrant = qdrant_client.QdrantClient("localhost", port=6333)
# Create collection
qdrant.recreate_collection(
collection_name="knowledge_base",
vectors_config=VectorParams(size=1536, distance=Distance.COSINE),
)
def embed_chunks(chunks: list[str], model: str = "text-embedding-3-small") -> list[list[float]]:
response = client.embeddings.create(input=chunks, model=model)
return [r.embedding for r in response.data]
# Idempotent upsert with deduplication via deterministic IDs
import hashlib, uuid
points = []
for i, chunk in enumerate(chunks):
doc_id = str(uuid.UUID(hashlib.md5(chunk.page_content.encode()).hexdigest()))
embedding = embed_chunks([chunk.page_content])[0]
points.append(PointStruct(id=doc_id, vector=embedding, payload=chunk.metadata))
qdrant.upsert(collection_name="knowledge_base", points=points)
```
**Checkpoint:** `assert qdrant.count("knowledge_base").count == len(set(p.id for p in points)), "Deduplication failed"`
### 3. Hybrid Search (Vector + BM25)
```python
from qdrant_client.models import Filter, FieldCondition, MatchValue, SparseVector
from rank_bm25 import BM25Okapi
def hybrid_search(query: str, tenant_id: str, top_k: int = 20) -> list:
# Dense retrieval
query_embedding = embed_chunks([query])[0]
tenant_filter = Filter(must=[FieldCondition(key="tenant_id", match=MatchValue(value=tenant_id))])
dense_results = qdrant.search(
collection_name="knowledge_base",
query_vector=query_embedding,
query_filter=tenant_filter,
limit=top_k,
)
# Sparse retrieval (BM25)
corpus = [r.payload.get("text", "") for r in dense_results]
bm25 = BM25Okapi([doc.split() for doc in corpus])
bm25_scores = bm25.get_scores(query.split())
# Reciprocal Rank Fusion
ranked = sorted(
zip(dense_results, bm25_scores),
key=lambda x: 0.6 * x[0].score + 0.4 * x[1],
reverse=True,
)
return [r for r, _ in ranked[:top_k]]
```
**Checkpoint:** `assert len(hybrid_search("test query", tenant_id="demo")) > 0, "Hybrid search returned no results"`
### 4. Reranking Top-K Results
```python
import cohere
co = cohere.Client("YOUR_API_KEY")From mnsgrosa/skills, MIT.
More from mnsgrosa/skills
- 0.401score
software-engineering-docs
mnsgrosa
Generate and maintain structured software engineering documentation for new or existing applications.
SkillDFreshness: DClaude Code +9 - 0.396score
hybrid-search-implementation
mnsgrosa
Combine vector and keyword search for improved retrieval.
SkillDFreshness: DClaude Code +9 - 0.394score
code-generation-summarizer
mnsgrosa
Patterns followed for code generation and post generation for better user understanding
SkillDFreshness: DClaude Code +9 - 0.385score
github-actions-creator
mnsgrosa
Use when the user wants to create, generate, or set up a GitHub Actions workflow.
SkillDFreshness: DClaude Code +9 - 0.382score
brainstorming
mnsgrosa
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior.
SkillDFreshness: DClaude Code +9 - 0.227score
writing-plans
mnsgrosa
Use when you have a spec or requirements for a multi-step task, before touching code
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 25, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.1.0
- License
- MIT
- Repository
- github.com/mnsgrosa/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.697score
rag-architect
https://github.com/Jeffallan
Designs and implements production-grade RAG systems by chunking documents, generating embeddings, configuring vector stores, building hybrid search pipelines…
SkillAFreshness: A★ 12KClaude Code +9 - 0.290score
rag-architect
https://github.com/Jeffallan
Designs and implements production-grade RAG systems by chunking documents, generating embeddings, configuring vector stores, building hybrid search pipelines…
SkillBFreshness: B★ 11Claude Code +9
More from https://github.com/Jeffallan
- 0.697score
angular-architect
https://github.com/Jeffallan
Generates Angular 17+ standalone components, configures advanced routing with lazy loading and guards, implements NgRx state management, applies RxJS…
SkillAFreshness: A★ 12KClaude Code +9 - 0.697score
spec-miner
https://github.com/Jeffallan
Reverse-engineering specialist that extracts specifications from existing codebases.
SkillAFreshness: A★ 12KClaude Code +9 - 0.697score
cpp-pro
https://github.com/Jeffallan
Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques.
SkillAFreshness: A★ 12KClaude Code +9 - 0.697score
code-documenter
https://github.com/Jeffallan
Generates, formats, and validates technical documentation — including docstrings, OpenAPI/Swagger specs, JSDoc annotations, doc portals, and user guides.
SkillAFreshness: A★ 12KClaude Code +9 - 0.697score
fullstack-guardian
https://github.com/Jeffallan
Builds security-focused full-stack web applications by implementing integrated frontend and backend components with layered security at every level.
SkillAFreshness: A★ 12KClaude Code +9 - 0.697score
api-designer
https://github.com/Jeffallan
Use when designing REST or GraphQL APIs, creating OpenAPI specifications, or planning API architecture.
SkillAFreshness: A★ 12KClaude Code +9
Cite this page
rag-architect skill. Agent Mart. https://agentmart.dev/skills/mnsgrosa-rag-architect (last updated 2026-10-24)