Loading...
Loading...
Use when "RAG", "retrieval augmented generation", "LangChain", "LlamaIndex", "sentence transformers", "embeddings", "document QA", "chatbot with documents", "semantic search"
npx skill4agent add eyadsibai/ltk rag-frameworks| Framework | Best For | Learning Curve | Flexibility |
|---|---|---|---|
| LangChain | Agents, chains, tools | Steeper | Highest |
| LlamaIndex | Data indexing, simple RAG | Gentle | Medium |
| Sentence Transformers | Custom embeddings | Low | High |
|| Model | Dimensions | Quality | Speed |
|---|---|---|---|
| all-MiniLM-L6-v2 | 384 | Good | Fast |
| all-mpnet-base-v2 | 768 | Better | Medium |
| e5-large-v2 | 1024 | Best | Slow |
| Pattern | Description | When to Use |
|---|---|---|
| Naive RAG | Retrieve top-k, stuff in prompt | Simple QA |
| Parent-Child | Retrieve chunks, return parent docs | Context preservation |
| Hybrid Search | Vector + keyword search | Better recall |
| Re-ranking | Retrieve many, re-rank with cross-encoder | Higher precision |
| Query Expansion | Generate variations of query | Ambiguous queries |
| Scenario | Recommendation |
|---|---|
| Simple document QA | LlamaIndex |
| Complex agents/tools | LangChain |
| Custom embedding pipeline | Sentence Transformers |
| Production RAG | LangChain or custom |
| Quick prototype | LlamaIndex |
| Maximum control | Build custom with Sentence Transformers |