Build AI-powered apps on Google Cloud with pgvector, LangChain & LLMs
Ғылым және технология
Make a copy of the Colab notebook → goo.gle/3XrZUn5
Read the launch blog → goo.gle/3CKgzZN
Read the demo blog → goo.gle/3XpFPxH
Showcasing various features of the Postgres extension pgvector, see an example of how you can extend your database application to build AI-powered experiences using LangChain and LLM. The pgvector extension can manage vector embeddings directly within your Cloud SQL and AlloyDB databases, making integrating Generative AI capabilities within your Postgres-powered applications easier. In this demo, we use Google's PaLM models powered by VertexAI.
Chapters:
0:00 - Intro
0:30 - Vector embeddings defined
1:04 - pgvector support
1:22 - Demo summary
2:24 - Demo start
7:24 - Conclusion
Subscribe to Google Cloud Tech → goo.gle/GoogleCloudTech
#Databases #GenerativeAI #pgvector
Пікірлер: 29
This is very cool! Great job Google!
This is very useful!
Excellent! I was just looking at Langchain integrations yesterday and was happy to see that there were two with Vertex AI. This was a very useful colab. Hope that you put plenty more which includes Langchain as most of the more popular open source LLM apps use it. Is it possible for you to do colabs which combines Langchain with Vertex AI Vision, etc. and generative AI?
@gabeweiss
Жыл бұрын
Anything is possible! It's all a question of resources and priority. ;) Hearing you say you want more of that puts an extra hash mark on that sort of demo. :D
Holy SQL, Batman! I hope there is a more ergonomic API out there or in the works.
@gabeweiss
Жыл бұрын
For interacting with pgvector specifically? Or GenAI more broadly?
@X1011
Жыл бұрын
@@gabeweiss pgvector. I suppose there’s some ORM for Python out there, I‘ll just have to see if one would support the vector types, though.
@Astorax
Жыл бұрын
@@X1011 Got it, you mean like, SQL Alchemy and having proper Python objects, etc, yeah? Sadly a quick search doesn't show anything that's been done in that area. I'd expect we'd need something like psycopg2 to implement it as first class objects which to my knowledge hasn't been done yet.
Hey! This is really useful, just wondering if there's a JS version of this?
When gcp has vertex ai matching engine which act as semantic search engine, why the demo is integrated with pgvector ?
@gabeweiss
Жыл бұрын
Because there are times that you want both a semantic search and an operational search, potentially in the same query. In the demo we talk about it, combining the semantic search with standard SQL limitations on price, for example. So while you can do the semantic search alone with Vertex, sometimes you want more.
I have been playing with bard API for several days. I try to use it to make summary of youtube video, which involves splitting transcript into chunks. One serious problem is that for some chunk I never get result. And seems text-bison-001 return nothing. I tried several times and it is always the same chunk. I also tested this through vertex ai, the same result. This is something never happens with OpenAI. Could you pls let me know why?
@Astorax
Жыл бұрын
Weird. It doesn’t happen to be the first or last chunk is it?
@xiaomiwu4734
Жыл бұрын
@@Astorax Nothing to do with the last or the first one. Maybe it is in the middle. But I tried several times it is always the same Chunk. Could you pls help to tackle this problem? I am using python code to do this.
@aaroncarter1112
11 ай бұрын
@@xiaomiwu4734 Are you passing safety_settings into the request? Bison is very sensitive to even the slightest hint of controversy and will refuse to respond. As of right now Langchain does not handle this exception well.
I'd love to test it, but I'm still on Bard's waitlist for months. When will Bard / PaLM be available in the EU?
@gabeweiss
Жыл бұрын
Sorry, I don't have any specific information about dates yet. :( We're working to rolling it out as quickly as possible, I just don't know when.
How can I use Prisma with AlloyDB. I can't seem to find 'connection url' for the AlloyDB instance
@gabeweiss
9 ай бұрын
I'm not familiar with Prisma, but for AlloyDB (as of the writing of this comment) there's no public access, so barring some work to get a network route to the database, it'll be easiest to run Prisma from a virtual machine on Google Compute Engine that shares a network with your AlloyDB instance. The URL will then be the same you'd create for any other (we don't have an easy way to just get it) but it would be "postgresql://:@:5432/". Replacing the appropriate things with your info of course.
Does splitting the sentence into separate chunks when generating embedding cause cause any issues with sentence context?
@gabeweiss
19 күн бұрын
The common pattern, if you're auto splitting into chunks and not trying to do some human-defined chunking, is to chunk into different sizes. So you'd chunk on like, 100 chars, 500 chars, 1000 chars, with different offsets or something similar. That way the sentence would exist in multiple chunks at various positions, so the context would be preserved by at least one (usually two) of the chunking sizes.
now, how to make that notebook to become user friendly for non IT people?
@gabeweiss
Жыл бұрын
At least it's more friendly than a GitHub repo with just a bunch o' Python files? :D
@gitasuputra8371
Жыл бұрын
@@gabeweiss well, indeed
@dailywisdomquotes518
11 ай бұрын
I Can give this code an UI, like webapp basically
Woah
Hoy to deploy it?
@gabeweiss
9 ай бұрын
If you have a GCP project, you can follow the instructions in the notebook to deploy it. There's step by step instructions in there for setting up all the infrastructure and environment.
products cascade ??? noooo