llm-rag

Build and evaluate retrieval-augmented generation pipelines with vector stores and reranking.

Updated Sep 23, 2026
One-click install
npx skills add https://github.com/ehadziabdic/WAgents --skill llm-rag-ehadziabdic
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: llm-rag
Source: https://github.com/ehadziabdic/WAgents/tree/main/opencode/skills/llm-rag
Command: npx skills add https://github.com/ehadziabdic/WAgents --skill llm-rag-ehadziabdic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chromadb, sentence-transformers, pypdf, openai, langchain, langchain-openai, langchain-community, langchain-chroma, langchain-text-splitters, langchain-experimental, and includes scripts (resource) and references (resource) components.

What problem does it solve? LLMs hallucinate and lack access to private or up-to-date documents. This Skill guides you through building RAG pipelines that ground LLM answers in your own knowledge base, from document ingestion to production evaluation. ## Core Features & Use Cases - End-to-End RAG Pipeline: Load and parse documents (PDF, TXT, CSV, HTML), chunk them with recursive or semantic strategies, embed with OpenAI or Sentence Transformers, and index into Chroma, Pinecone, Qdrant, pgvector, or FAISS. - Retrieval Optimization: Combine BM25 with dense embeddings via hybrid search, apply cross-encoder or Cohere reranking, and use query transformations like HyDE, multi-query, and step-back prompting. - Evaluation & Debugging: Measure retrieval quality (Recall@K, MRR, NDCG) and generation quality (F1, BLEU, ROUGE-L, faithfulness) with the included evaluation script, plus a failure-mode debugging checklist. - Use Case: You need a Q&A system over your company's internal documentation. Use this Skill to index the docs into a vector store, retrieve relevant chunks with hybrid search, rerank them, and generate cited answers with an LLM. ## Quick Start Build a RAG pipeline that indexes the documents in my docs folder into Chroma and answers questions about them.

Frequently Asked Questions about llm-rag

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a RAG pipeline with LangChain and Chroma?▼

Load documents with LangChain loaders, split them with RecursiveCharacterTextSplitter at 512 tokens, embed with OpenAIEmbeddings or Sentence Transformers, and store in Chroma. Then chain a retriever, prompt template, and chat model to generate grounded answers.

What chunking strategy should I use for RAG?▼

Start with recursive character chunking at 512 tokens with 10-20% overlap for general text. Use semantic chunking for dense technical documents, sentence-based splitting for short-form content, and structure-aware splitting for HTML or Markdown.

Chroma vs Pinecone vs Qdrant for vector search?▼

Chroma is embedded and free, best for prototyping. Pinecone is managed SaaS for zero-ops production at scale. Qdrant is self-hosted or cloud with strong performance and hybrid search support. pgvector fits teams already running Postgres.

How do I improve RAG retrieval accuracy?▼

Combine BM25 with dense embeddings in hybrid search, then rerank the top 20-50 candidates with a cross-encoder like ms-marco-MiniLM or Cohere Rerank. Query transformations such as HyDE and multi-query also improve recall for ambiguous questions.

Why does my RAG system hallucinate answers?▼

Hallucination happens when the LLM relies on parametric knowledge instead of retrieved context. Strengthen grounding instructions, lower temperature, retrieve more chunks, and measure faithfulness scores to detect unsupported claims.

How do I evaluate a RAG pipeline?▼

Build a golden test set of 50-200 question-answer-context triples and measure retrieval metrics (Recall@K, MRR, NDCG) separately from generation metrics (faithfulness, answer relevancy, F1). The included evaluate_rag.py script computes these against a Chroma index.