Skip to content
Development
Command

/create-retriever

Build a retrieval component for RAG pipeline with optimized search.

From plugin
rohitg00-claude-code-toolkit
2.5k199 skills138 agents199 commands
Install
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/create-retriever

Context preview

What this command does when you run it.

Build a retrieval component for RAG pipeline with optimized search.

Command definition

create-retriever.md
name: create-retriever
description: Build a retrieval component for RAG pipeline with optimized search.

/create-retriever - Create RAG Retriever

Build a retrieval component for RAG pipeline with optimized search.

Steps

1. Configure the vector store connection and embedding model 2. Implement the retrieval function with configurable parameters:

  • Top-K results (default: 5)
  • Similarity threshold (default: 0.7)
  • Metadata filters (source, date range, category)

3. Add hybrid search combining vector similarity with keyword BM25 search 4. Implement re-ranking using a cross-encoder model for result quality 5. Add contextual compression to extract only relevant parts of retrieved chunks 6. Implement query transformation: expand, decompose, or rephrase the user query 7. Add caching for repeated queries with a configurable TTL 8. Build the prompt template that incorporates retrieved context 9. Add source citation formatting to trace answers to specific documents 10. Implement fallback behavior when no relevant documents are found 11. Add evaluation metrics: retrieval precision, recall, and MRR 12. Test the retriever with sample queries and verify relevance

Rules

  • Always return source citations with retrieved content
  • Set a minimum similarity threshold to avoid irrelevant results
  • Use re-ranking to improve result quality beyond pure vector similarity
  • Implement query decomposition for complex multi-part questions
  • Cache embeddings for frequently asked queries
  • Handle empty results gracefully with a "no relevant information found" response
  • Log retrieval metrics for continuous improvement
Read more
Ships withrohitg00-claude-code-toolkit

The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.

Get the whole plugin