#rag

waynerad@diasp.org

You don't need a vector database, says Yucheng Low. This is for "retrieval augmented generation" (RAG), where you search a vector database to find relevant documents and then include them in the large language model's context window.

He shows that BM25, a "classic" information retrieval algorithm, does almost as good as a vector database. BM stands for "best matching", and BM25 is a traditional keyword search that, after finding matching documents, uses computations of word frequency to rank the documents.

He goes on to show that BM25, followed by doing a vector comparison, actually beats the vector database. So you can use BM25 to do a keyword search, then calculate vectors on the handful of documents selected, and then rank those documents using the vectors. Doing it this way, you don't actually need a vector database.

You don't need a vector database

#solidstatelife #ai #genai #llms #rag