-
Notifications
You must be signed in to change notification settings - Fork 8
Autovectorization Tutorial #54
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
base: main
Are you sure you want to change the base?
Conversation
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.
Summary of Changes
Hello @giriraj-singh-couchbase, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request delivers a new, detailed tutorial designed to guide users through the process of leveraging Couchbase Capella's AI Services for automatic data vectorization. The tutorial provides a complete walkthrough, from initial Capella account and cluster setup to deploying embedding models and configuring auto-vectorization workflows, culminating in practical examples of semantic search using LangChain. The aim is to empower users to easily transform their data into vector embeddings and build intelligent search applications.
Highlights
- New Auto-Vectorization Tutorial: Introduces a comprehensive tutorial demonstrating the use of Couchbase Capella's AI Services auto-vectorization feature to convert data into vector embeddings.
- LangChain Integration: The tutorial showcases how to perform semantic search using the generated vector embeddings by integrating with LangChain.
- Step-by-Step Guide: The tutorial covers essential steps including Couchbase Capella setup, data upload and processing, embedding model deployment, auto-vectorization workflow configuration, and practical LangChain integration examples.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
|
Caution Notebooks or Frontmatter Files Have Been Modified
1 Notebook Files Modified:
1 Frontmatter Files Modified:
|
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.
Code Review
This pull request introduces a comprehensive tutorial on using Couchbase Capella's AI Services for auto-vectorization with LangChain. The tutorial is well-structured, but there are several areas for improvement to enhance clarity, correctness, and security for the end-user. My review includes feedback on the README file and the Jupyter notebook, addressing issues such as placeholder values, dependency management, broken links, inconsistent formatting, typos, and a hardcoded credential. Addressing these points will make the tutorial more polished and easier for users to follow.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…se-examples/vector-search-cookbook into DA-1096_autovec_tutorial
nithishr
left a comment
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.
Can you apply the same comments as in #57 to this one as well?
nithishr
left a comment
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.
Same comments as in #57 are relevant here as well.
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.
Looks okay. A few things to make it more user friendly.
- Can you use the hierarchy of markdown (##, ###, ####) instead of numbers to organize the tutorial?
- The model has to be deployed in the same region as the database for workflows to work.
- Can you link to the model & workflows documentation in the relevant places?
- Imo, the combination of address, description & id is not a great field to vectorize. Address & id has no use in vector search. Only the description is meaningful.
- Can you show the document structure before & after the workfow is run?
- Will the tutorial work? The embedding field is different from the default
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.
Yes, the tutorial works.
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.
I will update with these comments. Thank you.
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 there specific documentation for for model services? I was only able to get the AI-services tab where there is very little about the workflows.
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.
for the document structure I have added a line. Since, there is one field added at the end of the document I dont think the full image is needed.
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.
For the sake of ease I have used all source field into vector embeddings and updated accordingly.
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.
- Linking to docs (https://docs.couchbase.com/ai/build/vectorization-service/data-processing.html) in the relevant sections of Workflows would be nice.
- Please add this
The model has to be deployed in the same region as the database for workflows to work.It is important as users could end up having to kill & redeploy clusters due to the region issue. It is also in the docs. -
For the sake of ease I have used all source field into vector embeddings and updated accordingly.
Our aim should be to showcase simple realistic use cases not go for simplicity. In this dataset, it makes no sense to vectorize all fields into a single vector. -
Since, there is one field added at the end of the document I dont think the full image is needed.
It is the only thing we are getting we are getting out of the Vectorization flow. So in my opinion, we should add it. It can be just a markdown of a sample document. - There are some warnings due to Pydantic not being supported on Python 3.14. Can we get rid of this either by updating the langchain packages to 1.0.x or downgrading Python to 3.13 for the tutorial?
- The package versions for langchain-couchbase are not right. Version 0.5.0 & higher are the only ones that support QueryVectorStore.
- In the field mapping section, it is not mentioned which approach has been selected. It has to be inferred from the screenshots. You can include either just one approach screenshot or mention explicitly about the selected approach.
-
After choosing the type of mapping, it is required to either create an index on the new vector_embedding field or the creation of a vector index can be skipped, which is not recommended as the functionality of vector searching will be lost.
This statement is not correct. Vector search will work using brute force without an index. - The comments in the Cluster setup code is a bit too off to the right. Can you reduce the spacing for the comments so that they are visible without scrolling?
- The page content in the results does not make much sense. You should include other relevant fields in the vector search response like reviews, name, etc. This is supported by the integration.
…ontmatter - used ## & # for headings and subheadings
|
There is also a test failure |
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.
- Linking to docs (https://docs.couchbase.com/ai/build/vectorization-service/data-processing.html) in the relevant sections of Workflows would be nice.
- Please add this
The model has to be deployed in the same region as the database for workflows to work.It is important as users could end up having to kill & redeploy clusters due to the region issue. It is also in the docs. -
For the sake of ease I have used all source field into vector embeddings and updated accordingly.
Our aim should be to showcase simple realistic use cases not go for simplicity. In this dataset, it makes no sense to vectorize all fields into a single vector. -
Since, there is one field added at the end of the document I dont think the full image is needed.
It is the only thing we are getting we are getting out of the Vectorization flow. So in my opinion, we should add it. It can be just a markdown of a sample document. - There are some warnings due to Pydantic not being supported on Python 3.14. Can we get rid of this either by updating the langchain packages to 1.0.x or downgrading Python to 3.13 for the tutorial?
- The package versions for langchain-couchbase are not right. Version 0.5.0 & higher are the only ones that support QueryVectorStore.
- In the field mapping section, it is not mentioned which approach has been selected. It has to be inferred from the screenshots. You can include either just one approach screenshot or mention explicitly about the selected approach.
-
After choosing the type of mapping, it is required to either create an index on the new vector_embedding field or the creation of a vector index can be skipped, which is not recommended as the functionality of vector searching will be lost.
This statement is not correct. Vector search will work using brute force without an index. - The comments in the Cluster setup code is a bit too off to the right. Can you reduce the spacing for the comments so that they are visible without scrolling?
- The page content in the results does not make much sense. You should include other relevant fields in the vector search response like reviews, name, etc. This is supported by the integration.
deniswsrosa
left a comment
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.
Minor change at the beggining
| " <img src=\"./img/workflow.png\" width=\"1000px\" height=\"500px\" style=\"padding: 5px; border-radius: 10px 20px 30px 40px; border: 2px solid #555;\">\n", | ||
| " \n", | ||
| "2. Start your workflow deployment by giving it a name and selecting where your data will be provided to the auto-vectorization service. There are currently 3 options: <B>`pre-processed data (JSON format) from Capella`</B>, <B>`pre-processed data (JSON format) from external sources (S3 buckets)`</B> and <B>`unstructured data from external sources (S3 buckets)`</B>. For this tutorial, we will choose the first option, which is pre-processed data from Capella.\n", | ||
| "\n", |
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.
Link to a docs page (if there is any) that talk about these items.
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.
The link is there at the very starting.
This guide is a comprehensive tutorial demonstrating how to use Couchbase Capella's AI Services auto-vectorization feature to automatically convert your data into vector embeddings and perform semantic search using LangChain.
📋 Overview
The main tutorial is contained in the Jupyter notebook
autovec_langchain.ipynb, which walks you through: