A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/sql/docs/postgres/ai-overview below:

Build generative AI applications using Cloud SQL | Cloud SQL for PostgreSQL

Build generative AI applications using Cloud SQL

Stay organized with collections Save and categorize content based on your preferences.

MySQL   |  PostgreSQL   |  SQL Server

This page provides an overview of capabilities offered by Cloud SQL for PostgreSQL to help you build generative AI applications. For getting started with a sample application, see Get started with using Cloud SQL for generative AI applications.

Retrieval-Augmented Generation (RAG) is a technique for optimizing the output of a large language model (LLM) by referencing an authoritative knowledge base before generating a response. RAG enhances generative AI applications by improving their accuracy. Cloud SQL databases offer capabilities curated for RAG and generative AI applications, as explained in this page.

Generate vector embeddings

Vector embeddings are essential for RAG because they enable a semantic understanding and an efficient similarity search. These embeddings are numerical representations of text, images, audio, and video. Embedding models generate the vector embeddings so that, if two pieces of content are similar semantically, then their respective embeddings are located near each other in the embedding vector space.

Cloud SQL integrates with Vertex AI. You can use the models that Vertex AI hosts to generate vector embeddings by using SQL queries.

Cloud SQL extends PostgreSQL syntax with an embedding function for generating vector embeddings of text. After you generate these embeddings, you can store them in a Cloud SQL database without needing a separate vector database.

You can also use Cloud SQL to store vector embeddings that are generated outside of Cloud SQL. For example, you can store vector embeddings that are generated by using pre-trained models in the Vertex AI Model Garden. You can use these vector embeddings as inputs to pgvector functions for similarity and semantic searches.

Store, index, and query vector embeddings with pgvector

You can store, index, and query vector embeddings in Cloud SQL by using the pgvector PostgreSQL extension.

For more information about configuring this extension, see Configure PostgreSQL extensions. For more information about storing, indexing, and querying vector embeddings, see Store a generated embedding and Query and index embeddings using pgvector.

Invoke online predictions using SQL queries

You can invoke online predictions using models stored in the Vertex AI Model Garden by using SQL queries.

Use the LangChain integration

Cloud SQL integrates with LangChain, an open-source LLM orchestration framework, to simplify developing generative AI applications. You can use the following LangChain packages:

Improve vector search performance

You can improve the performance of a vector search by using the following:

Benefits of using Cloud SQL for generative AI applications

Using Cloud SQL to build generative AI applications provides the following:

Get started using Cloud SQL for generative AI applications

To get started building generative AI applications, use this sample app. The app uses Cloud SQL, Vertex AI, and either Google Kubernetes Engine (GKE) or Cloud Run. You can use the app to build a basic chatbot API that:

The solution contains the following contents:

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-09 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4