Vector databases (beyond the hype) (Practical AI #234)
Aug 1, 2023
auto_awesome
Prashanth Rao discusses trade-offs and exploration of vector databases, including indices, hosting options, and query optimization. The podcast covers the evolution of vector databases in AI workflows and combining them with large language models for natural language querying. The hosts also explore future possibilities of vector databases and integration of graph databases for enhanced knowledge retrieval.
Using purpose-built vector databases vs existing solutions offer trade-offs in scalability and efficiency.
Vector databases offer different options for managing embedding pipelines.
Vector databases need to find the right balance between recall and latency for accurate and timely results.
Deep dives
Purpose-built vs. Existing Solutions
There is a trade-off between using purpose-built vector databases and existing solutions like Elasticsearch or Postgres. Purpose-built databases are more scalable and efficient for managing vectors at scale, while existing solutions may not be optimized for vector storage and retrieval.
External Embedding Pipeline vs. Built-in Hosting Pipeline
Vector databases offer different options for managing embedding pipelines. Some databases have external embedding pipelines, where embeddings are generated outside the database and then stored, while others have built-in hosting pipelines, where embeddings can be generated directly within the database.
Indexing Speed vs. Querying Speed
Vector databases face trade-offs between indexing speed and querying speed. The speed at which vectors can be indexed and efficiently stored is important for scalability, while fast querying speed is crucial for real-time applications.
Recall vs. Latency
There is a balance between recall and latency in vector databases. Recall refers to the accuracy of retrieving relevant results, while latency refers to the speed of retrieving those results. Finding the right trade-off is important for delivering accurate and timely results.
In-Memory Index vs. On-Disk Index
Vector databases need to consider the storage of indexes. In-memory indexes offer faster retrieval at the cost of limited memory capacity, while on-disk indexes provide greater scalability but with potentially slower retrieval speeds. Finding the right balance between in-memory and on-disk storage is crucial for performance and scalability.
There’s so much talk (and hype) these days about vector databases. We thought it would be timely and practical to have someone on the show that has been hands on with the various options and actually tried to build applications leveraging vector search. Prashanth Rao is a real practitioner that has spent and huge amount of time exploring the expanding set of vector database offerings. After introducing vector database and giving us a mental model of how they fit in with other datastores, Prashanth digs into the trade offs as related to indices, hosting options, embedding vs. query optimization, and more.
Changelog++ members save 3 minutes on this episode because they made the ads disappear. Join today!
Sponsors:
Fastly – Our bandwidth partner. Fastly powers fast, secure, and scalable digital experiences. Move beyond your content delivery network to their powerful edge cloud platform. Learn more at fastly.com
Fly.io – The home of Changelog.com — Deploy your apps and databases close to your users. In minutes you can run your Ruby, Go, Node, Deno, Python, or Elixir app (and databases!) all over the world. No ops required. Learn more at fly.io/changelog and check out the speedrun in their docs.
Typesense – Lightning fast, globally distributed Search-as-a-Service that runs in memory. You literally can’t get any faster!