Skip to content

Support "Grounding with your own data" in Google provider #4230

Open
@sroze

Description

Feature Description

Following on @shaper's message in #3553 (comment), I'm creating a new issue to track the feature of being able to use Google's grounding-to-your-own data feature (https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/ground-gemini#private-ground-gemini).

Use Cases

I want to ground answers with my own data, using Google's feature for this :)

Additional context

I'd be very happy to send over a PR. Here's what I am thinking:

  1. Add the following setting in the GoogleGenerativeAISettings interface:
  /**
Optional. When enabled, the model will use your own Vertex data store to ground the response.

@see https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/ground-gemini#private-ground-gemini
   */
  useOwnDataGrounding?: {
    datastore: string;
  }
  1. In the google package prepareTool function:
    • Add a useOwnDataGrounding: { datastore: string; } | undefined argument.
    • Make it so that you can use tools and any of the grounding tools
    • Add the { retrieval: { vertexAiSearch: useOwnDataGrounding } } tool if useOwnDataGrounding is not undefined

If broadly aligned, let me know and I'll send a PR.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions