agentsclimarketplace

Ai rag

Skill ggrace519/claude-code-dev-studio/skills/ai-rag

Retrieval-augmented generation specialist. Auto-invoked when retrieval, chunking, embeddings, reranking, hybrid search, or RAG evaluation is being built.From its SKILL.md

Install
npx -y skills add ggrace519/claude-code-dev-studio --skill ai-rag

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.1 KB, as published. Nobody here has run it

AI RAG

The retrieval layer is the single largest source of quality delta in most LLM apps. Better retrieval beats better prompts, consistently — and retrieval work without labeled eval pairs is vibes.

When to reach for this

  • Designing or changing chunking, embedding, indexing, or reranking
  • Retrieval quality complaints ("the model ignores our docs") — usually recall, not the prompt
  • Building the ingestion pipeline (extraction, dedupe, freshness)
  • Standing up retrieval evals before/after a pipeline change

Principles

  1. Chunk for the retrieval question, not the document. The chunk is the unit that gets retrieved and judged — optimize its self-containedness for that.
  2. Hybrid beats dense-only. BM25 + embeddings + rerank is the default starting point, not the upgrade. Keyword search wins on IDs, names, and codes that embeddings smear.
  3. Rerank > more chunks. A cross-encoder over top-50 beats a bigger embedding model over top-5, at a fraction of the cost of re-embedding the corpus.
  4. Eval with labeled pairs first. Build query → expected-chunk pairs (50–200 is enough to start) before touching the pipeline, or you cannot tell improvement from noise.
  5. Freshness is a retrieval property. Time-filter, dedupe superseded versions at ingestion, re-embed on source change — stale chunks outrank fresh ones because they've had longer to accumulate signal.
  6. Track context precision in production. Log per-query-class whether the right chunk was in the served context; this is the metric that catches drift.

Defaults that survive contact

KnobStarting pointMove when
Chunk size (prose)300–500 tokens, 10–15% overlapanswers span chunks → bigger; precision low → smaller
Chunk size (code/markdown)structural — function / heading boundariesfixed-size only as last resort
First-stage retrievalhybrid, top-50recall@50 is fine but answers bad → fix rerank, not k
Rerankcross-encoder top-50 → keep 5–8latency budget < ~150 ms → smaller reranker, not none
Query rewritingoff initiallymulti-hop or conversational queries → multi-query / HyDE
Eval gaterecall@k and MRR on labeled pairs, run on every pipeline change—

Pitfalls

  • Tuning the generation prompt to compensate for bad retrieval (fix recall first)
  • Comparing embedding models without holding chunking constant
  • Dedupe skipped at ingestion — near-duplicate chunks crowd out diverse context
  • Metadata filters applied after vector search truncate recall silently; filter in the index query, not in post-processing
  • "We improved it" claims with no before/after recall@k on the same labeled set

Related: ai-prompt-engineer (the prompt consuming retrieved context), ai-eval (eval harness design), ai-inference-perf (latency budget) · domain agent: ai-architect (serving topology, RAG-vs-finetune) · output/ADR format: playbook-conventions

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.