Retrieval, RAG, and Data Pipelines
Use this sub-skill when the task is to prepare documents, split text, persist local data, build retriever indexes, convert retrieval output into context, or assemble a retrieval-first RAG flow.
Route here for
Documentmodeling for text corpora and chunked passages.TextSplitterchunking rules, separator choices, overlap settings, and invalid chunk-shape troubleshooting.ToEmbeddingsandRetrieverOutputToContextStras retrieval-side data transforms.LocalDBload/extend/transform/save/load flows for documents and chunked corpora.- Retriever base contracts and concrete retrieval backends:
BM25Retriever,FAISSRetriever,LanceDBRetriever,QdrantRetriever, andPostgresRetriever. - Retrieval-oriented RAG assembly patterns: split, embed, persist, retrieve, deduplicate, and pass context downstream.
Do not handle here
- Provider/client selection, embedding model setup, or generator configuration: route to the model-client-and-generator-workflows sub-skill.
- Metrics, evaluator loops, prompt optimization, or retriever scoring analysis: route to the evaluation-and-optimization sub-skill.
- Agentic RAG, tool use, runner orchestration, or streaming event handling: route to the agents-tools-and-streaming sub-skill.
- Model training or optimization of retriever/generator parameters: route to the evaluation-and-optimization sub-skill.
Operating workflow
- Normalize inputs into
Documentobjects and keep raw metadata with the corpus. - Choose the lightest valid preprocessing path:
TextSplitterfor chunking plain text.ToEmbeddingswhen chunks need vectors.LocalDBwhen you need persistence, transform reuse, or staged filtering.
- Pick the retrieval backend:
BM25Retrieverfor lexical or keyword-first retrieval.FAISSRetrieverfor local vector search.LanceDBRetriever,QdrantRetriever, orPostgresRetrieverwhen the index lives in an optional store.
- Use
RetrieverOutputToContextStrto assemble retrieved chunks into a downstream context string. - Build the RAG boundary with a retrieval step, a context builder, and a downstream answer component from another sub-skill.
- When retrieval fails, consult troubleshooting before changing the corpus or the retrieval contract.
Bundled scripts
scripts/text_splitter_smoke.py: deterministicTextSplittersmoke check with a tinyDocument.scripts/localdb_smoke.py:LocalDBload/transform/save/load smoke using a safe bundled transform.
Start with data pipelines for document and transform contracts, retrievers for backend selection, and RAG recipes for assembly patterns.


