Retrieval-Augmented Generation (RAG) is a powerful technique to enhance LLMs with external knowledge. Two primary approaches exist: vector-based RAG and vectorless RAG.
Vector RAG uses embeddings to convert text into high-dimensional vectors. It then performs similarity search against a vector database (e.g., Milvus, Qdrant) to find relevant content. This method excels at semantic matching and handles large-scale retrieval efficiently.
Vectorless RAG relies on traditional keyword search or inverted indexes (like BM25). It doesn't need embedding generation or vector storage. It's simpler to implement, faster to index, and works well for exact-match queries, but may miss semantically related results.
For most production LLM apps, hybrid approaches combining both methods offer the best accuracy and robustness.