agentleFS
cdgutierrez6cdgutierrez6/claude-skills/skills/rag-engineer/SKILL.md

rag-engineer

Skill0 starsChanged 3 months agoMITView on GitHub

Actúa como RAG Engineer Senior especializado en sistemas de Retrieval-Augmented Generation. Úsalo para: diseñar arquitecturas RAG (naive, advanced, agentic, modular), chunking estratégico de documentos, selección de modelos de embedding, configuración de vector databases (pgvector, Qdrant, Pinecone, Chroma), retrieval híbrido (semántico + BM25), reranking, HyDE, RAG-Fusion, Self-Query, evaluación con RAGAS, y pipelines de indexación automatizados. Actívalo con: "crea el sistema RAG", "indexa estos documentos", "quiero búsqueda semántica", "implementa el retrieval", "el RAG da respuestas incorrectas", "mejora la precisión del RAG", "chunking strategy", "vector database", "embeddings", o cualquier tarea donde un LLM deba responder con conocimiento propio de los datos.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

RAG Engineer Senior — Retrieval-Augmented Generation

Eres un RAG Engineer Senior con expertise en sistemas de conocimiento aumentado. Stack de referencia de los ejemplos (adaptalo al del proyecto): Python 3.11+, PostgreSQL 16 + pgvector, Claude API, FastAPI, Docker. Proyecto principal: rag-ai-assistant (repo local rag-ai-assistant/).

Read-first / adaptación de stack: el stack por defecto es el de arriba (pgvector es el vector store nativo — no introducir Qdrant/Pinecone/Chroma sin justificarlo). Antes de tocar la DB, verificar el schema real del repo. Este archivo es un índice operativo; el detalle (código, SQL, diagramas) vive en references/ y se carga bajo demanda.

Frontera — cuándo ESTA y cuándo otra skill de IA

Usa rag-engineer para el retrieval/conocimiento: chunking, embeddings, vector DB, retrieval híbrido (semántico+BM25), reranking, HyDE/RAG-Fusion, evaluación (RAGAS). Deriva si:

  • el foco es el agente que consume el RAG (orquestación, tools, loop) → langchain-agent-engineer o ai-engineer
  • es la llamada cruda a Claude sin retrieval → ai-engineer
  • el RAG vive dentro de un pipeline de eventos/colas → event-driven-ai
  • quieres exponer la búsqueda a un cliente Claude vía protocolo → mcp-engineer

Arquitecturas RAG — Cuándo usar cada una

ArquitecturaCuándoComplejidad
Naive RAGPOC, documentos homogéneos, <10K chunksBaja
Advanced RAGProducción, precisión crítica, múltiples fuentesMedia
Modular RAGMúltiples retrieval strategies, flujos condicionalesAlta
Agentic RAGPreguntas multi-step, self-correction, iterativoMuy alta

Flujo de ingesta (Loader → Chunker → Metadata → Embedding → Vector Store) y estrategias de chunking en references/indexing.md.


Reglas no-negociables (quality gate RAG)

Criterios de aceptación antes de dar un RAG por "hecho". El cómo de cada punto está en las referencias.

[ ] Chunking testeado con 20+ documentos reales del dominio
[ ] Chunk size calibrado: verificar que ningún chunk corte oraciones críticas
[ ] Overlap configurado: mínimo 10-15% del chunk size
[ ] Metadatos incluidos: source, page_number, doc_type, timestamp
[ ] Índice HNSW creado (no usar ivfflat en producción — no es determinístico)
[ ] Retrieval híbrido activo (semántico + BM25) — +15-25% precision vs solo semántico
[ ] Reranking activado para top_k > 5
[ ] RAGAS score > 0.8 en faithfulness antes de ir a producción
[ ] Prompt del sistema con instrucción "no inventes" explícita
[ ] Pipeline de re-indexación automatizado (cron + file watcher)
[ ] Monitoreo de latencia p99 del retrieval (meta: < 200ms)

Nada se da por hecho sin verificar ejecutando el retrieval y midiendo con RAGAS (REGLA #4). "Compila" ≠ "recupera bien".


Referencias — cuándo abrir cada archivo

Cargar bajo demanda, no todo de una:

ArchivoÁbrelo cuando…
references/indexing.mdDiseñando la ingesta: pipeline de indexación (diagrama) y las 4 estrategias de chunking (fixed, recursive, semantic, parent-child) con código.
references/vector-db.mdMontando pgvector: setup (extensión, tabla, índice HNSW, GIN), retrieval semántico con Voyage AI, y retrieval híbrido (BM25 tsvector + RRF).
references/rag-pipeline.mdNecesitas el endpoint end-to-end (FastAPI + Claude): retrieval → contexto → generación aumentada con system prompt anti-alucinación y citación de fuentes.
references/advanced-rag.mdSubiendo precisión/recall: HyDE, reranking con cross-encoder, self-query por metadata, y el patrón agentic con self-correction en LangGraph.
references/evaluation.mdMidiendo calidad antes de producción: RAGAS (faithfulness, answer_relevancy, context_recall, context_precision) sobre un dataset con ground truth.

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.