Santosh Mahale writes that most teams default to vector-database RAG without evaluating whether it fits their data and query patterns, when the retrieval architecture is the primary lever for production success. He compares three options—Traditional (semantic search via embeddings), Vectorless (exact lookups via SQL, BM25, APIs, or graph traversal with no vector store), and Hybrid (both retrieval paths merged and reranked)—and recommends starting with the simplest approach that solves the use case, measuring where it fails, then adding complexity only where data demands it.
- Most RAG failures are retrieval failures (wrong context reaching the LLM), not model failures
- Vectorless RAG is underused; structured-data workloads like log analysis, K8s event lookups, and compliance records often outperform Traditional RAG with far less infrastructure
- Hybrid RAG is the eventual landing spot for most enterprise deployments but adds two retrieval paths, a merge step, and a reranker to maintain
- The article positions RAG variants within a broader stack: LLM → RAG architectures → agents → MCP → agentic systems, each solving a different layer
This article explores techniques for optimizing Retrieval-Augmented Generation (RAG) systems by implementing hybrid search and re-ranking mechanisms. It details how to combine dense vector embeddings with sparse keyword matching, such as BM25, to improve retrieval accuracy, followed by the use of a cross-encoder reranker to ensure only the most relevant context is passed to a Large Language Model in production environments.
Prompt caching significantly reduces LLM costs and latency by storing and reusing responses to repeated or similar prompts. The core technique involves checking a cache before sending a prompt to the LLM, retrieving a prior result if available. Effective caching requires balancing cache size, retrieval speed (using methods like vector databases), and strategies for handling slight prompt variations.
This tutorial demonstrates how to combine LLM embeddings, TF-IDF vectors, and metadata features into a single Scikit-learn pipeline for document retrieval and search. It covers generating embeddings with Sentence Transformers, calculating TF-IDF, handling metadata, and building a combined retrieval system.
Structured, temporal memory for AI agents. memv extracts knowledge from conversations using a predict-calibrate approach: importance emerges from prediction error, not upfront LLM scoring.
SimpleMem addresses the challenge of efficient long-term memory for LLM agents through a three-stage pipeline grounded in Semantic Lossless Compression. It maximizes information density and token utilization, achieving superior F1 scores with minimal token cost.
This article explores different chunking strategies for Retrieval-Augmented Generation (RAG) systems, comparing nine approaches using the agenticmemory library to improve retrieval accuracy and reduce hallucinations.
A tutorial on building a private, offline Retrieval Augmented Generation (RAG) system using Ollama for embeddings and language generation, and FAISS for vector storage, ensuring data privacy and control.
1. **Document Loader:** Extracts text from various file formats (PDF, Markdown, HTML) while preserving metadata like source and page numbers for accurate citations.
2. **Text Chunker:** Splits documents into smaller text segments (chunks) to manage token limits and improve retrieval accuracy. It uses overlapping and sentence boundary detection to maintain context.
3. **Embedder:** Converts text chunks into numerical vectors (embeddings) using the `nomic-embed-text` model via Ollama, which runs locally without internet access.
4. **Vector Database:** Stores the embeddings using FAISS (Facebook AI Similarity Search) for fast similarity search. It uses cosine similarity for accurate retrieval and saves the database to disk for quick loading in future sessions.
5. **Large Language Model (LLM):** Generates answers using the `llama3.2` model via Ollama, also running locally. It takes the retrieved context and the user's question to produce a response with citations.
6. **RAG System Orchestrator:** Coordinates the entire workflow, managing the ingestion of documents (loading, chunking, embedding, storing) and the querying process (retrieving relevant chunks, generating answers).
Sparse Priming Representations (SPR) is a research project focused on developing and sharing techniques for efficiently representing complex ideas, memories, or concepts using a minimal set of keywords, phrases, or statements, enabling language models or subject matter experts to quickly reconstruct the original idea with minimal context.
Scaling a simple RAG pipeline from simple notes to full books. This post elaborates on how to utilize larger files with your RAG pipeline by adding an extra step to the process — chunking.