Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Workflows für Retrieval-Augmented Generation, Embeddings, Vector-DBs, Chunking-Strategien.
.claude/skills/shadd0wtaka-rag-vector-bases-skill/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 35% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 149% | 0% |
Workflows für Retrieval-Augmented Generation, Embeddings, Vector-DBs, Chunking-Strategien.
pythondef fixed_chunks(text: str, chunk_size: int = 512, overlap: int = 64) -> list[str]: chunks = [] start = 0 while start < len(text): end = start + chunk_size chunks.append(text[start:end]) start += chunk_size - overlap return chunks
pythonfrom langchain.text_splitter import RecursiveCharacterTextSplitter splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200, separators=["\n## ", "\n### ", "\n\n", "\n", ". ", " ", ""], ) chunks = splitter.split_text(text) # Mit Metadaten docs = splitter.create_documents(texts=[text], metadatas=[{"source": "file.md", "page": 1}])
pythonimport httpx resp = httpx.post( "http://localhost:20128/v1/embeddings", json={ "model": "oc/deepseek-v4-flash-free", "input": ["Text to embed", "Another text"], }, ) embeddings = resp.json()["data"] # [{embedding: [...], index: 0}, ...]
pythonfrom sentence_transformers import SentenceTransformer model = SentenceTransformer("all-MiniLM-L6-v2") # 384-dim embeddings = model.encode(["Text 1", "Text 2"], normalize_embeddings=True)
pythonimport chromadb client = chromadb.Client() collection = client.create_collection(name="docs") collection.add( ids=["doc1", "doc2"], documents=["Content A", "Content B"], embeddings=embeddings.tolist(), metadatas=[{"source": "a.txt"}, {"source": "b.txt"}], ) results = collection.query(query_embeddings=[query_emb], n_results=3)
bashdocker run -d --name qdrant -p 6333:6333 qdrant/qdrant
pythonfrom qdrant_client import QdrantClient client = QdrantClient("localhost", port=6333) client.upsert(collection_name="docs", points=[{"id": 1, "vector": [0.1] * 384, "payload": {"text": "Content"}}]) results = client.search(collection_name="docs", query_vector=[0.1] * 384, limit=3)
bashdocker run -d --name pgvector -e POSTGRES_PASSWORD=pass -p 5432:5432 pgvector/pgvector:pg16
sqlCREATE EXTENSION vector; CREATE TABLE docs (id SERIAL PRIMARY KEY, embedding vector(384), text text); INSERT INTO docs (embedding, text) VALUES ('[0.1,0.2,...]', 'Content'); SELECT * FROM docs ORDER BY embedding <-> '[0.1,0.2,...]' LIMIT 3;
pythondef rag_pipeline(query: str, top_k: int = 3): # 1. Embed Query q_emb = model.encode([query], normalize_embeddings=True)[0] # 2. Retrieve results = collection.query(query_embeddings=[q_emb.tolist()], n_results=top_k) # 3. Augment context = "\n\n".join(results["documents"][0]) # 4. Generate via OmniRoute resp = httpx.post( "http://localhost:20128/v1/chat/completions", json={ "model": "oc/deepseek-v4-flash-free", "messages": [ {"role": "system", "content": f"Context:\n{context}\n\nAnswer using context only."}, {"role": "user", "content": query}, ], }, ) return resp.json()["choices"][0]["message"]["content"]
python# Retrieval Quality def hit_rate(results, relevant_docs): return len(set(results) & set(relevant_docs)) / len(relevant_docs) def mrr(results, relevant_docs): for i, r in enumerate(results): if r in relevant_docs: return 1 / (i + 1) return 0
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 15,130 | 7,712 | -49% | 1 | 1 | 0% | 2,875 | 2,754 | -4% | 0 | 0 | — |
case-02 | fail→pass | 15,611 | 11,375 | -27% | 1 | 1 | 0% | 3,039 | 3,510 | +15% | 0 | 0 | — |
case-08 | fail→pass | 12,564 | 9,679 | -23% | 1 | 1 | 0% | 2,478 | 3,132 | +26% | 0 | 0 | — |
case-03 | pass→pass | 9,006 | 6,172 | -31% | 1 | 1 | 0% | 1,745 | 2,356 | +35% | 0 | 0 | — |
case-04 | pass→pass | 4,805 | 3,541 | -26% | 1 | 1 | 0% | 680 | 1,691 | +149% | 0 | 0 | — |
case-05 | fail→fail | 10,549 | 7,411 | -30% | 1 | 1 | 0% | 2,034 | 2,601 | +28% | 0 | 0 | — |
case-06 | pass→pass | 11,359 | 8,556 | -25% | 1 | 1 | 0% | 2,102 | 2,914 | +39% | 0 | 0 | — |
case-07 | pass→pass | 6,785 | 2,423 | -64% | 1 | 1 | 0% | 1,218 | 1,517 | +25% | 0 | 0 | — |
case-09 | pass→pass | 9,126 | 5,564 | -39% | 1 | 1 | 0% | 1,565 | 2,213 | +41% | 0 | 0 | — |
case-10 | pass→pass | 7,313 | 4,172 | -43% | 1 | 1 | 0% | 1,294 | 1,973 | +52% | 0 | 0 | — |
case-11 | fail→fail | 12,172 | 9,078 | -25% | 1 | 1 | 0% | 2,226 | 2,947 | +32% | 0 | 0 | — |
case-12 | pass→pass | 9,301 | 8,223 | -12% | 1 | 1 | 0% | 1,809 | 2,731 | +51% | 0 | 0 | — |
case-13 | pass→pass | 7,388 | 3,514 | -52% | 1 | 1 | 0% | 1,390 | 1,859 | +34% | 0 | 0 | — |
case-14 | pass→pass | 16,465 | 13,575 | -18% | 1 | 1 | 0% | 2,513 | 3,468 | +38% | 0 | 0 | — |
case-15 | pass→pass | 7,746 | 4,266 | -45% | 1 | 1 | 0% | 1,412 | 1,917 | +36% | 0 | 0 | — |
case-16 | pass→pass | 12,572 | 4,842 | -61% | 1 | 1 | 0% | 2,161 | 2,034 | -6% | 0 | 0 | — |
case-17 | pass→pass | 8,671 | 4,153 | -52% | 1 | 1 | 0% | 1,405 | 1,903 | +35% | 0 | 0 | — |
case-18 | pass→pass | 5,835 | 2,264 | -61% | 1 | 1 | 0% | 1,008 | 1,517 | +50% | 0 | 0 | — |
case-19 | pass→pass | 3,821 | 2,433 | -36% | 1 | 1 | 0% | 610 | 1,589 | +160% | 0 | 0 | — |
case-20 | pass→pass | 15,279 | 11,105 | -27% | 1 | 1 | 0% | 2,823 | 3,204 | +13% | 0 | 0 | — |
case-21 | pass→pass | 12,762 | 9,421 | -26% | 1 | 1 | 0% | 2,437 | 3,061 | +26% | 0 | 0 | — |
case-22 | pass→pass | 16,152 | 13,299 | -18% | 1 | 1 | 0% | 2,916 | 3,663 | +26% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.