Postgres is Now a Vector Database, Too

The New Stack · Beginner ·🔍 RAG & Vector Search ·2y ago

Key Takeaways

Amazon Web Services (AWS) introduces PG Vector, an open-source tool that integrates generative AI and vector capabilities into PostgreSQL databases, and Postgres is now a vector database, too, with the addition of PG Vector, allowing for efficient similarity search and retrieval augmented generation.

Full Transcript

[Music] you're watching the new stack makers a podcast for people who develop deploy and manage at scale software for more information and articles about at scale Technologies please visit the new stack. now enjoy the show since its Inception Amazon web services AWS has been the best place for customers to build and run open source software in the cloud AWS is proud to support open source projects foundations and partners hey everyone I am here today with s Shandra shikon and shes is a general manager at Amazon web services and you're general manager for the Amazon relational datab database Service Group mhm and today we're going to talk a little bit about open source databases generative AI but first I'd like to yes yes understand why you decide to get a degree in philosophy it's actually not a degree in philosophy it's a PhD so I'm a doctorate but my degrees in computer science and in databases as it turns out so your PhD yes is is in computer science and specifically in databases and your and your Philosophy degree is I don't have a Philosophy degree it's just PhD doctor of philosophy but it's it's a PhD PhD doctor philosophy oh well I've been I've been thinking of you as a philosopher all this time but you I'm I'm sure you have philosophies about relational databases so why don't we talk about your philosophies about relational databases what are your what's your current philosophy now how do you think that's changed in the past five or 10 years the way I think about databases and I've been at Amazon you know little north of 7 years I have a much deeper appreciation for databases than I even did during my PhD days and it's a little strange saying that but I'm truly humbled by the number of customers who essentially bet their businesses bet their organizations on relational databases and how big databases are like it's it's in some ways at the lower end of the stack they're a huge part of what drives the world and so the value that relational database is bring and it's you know 50 60 years since Cod and others at IBM first came up with this concept it's truly what covers the world what was your thinking about relational databases when you were a student and so and and tell me kind of like your reflection on it now what what are some of the observations you you have when I was a student at relational databases but 25 30 years in and a lot of the Innovation at that time was more I'd say towards the analytic site and that that was a little bit of what I did my my PhD is around streaming databases and what's really been sort of astounding to me and you know in a good way is that 50 60 years into databases now it Still Remains a heartb of innovation there's a ton going on Amazon era for example which is a cloud native database that Amazon offers really rethought the storage layer and how some of the uh technology works and it's transformed how people think about open source databases um a lot of things that previously were only done through closed Source we now have customers saying hey open source Technologies are really caught up and we can bet our businesses on open source relation databases when you're thinking about databases now I'm thinking about your work on the Maria Maria DB Foundation but before we do that maybe you can tell us a little bit about your kind of your overall responsibilities and as general manager like what are what are are what are the relational databases that Amazon offers now I mean it's it's grown yeah it has so one way to think about Amazon you know a framing way to think about Amazon's uh Services is that we want to offer customers choice and so aot of what we offer you know I mentioned in myo in the context of influx when customers want a managed service on top of a database they come to us we hear customers and we work back from customers so in databases itself I'm responsible for relational but our portfolio is much larger we also offer a bunch of purposeful databases time series graph you know and so on within relational databases Amazon relational databases and Amazon ER those are umbrella Brands we offer postest MySQL Maria DB Oracle SQL server and our newest engine is IBM db2 and Aura which is our Cloud native database that I mentioned has two flavors one is a postest flavor it's post compatible there's also a MySQL version of it tell us a little bit about what you discussed in the kyot today and you were showing kind of the you know you have some interesting slides there maybe you could just kind of encapsulate them yeah so look the key messages from my keynote were we are increasingly increasing our in m in open source and we've always invested in open source based on what customers have asked us early on in aw's Journey what customers were asking us was we like these open source databases but we find them hard to operate in the cloud so big part of our investment was towards manageability and that's where IDs came to be and some of these other manage services more recently customers are very comfortable running in the cloud they love IDs and what they' said is we want to improve the core engine can you help us with this it started with something very simple like bug fixes security patches but increasingly they're also asking us for features because the workloads need to run in some ways and so in the last 2 3 four years we have significantly increased our investment into the core open source Community where we're working directly with open source in terms of improving databases and also helping the community Thrive tell me then about you know where relational databases are in your viw right now because we're hearing so much about generative AI right and relation database that you said have been around since you were a computer science student and before right and so what's your view now and how does it fit with the story that we're hearing so much about generative AI you know in Amazon we have saying it's always day one and I still believe it's always day one even for relational databases as I mentioned a few minutes ago you know I think of relational databases as being at the heart of a company an Enterprise's data and when you think about generative AI for a company truly to have unique differentiating value proposition the generative AI has to be based on the data they've already accumulated from their customers from their business and so you may have heard of this concept called retrieval augmented generation and what it really does is it allows you to take in a generic llm yeah and customize the results to your business based on the data you have right so what we are hear hearing from customers is that rather than have a net new Vector database they want us to bring generative Ai and Vector capabilities into existing dat bases so they want to bring it into like a relational datab because they have already invested in these open source databases they already have applications so not put the database in the Genera of AI but the opposite a little bit right and so the way we're working with the open source Community but also within Amazon is uh I mentioned PG Vector in my keynote PG Vector brings Vector capabilities into postest and right now the Maria DB Foundation is also working on bringing the capabilities into Maria and then another big part of this is you know it doesn't start stop at databases you have to get from databases through to analytics to your tools U on the ml site and so we're working on zero ETL strategies which allow Enterprises to bring all the data together so that they don't live in silos so as a customer you don't have to look at new technology you get a new existing technology and you we break down the silos for you so tell me about the role of PG Vector then can you tell us a little bit about what is PG vector yeah how long has it been around and how does it serve as being relevant yeah so PG Vector is an extension in post dress so think of extensions as plugins you can bring your own extension and you can significantly alter the capabilities of poststress that's one of the strengths of postgress so what PG Vector does is it allows you to store Vector types in postgress and it also does something called similarity search so one of the things about generative AI is you're not looking for exact results right that's not what an llm does but you're looking for knowledge that is close and the concept of similarity search approximate nearest neighbor is what PG Vector does really well it's been developed by this fantastic developer called Andrew Kane he's been added a few years okay and we were the first Cloud vender to partner with him and offer it it's it's always been open source we offered it in Aurora and rs early last year and one of the things that we've been partnering with Andrew is customers love this because like I said they want generative AI in postgress we're getting a lot of feedback on ads Improvement and that's really been the journey for us is working with Andrew on new indexing types improving performance directly contributing code uh it's been a fantastic Journey you mentioned a few things in PG Vector such as indexing what does PG Vector have and what are the some of the some of the different features you would like to see in PG Vector itself so when we started working with Andrew and when we first implemented PG Vector in rur AAS it had an indexing method called IVF flat which is used link lists and was fantastic for building indexes quickly what it wasn't as good at which our customers were asking for was quy throughput especially when you're looking for higher rates of recall and also iterative development where you're able to insert new rows on the fight so we work with Andrew and we implemented something called hnsw which uses a different data structure it's a graph based data structure which customers love and a big part of the work has been to make hns stute as performant as IVF flat on some of the areas of deficit and so the work going forward is going to be continuing you know it's a fast evolving space so there's a lot we don't know and so we're just keeping a close sort of ear to the ground on what customers are asking for but really it's about scale performance some of the usual things you'd ask look for in a database but in the context of vectors now the graph the graph based approach is what you see customers liking yeah you get better query throughput when you're looking for high rates of recall and you can also more iteratively add add to the database which you'd expect to see in an operational database cuz you know you're constantly running transactions and changing the underlying data because it's a graph um the graph has to do a little bit more with making it simpler to look for nearest neighbors that's why it works better that's why the nearest neighbors thing is a big part of generative AI exactly and Vector search and semar search so it allows you then to build that capability the throughput issue tell me what are some of the throughput issues that customers face it's like any other database you have an online application you have customers coming to your store coming to your website and you don't want to experience latency now you want relevant answers based on your own like Rag and so a lot of it is making sure that the database doesn't take a hit or any significant head when you're running a vector based cuz all the things that you'd want in your application you still want right you know all the asset properties all the performance properties and you don't want to lose any of that generative AI is a different Beast entirely what is it make it reflective of what you said when you say that there's a lot that we don't know you know we learn a lot from our customers right that's been one of our finding qualities and the rate of innovation that we're seeing in the generative AI space frankly like from my experience it reminds me of the doom boom like the the late '90s like the internet's new the world possibilities are endless and so I expect you know the next 2 3 5 years folks are going to come up with new use cases new ways of using this technology which is frankly amazing that we can't imagine right now right and so our goal is to stay humble stay Nimble listen to our customers and keep innovating as as they ask us to do more keep innovating okay so what are some of the things that you are finding that should be in PG Vector for example or that customers are asking for that you'd like to build in you know as I said hnsw is a big lift yeah and going forward it is going to be around continuing to improve performance continuing to improve scale you've had customers you know with hundreds of billions of objects that they want to index hundreds of billions of data points that they want to index with vectors and some of these s of stress the limits of postest itself and so a lot of the work will be both PG Vector but also in core postest and so we'll continue to innovate but PG vector and post are just one part of it you know we have other databases people want Vector capabilities is there as well so we're working with the Marb Foundation um and the other part of it really is Simplicity customers just like with RS uh when we started they want to focus on their applications they don't want to worry about the tool chain they don't want to worry about generative AI as a tool for them to achieve what they want for their business so integrating with bedrock knowledge bases a lot of the other things that Amazon is doing around generative AI offering customers an end solution so dimensions in database are defined by the llm and the LM Ms continue to become more complex and larger in parameters and everything else so that has an impact on databases doesn't it it does so the way to think about it is llms are really encoding knowledge in a higher Dimension space and if you have more Dimensions you have to store more data and you can in a very tactical way breach the boundaries of a single page so one of the things that postris has to do also is learn how to deal with higher Dimensions um and have indexing performance a high level that's interesting point then let's then turn to Maria DB because you're on the foundation there and like it's a good example of a database that has to transform with the time too what are some of the Transformations that we're seeing with Maria DB you know with Maria DB adoption and continuity is the main focus on the board because we the corporation has historically driven most of the contributions to MB we're now the number three contributor behind the corporation and the foundation and a big part of our focus is to ensure that the Marb ecosystem is very healthy so our core Focus Still Remains contribute code make sure that it's a vibrant ecosystem the other part of it is things like gen Marb currently does not have Vector support so it's something that many of the foundation players Corporation are coming together to make sure that we can add something like that intermediate DB so it stays relevant in the gener generative AI space do you think vectors will eventually just become a feature that we'll see in databases I I think that's already happening yeah a a lot of customers as I mentioned are looking for vectors to be a core part they don't want to change the application rewrite it but they want to be able to augment the application to to use vectors think about it this way if if if you had to go use a completely new technology to get advantage of generative AI there's a learning curve you have to move your data and now you may have data in two different places customers don't want to do that they want the data where they already have it they want the silos to break down and they want generative AI capabilities in the infrastructure that they already understand so then maybe you could provide your context about Vector databases from AWS I'm trying to remember now what that is from you all so we offer Vector capabilities in a number for databases postest is one example open search is another and a lot of what you'll see from us is what customers asking give vectors in the databases that you have a second push for us is what we call zero ETL to make it easy for data to flow from transactional systems into the data Lake into analytical systems so that customers get generative AI capabilities wherever they want it and one thing that I find interesting concerns the capability for data scientists to work more closely with developers and infrastructure teams which comes down to in some respects what you're saying about factors doesn't it it does and it's really also about breaking down these silos historically you know relational databases were dba's concerns there were data scientists that worked more on the analytic or spark side and you're going to see a convergence of this I I think you will and so a big part of this is making sure that you take away the infrastructure friction so again customers can do what they do best so relational databases are they still here to stay I think so how come like I said you know in the end what relational databases do best going back to the roots of relational is assd atomicity consistency isolation durability those requirements are never going back if you have a banking application or anything else you know you run a store you don't want to lose transactions relational databases have been the foundation a very successful Foundation of our economy and I expect that to go forward but couldn't an LM start to offer those same features you know I the way I think of llms is I I do think llms have an important role the way we interact with relational databases can change you know increasingly you're seeing text to SQL you know where you ask a question and generate SQL but the foundational technology underneath the covers the thing that makes sure that your data is never lost right think of a banking application you withdraw from an ATM or you deposit you never want that deposit to be lost those in the end are still at the core of what relationship databases do best right Ser thank you so much for your time thank you as well if you like this video please give us a thumbs up and if you'd like to see more videos like this you can always subscribe to our YouTube channel we're on all the major social media platforms forms you can always find us at the new stack. we hope to see you soon [Music]

Original Description

Amazon Web Services (AWS) has introduced PG Vector, an open-source tool that integrates generative AI and vector capabilities into PostgreSQL databases. Sirish Chandrasekaran, General Manager of Amazon Relational Database Services, explained at Open Source Summit 2024 in Seattle that PG Vector allows users to store vector types in Postgres and perform similarity searches, a key feature for generative AI applications. The tool, developed by Andrew Kane and offered by AWS in services like Aurora and RDS, originally used an indexing scheme called IVFFlat but has since adopted Hierarchical Navigable Small World (HNSW) for improved query performance. HNSW offers a graph-based approach, enhancing the ability to find nearest neighbors efficiently, which is crucial for generative AI tasks. AWS emphasizes customer feedback and continuous innovation in the rapidly evolving field of generative AI, aiming to stay responsive and adaptive to customer needs. Here's the article to go along with the video podcast: https://thenewstack.io/postgres-is-now-a-vector-database-too/ Learn more from The New Stack about Vector Databases Top 5 Vector Database Solutions for Your AI Project https://thenewstack.io/top-5-vector-database-solutions-for-your-ai-project/ Vector Databases Are Having a Moment – A Chat with Pinecone https://thenewstack.io/vector-databases-are-having-a-moment-a-chat-with-pinecone/ Why Vector Size Matters https://thenewstack.io/why-vector-size-matters/ Join our community of newsletter subscribers to stay on top of the news and at the top of your game. https://thenewstack.io/newsletter/
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from The New Stack · The New Stack · 0 of 60

← Previous Next →
1 What's Next for the Cloud Foundry Foundation in 2017 with Executive Director Abby Kearns
What's Next for the Cloud Foundry Foundation in 2017 with Executive Director Abby Kearns
The New Stack
2 How Unikernels Can Better Defend against DDoS Attacks
How Unikernels Can Better Defend against DDoS Attacks
The New Stack
3 Weaveworks is Bringing Horizontal Scaling to Prometheus
Weaveworks is Bringing Horizontal Scaling to Prometheus
The New Stack
4 TNS Analysts Thanksgiving Special: The Evolution of Kubernetes and the Container Ecosystem
TNS Analysts Thanksgiving Special: The Evolution of Kubernetes and the Container Ecosystem
The New Stack
5 How Rancher Labs is Seeing Kubernetes Put to Work in Production
How Rancher Labs is Seeing Kubernetes Put to Work in Production
The New Stack
6 SAP Tests Kubernetes for Cloud-Native Enterprise Software Deployments
SAP Tests Kubernetes for Cloud-Native Enterprise Software Deployments
The New Stack
7 Event Marketing for Today's Developer Evangelists and Community Managers
Event Marketing for Today's Developer Evangelists and Community Managers
The New Stack
8 NodeSource Introduces Certified Modules to Improve Node.js Security
NodeSource Introduces Certified Modules to Improve Node.js Security
The New Stack
9 How Lightstep is Illuminating the Case for Distributed Tracing
How Lightstep is Illuminating the Case for Distributed Tracing
The New Stack
10 How OpenStack Aims to be More Inclusive without being Exclusive
How OpenStack Aims to be More Inclusive without being Exclusive
The New Stack
11 How Shuttlecloud Saves Time and Money by Monitoring with Prometheus
How Shuttlecloud Saves Time and Money by Monitoring with Prometheus
The New Stack
12 Creating Analytics-Driven Solutions for Operational Visibility
Creating Analytics-Driven Solutions for Operational Visibility
The New Stack
13 Understanding the Application Pattern for Effective Monitoring
Understanding the Application Pattern for Effective Monitoring
The New Stack
14 Building On Docker's Native Monitoring Functionality
Building On Docker's Native Monitoring Functionality
The New Stack
15 The Importance of Having Visibility Into Containers
The Importance of Having Visibility Into Containers
The New Stack
16 How Getting Your Project in the CNCF Just Got Easier
How Getting Your Project in the CNCF Just Got Easier
The New Stack
17 Tectonic Summit Pancake Breakfast: How to Sell Kubernetes to the Hypervisor-Minded
Tectonic Summit Pancake Breakfast: How to Sell Kubernetes to the Hypervisor-Minded
The New Stack
18 The Buzz at Tectonic Summit 2016 in New York City
The Buzz at Tectonic Summit 2016 in New York City
The New Stack
19 Bringing Clarity to the Future of Node.js Modules
Bringing Clarity to the Future of Node.js Modules
The New Stack
20 How FluentD Can Help Monitor Microservice Architectures Through Unified Logging
How FluentD Can Help Monitor Microservice Architectures Through Unified Logging
The New Stack
21 Reshaping Front End Development with Warehouse.ai
Reshaping Front End Development with Warehouse.ai
The New Stack
22 2016 Year End Wrap-Up: Discussing Docker, OpenStack, and Open Source
2016 Year End Wrap-Up: Discussing Docker, OpenStack, and Open Source
The New Stack
23 Here's Why You Should Build a Robot Using Node.JS: Because You Can
Here's Why You Should Build a Robot Using Node.JS: Because You Can
The New Stack
24 How the Node.js Foundation is Utilizing Participatory Governance Models
How the Node.js Foundation is Utilizing Participatory Governance Models
The New Stack
25 Set Up an MongoDB Replica Set in Less Than an Hour Using Bitnami Packages
Set Up an MongoDB Replica Set in Less Than an Hour Using Bitnami Packages
The New Stack
26 Determining Who Bears the Burden of Ensuring NPM Module Security
Determining Who Bears the Burden of Ensuring NPM Module Security
The New Stack
27 How Intel Snap uses Telemetry and Kubernetes to Drive Enterprise Efficiency
How Intel Snap uses Telemetry and Kubernetes to Drive Enterprise Efficiency
The New Stack
28 How the NFL Scored a Touchdown with its Open Source React Framework Wildcat
How the NFL Scored a Touchdown with its Open Source React Framework Wildcat
The New Stack
29 Aporeto CEO Dimitri Stiliadis: When it Comes to Security, Context is King
Aporeto CEO Dimitri Stiliadis: When it Comes to Security, Context is King
The New Stack
30 The Buzz at Node.JS Interactive
The Buzz at Node.JS Interactive
The New Stack
31 Why Going Serverless Doesn't Mean 'No Ops'
Why Going Serverless Doesn't Mean 'No Ops'
The New Stack
32 How Node.js is Transforming Today's Enterprises
How Node.js is Transforming Today's Enterprises
The New Stack
33 JJ Asghar Interview
JJ Asghar Interview
The New Stack
34 How Capital One is Using APIs to Streamline Auto Financing
How Capital One is Using APIs to Streamline Auto Financing
The New Stack
35 SXSW 2017: How Machine Learning Differs From Regular Programming
SXSW 2017: How Machine Learning Differs From Regular Programming
The New Stack
36 SXSW 2017: Data-Driven Applications with Capital One DevExchange's Hydrograph
SXSW 2017: Data-Driven Applications with Capital One DevExchange's Hydrograph
The New Stack
37 SXSW 2017: How Good Engineers Make Bad Business Decisions
SXSW 2017: How Good Engineers Make Bad Business Decisions
The New Stack
38 CloudNativeCon & KubeCon EU Pancake Breakfast 2017: Kubernetes and the Multi-Cloud
CloudNativeCon & KubeCon EU Pancake Breakfast 2017: Kubernetes and the Multi-Cloud
The New Stack
39 CNCF Executive Director Dan Kohn: What's Next for CNCF in 2017
CNCF Executive Director Dan Kohn: What's Next for CNCF in 2017
The New Stack
40 Exploring the Latest Container Runtime Projects in the CNCF
Exploring the Latest Container Runtime Projects in the CNCF
The New Stack
41 Exploring the Future of the Kubernetes Ecosystem
Exploring the Future of the Kubernetes Ecosystem
The New Stack
42 Kubernetes and Continuous Deployment
Kubernetes and Continuous Deployment
The New Stack
43 Kris Nova of Deis at CouldNativecon/Kubecon in Berlin
Kris Nova of Deis at CouldNativecon/Kubecon in Berlin
The New Stack
44 Docker's Quest for Simplicity with the Evolution of Containerd
Docker's Quest for Simplicity with the Evolution of Containerd
The New Stack
45 Developers First: The Cloud Foundry Service Broker API and Kubernetes
Developers First: The Cloud Foundry Service Broker API and Kubernetes
The New Stack
46 Mapping the Future of CoreOS's rkt in the CNCF
Mapping the Future of CoreOS's rkt in the CNCF
The New Stack
47 Red Hat and Dell EMC: Two Perspectives from DockerCon
Red Hat and Dell EMC: Two Perspectives from DockerCon
The New Stack
48 Capital One Opened its APIs to Third-Party Developers — Here’s What They Learned
Capital One Opened its APIs to Third-Party Developers — Here’s What They Learned
The New Stack
49 SUSE Joins the CNCF, Brings Kubernetes to OpenStack Cloud 7
SUSE Joins the CNCF, Brings Kubernetes to OpenStack Cloud 7
The New Stack
50 How Capital One Brings Open Source To The  Banking Industry
How Capital One Brings Open Source To The Banking Industry
The New Stack
51 OSCON Is Coming Back To Portland, A Show Wrapup With Co-Chair Kelsey Hightower
OSCON Is Coming Back To Portland, A Show Wrapup With Co-Chair Kelsey Hightower
The New Stack
52 Dev Or Ops Doesn’t Matter, You Need Observability
Dev Or Ops Doesn’t Matter, You Need Observability
The New Stack
53 Taking The Next Steps In Developing An Open Source Culture
Taking The Next Steps In Developing An Open Source Culture
The New Stack
54 SXSW 2017: How Capital One Became Technology-First With Open Source
SXSW 2017: How Capital One Became Technology-First With Open Source
The New Stack
55 Apcera   Old Apps Spanning New Clouds
Apcera Old Apps Spanning New Clouds
The New Stack
56 Provenance: The Peace of Mind Chef Habitat Seeks to Deliver
Provenance: The Peace of Mind Chef Habitat Seeks to Deliver
The New Stack
57 InSpec: Human Readable, Automated Compliance
InSpec: Human Readable, Automated Compliance
The New Stack
58 The Evolution of SAP HANA Express
The Evolution of SAP HANA Express
The New Stack
59 Women Engineers Who Inspire And Never Give Up
Women Engineers Who Inspire And Never Give Up
The New Stack
60 Three Perspectives on the Evolution of Container Security
Three Perspectives on the Evolution of Container Security
The New Stack

This video discusses the introduction of PG Vector, an open-source tool that integrates generative AI and vector capabilities into PostgreSQL databases, making Postgres a vector database, too. The video covers the benefits and implications of this development, including efficient similarity search and retrieval augmented generation. By watching this video, viewers can gain a deeper understanding of the intersection of relational databases, vector databases, and generative AI.

Key Takeaways
  1. Install and configure PG Vector on Postgres
  2. Use PG Vector to store and search vector data
  3. Implement retrieval augmented generation using LLMs and PG Vector
  4. Evaluate the performance of vector databases and retrieval augmented generation
  5. Fine-tune LLMs for specific use cases and applications
💡 The integration of generative AI and vector capabilities into PostgreSQL databases enables efficient similarity search and retrieval augmented generation, making Postgres a vector database, too, and opening up new possibilities for applications and use cases.

Related Reads

Up next
This FREE Tool Turns ANY PDF into Perfect Markdown (MinerU Live Test)
Prompt Engineer
Watch →