-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Grounding vertex AI Gemini #11545
base: main
Are you sure you want to change the base?
Grounding vertex AI Gemini #11545
Conversation
if datastore: | ||
from vertexai.preview.generative_models import Tool, grounding | ||
tool = Tool.from_retrieval( | ||
grounding.Retrieval(grounding.VertexAISearch(datastore=datastore)) |
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.
Interesting. Do you mind giving me a quick rundown of what this does to API calls? Does it force the LLM to act as an agent with this single retrieval tool?
Does vertexai support tools for any LLM? This would be really nice for agents for example, similar to openais tools api
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.
Hello Logan,
Thanks for your answer. What this does is, in case you have a Verte datastore defined (see this link) you can ground your model in the data store. This is incredibly convenient for RAG applications, as creating a datastore is very easy.
And it doesn't force the LLM to act as an agent. You are just giving the LLM your datastore as a resource. You can tell in the prompt to give an answer strictly using the datastore, to reduce hallucinations.
hmm, linting for 3.9 is failing so auto merge not happen yet. :( |
Head branch was pushed to by a user without write access
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Tested functionalities for chat, passing datastore as string parameter.
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Suggested Checklist:
make format; make lint
to appease the lint gods