From the course: LLM Foundations: Vector Databases for Caching and Retrieval Augmented Generation (RAG)

Vector databases

What is a vector database? How is it different from other traditional databases? A vector database is a database that is optimized for storing vectors. It is specialized for storing vectors in an optimal fashion and helps in fast queries and searches on these vectors. What are some of the key features of vector databases? Of course, they support specialized data types for vectors. This can include both floating point vectors as well as binary vectors. They could also support regular scalar data types like integers, floating point numbers, characters, and strings. They support create, retrieve, update, delete operations on both vector and scalar data. They do have some level of support for data consistency and transaction isolation, though, not at the same level as traditional relational databases. One key distinguishing feature of vector databases is their ability to support similarity searches on vector data. They support distance measures like L2 and cosine out of the box. There are several vector databases available today. We can categorize them based on whether they are open source or commercial. Also, they can be specialized databases that are custom-built from scratch for vectors, or they can be other general purpose databases that additionally support storing and searching vectors. They can, again, be embedded, locally deployed, or available as a cloud service. Few of the popular ones are listed in each category. Milvus is an open-source vector database that is available for local deployments, as well as available as a managed service. Chroma is an embedded vector database. Pinecone is a commercial vector database. PostgreSQL is a popular RDBMS that has a plugin called pgvector that can help with vector capabilities. We will use Milvus as the reference product to explore vector databases in this course.

Contents