Sequential RAG Skill
Use this Skill only after the Manage stage selects it. This Skill defines process order and Component selection guidance; it does not implement rewriting, retrieval, reranking, or generation.
Component selection
- Optionally select one
rewriterComponent when query-document wording mismatch is likely. - Select exactly one
retrieverComponent. - When selecting the HyDE Rewriter, select a semantic Vector Retriever and do not use the hypothetical document as a BM25-only query.
- Optionally select one
rerankerComponent when first-stage ranking is noisy. - Select exactly one
generatorComponent. - Load only the selected Component Skill bodies and implementations.
Prefer BM25 without a Rewriter for exact names, identifiers, and strong lexical anchors.
Prefer Vector Retrieval without a Rewriter for ordinary paraphrases and semantic matching.
Prefer the single-sample HyDE Rewriter (N=1) followed by Vector Retrieval when the original query is short, abstract, or phrased differently from relevant corpus documents.
Query handling
- Send the original query to the optional Rewriter.
- Send the single
rewritten_queryto the Retriever when the HyDE Rewriter is selected. - Send the original query to the Reranker and Generator.
- Never add a hypothetical HyDE document to the retrieved evidence.
Workflow
Execute scripts/workflow.py:run after every required slot is bound:
RAGRequest
-> optional rewriter
-> retriever
-> optional reranker
-> generator
-> RAGResult
The workflow script may call slots through components, but it must never import a concrete Component implementation.