Choose infrastructure for your generative AI application
Learn which products, frameworks, and tools are the best match for building your generative AI application. Common components in a Cloud-hosted generative AI application include:
- Application hosting: Compute to host your application. Your application can use Google Cloud's client libraries and SDKs to talk to different Cloud products.
- Model hosting: Scalable and secure hosting for a generative model.
- Model: Generative model for text, chat, images, code, embeddings, and multimodal.
- Grounding solution: Anchor model output to verifiable, updated sources of information.
- Database: Store your application's data. You might reuse your existing database as your grounding solution, by augmenting prompts using SQL query, or by storing your data as vector embeddings using an extension like pgvector.
- Storage: Store files such as images, videos, or static web frontends. You might also use Storage for the raw grounding data (eg. PDFs) that you later convert into embeddings and store in a vector database.
The following sections walk through each of those components, helping you choose which Google Cloud products to try.
Application hosting infrastructure
Choose a product to host and serve your application workload, which makes calls out to the generative model.
Get started with:
Model hosting infrastructure
Google Cloud provides multiple ways to host a generative model, from the flagship Vertex AI platform, to customizable and portable hosting on Google Kubernetes Engine.
Get started with:
Model
Google Cloud provides a set of state-of-the-art foundation models through Vertex AI, including Gemini. You can also deploy a third-party model to either Vertex AI Model Garden or self-host on GKE, Cloud Run, or Compute Engine.
Get started with:
- Gemini
- Codey
- Imagen
- text-embedding
- Vertex AI Model Garden (open source models)
- Hugging Face Model Hub (open source models)
Grounding
To ensure informed and accurate model responses, you may want to ground your generative AI application with real-time data. This is called retrieval-augmented generation (RAG).
You can implement grounding with your own data in a vector database, which is an optimal format for operations like similarity search. Google Cloud offers multiple vector database solutions, for different use cases.
Note: You can also ground with traditional (non vector) databases, by querying an existing database like Cloud SQL or Firestore, and using the result in your model prompt.
Get started with:
- Vertex AI Agent Builder (formerly Enterprise Search, Gen AI App Builder, Discovery Engine)
- Vector Search (formerly Matching Engine)
- AlloyDB for PostgreSQL
- Cloud SQL
- BigQuery
Grounding with APIs
Instead of (or in addition to) using your own data for grounding, many online services offer APIs that you can use to retrieve grounding data to augment your model prompt.
Vertex AI Extensions (Private Preview)
Create, deploy, and manage extensions that connect large language models to the APIs of external systems.
Langchain Components
Explore a variety of document loaders and API integrations for your gen AI apps, from YouTube to Google Scholar.
Grounding in Vertex AI
If you're using models hosted in Vertex AI, you can ground model responses using Vertex AI Search, Google Search, or inline/infile text.
Start building
Set up your development environment for Google Cloud
Set up LangChain
LangChain is an open-source framework for generative AI apps that lets you build context into your prompts and take action based on the model's response.
View code samples and deploy sample applications
View code samples for popular use cases and deploy examples of generative AI applications that are secure, efficient, resilient, high-performing, and cost-effective.