# Google + Weaviate

<!-- Note: for images, use https://docs.google.com/presentation/d/15opIcJuaIjEEcs_1Zm8B6pccox2p7_MHSjCnRv4dPfU/edit?usp=sharing -->

Google offers a wide range of models for natural language processing and generation. Weaviate seamlessly integrates with [Google Gemini API](https://ai.google.dev/?utm_source=weaviate\&utm_medium=referral\&utm_campaign=partnerships\&utm_content=) and [Google Vertex AI](https://cloud.google.com/vertex-ai) APIs, allowing users to leverage Google's models directly from the Weaviate Database.

These integrations empower developers to build sophisticated AI-driven applications with ease.

## Integrations with Google

### Embedding models for vector search

![Embedding integration illustration](/assets/docs/weaviate/model-providers/_includes/integration_google_embedding.png)

Google's embedding models transform text data into vector embeddings, capturing meaning and context.

[Weaviate integrates with Google's embedding models](google-embeddings.md) to enable seamless vectorization of data. This integration allows users to perform semantic and hybrid search operations without the need for additional preprocessing or data transformation steps.

[Google embedding integration page](google-embeddings.md)

[Google multimodal embedding integration page](google-embeddings-multimodal.md)

### Generative AI models for RAG

![Single prompt RAG integration generates individual outputs per search result](/assets/docs/weaviate/model-providers/_includes/integration_google_rag_single.png)

Google's generative AI models can generate human-like text based on given prompts and contexts.

[Weaviate's generative AI integration](google-generative.md) enables users to perform retrieval augmented generation (RAG) directly from the Weaviate Database. This combines Weaviate's efficient storage and fast retrieval capabilities with Google's generative AI models to generate personalized and context-aware responses.

[Google generative AI integration page](google-generative.md)

## Summary

These integrations enable developers to leverage Google's powerful models directly within Weaviate.

In turn, they simplify the process of building AI-driven applications to speed up your development process, so that you can focus on creating innovative solutions.

## Credentials

You must provide valid Google API credentials to Weaviate for these integrations.

### Vertex AI

#### Automatic token generation

:::callout{intent="info" title="Not available on Weaviate Cloud instances"}
This feature is not available on Weaviate cloud instances.
:::

You can save your Google Vertex AI credentials and have Weaviate generate the necessary tokens for you. This enables use of IAM service accounts in private deployments that can hold Google credentials.

To do so:

- Set `USE_GOOGLE_AUTH` [environment variable](../database-configuration/overview.md#module-specific) to `true`.
- Have the credentials available in one of the following locations.

Once appropriate credentials are found, Weaviate uses them to generate an access token and authenticates itself against Vertex AI. Upon token expiry, Weaviate generates a replacement access token.

In a containerized environment, you can mount the credentials file to the container. For example, you can mount the credentials file to the `/etc/weaviate/` directory and set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to `/etc/weaviate/google_credentials.json`.

:::accordion{title="Search locations for Google Vertex AI credentials"}
Once `USE_GOOGLE_AUTH` is set to `true`, Weaviate will look for credentials in the following places, preferring the first location found:

1. A JSON file whose path is specified by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable. For workload identity federation, refer to [this link](https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation) on how to generate the JSON configuration file for on-prem/non-Google cloud platforms.
2. A JSON file in a location known to the `gcloud` command-line tool. On Windows, this is `%APPDATA%/gcloud/application_default_credentials.json`. On other systems, `$HOME/.config/gcloud/application_default_credentials.json`.
3. On Google App Engine standard first generation runtimes (<= Go 1.9) it uses the appengine.AccessToken function.
4. On Google Compute Engine, Google App Engine standard second generation runtimes (>= Go 1.11), and Google App Engine flexible environment, it fetches credentials from the metadata server.
:::

## Get started

Weaviate integrates with both the [Google Gemini API](https://aistudio.google.com/app/apikey/?utm_source=weaviate\&utm_medium=referral\&utm_campaign=partnerships\&utm_content=) and [Google Vertex AI](https://cloud.google.com/vertex-ai).

Go to the relevant integration page to learn how to configure Weaviate with the Google models and start using them in your applications.

- [Text Embeddings](google-embeddings.md)
- [Multimodal Embeddings](google-embeddings-multimodal.md)
- [Generative AI](google-generative.md)

## Questions and feedback

Have a question or feedback? Here's how to reach us.

::::card-grid
:::card{title="Community Forum" href="https://forum.weaviate.io/c/support" icon="messages-square"}
Ask questions and connect with other developers on our **Community forum**.
:::

:::card{title="Support" href="/guides/support-overview" icon="life-buoy"}
Weaviate Cloud user or customer? Find the right channel on the **Support page**.
:::
::::

## Related pages

- [Agents](./agents-index.md)
- [AI-assisted Weaviate code generation](./ai-assisted-vibe-coding-index.md)
- [APIs](./apis-index.md)
- [Authorization and authentication](./authorization-and-authentication-index.md)
- [Benchmarks](./benchmarks-index.md)
- [Best practices](./best-practices-index.md)
- [Client libraries](./clients-index.md)
- [Client Libraries / SDKs](./client-libraries-index.md)
- [Cloud](./cloud-index.md)
- [Cloud account management](./cloud-account-management-index.md)

# Agent Instructions

This portal answers questions programmatically. To receive a synthesized,
source-cited answer instead of crawling page by page, append the `?ask=`
query parameter to any page URL on this site:

    /guides/quickstart?ask=how+do+I+authenticate

Optional parameters:

- `&goal=<what-you-are-trying-to-do>` steers the answer toward your
  objective (e.g. `&goal=write+a+python+client`).
- `&version=<label>` scopes the answer to a mounted version when the
  portal publishes more than one.

The response is `text/markdown`: the answer followed by a `# Sources` list
of the portal pages it was grounded in. Status codes are the contract:

- `200` — the answer; `402` — the portal owner’s plan or answer credits are
  exhausted (surface this to your operator; do NOT retry); `429` — you are
  rate-limited; back off for the `Retry-After` seconds; `503` — the answer
  lane is temporarily unavailable; fall back to crawling the `.md` pages.

For the full corpus map read `llms.txt` at the site root; for the tool
surface (search + page fetch as MCP tools) see `/mcp`.
