Develop applications with AI and YugabyteDB

Support RAG, semantic search, and AI agents at enterprise scale

YugabyteDB offers the familiarity and extensibility of PostgreSQL, while also delivering scale and resilience. Its distributed nature combines enterprise-grade vector search with ACID transactions. YugabyteDB enables you to store embeddings alongside transactional data, perform vector similarity searches with full SQL capabilities, and scale to billions of vectors across multiple regions, all with PostgreSQL compatibility and zero-downtime operations.

Using the pgvector PostgreSQL extension, YugabyteDB functions as a highly performant vector database, with enterprise scale and resilience. This means you can use YugabyteDB to support Retrieval-augmented generation (RAG) workloads, providing AI agents with knowledge of your unstructured data, while its scalability allows it to store and search billions of vectors.

Learn more about developing GenAI and RAG applications with YugabyteDB:

Get started

Use YugabyteDB v2025.1 or later to get the latest vector indexing capabilities and MCP features.

No cluster? No problem. Run the latest YugabyteDB version locally on macOS (using Docker or the yugabyted binary) or any Linux VM to try these tutorials.

Get started with AI and YugabyteDB using the "Hello RAG" example to build your first AI application. Hello RAG walks you through building a complete Retrieval-Augmented Generation pipeline, which powers many enterprise AI applications, from customer support chatbots to semantic search systems.

In this tutorial, you will:

  1. Vectorize data: Split local documents into chunks and generate embeddings using OpenAI.
  2. Store and index: Insert those embeddings into YugabyteDB using the pgvector extension.
  3. Retrieve and generate: Perform a vector similarity search to find relevant context and use an LLM (like GPT-4) to generate a grounded, accurate response.
Build your first AI app with Hello RAG.

AI tutorials

Explore the following tutorials to see how YugabyteDB integrates with different LLMs and frameworks.

Tutorial Use case LLM / framework LLM location
Hello RAG Build a basic RAG pipeline for document-based question answering. OpenAI External
Azure AI Use Azure OpenAI to build a scalable RAG application with vector search. Azure OpenAI External
Google Vertex AI Use Google Vertex AI for similarity search and generative AI workflows. Vertex AI External
LocalAI Build and run an LLM application entirely on-premises for privacy and security. LocalAI Local / on-premises
Ollama Host and run embedding models locally for vector-based similarity search. Ollama Local / on-premises
YugabyteDB MCP server Enable LLMs to interact directly with YugabyteDB using natural language. Claude / Cursor External
LlamaIndex Connect LLMs to structured and unstructured data using LlamaIndex. OpenAI / LlamaIndex External
LangChain Build a natural language interface to query your database without writing SQL. OpenAI / LangChain External