-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Go] pgvector sample #375
[Go] pgvector sample #375
Conversation
A sample demonstrating how to use Postgres's vector extension to build an indexer and retriever.
for _, doc := range res.Documents { | ||
fmt.Printf("%+v %q\n", doc.Metadata, doc.Content[0].Text) | ||
} | ||
// Use documents in RAG prompts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a TODO? I'm not sure what the point of retrieving here is, as you don't actually answer the question asked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's deliberately a sketch. So yeah it's a TODO, but not for us, for whoever copies the sample.
I based it off of https://github.com/firebase/genkit/blob/main/docs/templates/pgvector.md.
I decided to write actual code rather than a markdown file so I could be sure it actually worked.
Are we not going to add this as a plugin? |
We are not going to make a plugin, presumably because the sql is very specific to a particular application. See https://github.com/firebase/genkit/blob/main/docs/templates/pgvector.md for the equivalent JS. |
A sample demonstrating how to use Postgres's vector extension to build an indexer and retriever. Formerly #375.
A sample demonstrating how to use Postgres's vector extension to build an indexer and retriever. Formerly #375.
A sample demonstrating how to use Postgres's vector extension
to build an indexer and retriever.