---
title: "Develop applications with AI and YugabyteDB"
url: "https://docs.yugabyte.com/stable/develop/ai/"
---

# Develop applications with AI and YugabyteDB

How to 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](/stable/additional-features/pg-extensions/extension-pgvector/ "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.

For integrated document preprocessing and embedding generation from SQL, use the [pg\_dist\_rag](/stable/develop/ai/distributed-rag/ "pg_dist_rag") extension [TP](/stable/releases/versioning/#feature-maturity) (YugabyteDB [v2026.1.1.0](/stable/releases/ybdb-releases/v2026.1#v2026.1.1.0) or later). It registers document sources, coordinates distributed chunking and embedding pipelines, and stores vectors in pgvector indexes—without building external ETL.

Learn more about developing GenAI and RAG applications with YugabyteDB:

- [Beyond RAG: Using YugabyteDB as the Foundation for Reliable AI Decisions](https://www.yugabyte.com/blog/using-yugabytedb-for-reliable-ai-decisions/ "Beyond RAG: Using YugabyteDB as the Foundation for Reliable AI Decisions")
- [Introducing New YugabyteDB Functionality for Ultra-Resilient AI Apps](https://www.yugabyte.com/blog/new-yugabytedb-functionality-for-ultra-resilient-ai-apps/ "Introducing New YugabyteDB Functionality for Ultra-Resilient AI Apps")
- [Introducing the YugabyteDB MCP Server](https://www.yugabyte.com/blog/yugabytedb-mcp-server/ "Introducing the YugabyteDB MCP Server")
- [How to Build a RAG Workflow for Agentic AI without Code](https://www.yugabyte.com/blog/build-a-rag-workflow-for-agentic-ai-without-codev/ "How to Build a RAG Workflow for Agentic AI without Code")
- [From RAG to Riches: AI That Knows Your Support Stack](https://www.yugabyte.com/blog/rag-ai-that-knows-your-support-stack/ "From RAG to Riches: AI That Knows Your Support Stack")

## YugabyteDB MCP server and skills

The YugabyteDB MCP Server is a lightweight, Python-based server that enables agents to securely connect to access, query, analyze, and interpret data in your YugabyteDB database using natural language prompts. Complement the MCP server with YugabyteDB Agent Skills. These structured skill packages give AI coding agents native YugabyteDB expertise for schema design, API usage, operations, and RAG workflows.

Install skills and connect to the [MCP server](/stable/develop/ai/mcp-server/ "MCP server").



## Get started

Use YugabyteDB [v2025.2](/stable/releases/ybdb-releases/v2025.2) or later to get the latest vector indexing capabilities and MCP features.

No cluster? No problem. Run the [latest YugabyteDB version locally](https://download.yugabyte.com "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](/stable/develop/ai/hello-rag/ "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](/stable/develop/ai/hello-rag/ "Hello RAG")                                              | Build a basic RAG pipeline for document-based question answering.                                         | OpenAI                               | External            |
| [Hello Distributed RAG](/stable/develop/ai/distributed-rag/hello-dist-rag/ "Hello Distributed RAG") | Build the same RAG pipeline with ingestion managed in SQL by the pg\_dist\_rag extension.                 | OpenAI                               | External            |
| [Azure AI](/stable/develop/ai/azure-openai/ "Azure AI")                                             | Use Azure OpenAI to build a scalable RAG application with vector search.                                  | Azure OpenAI                         | External            |
| [Google Vertex AI](/stable/develop/ai/google-vertex-ai/ "Google Vertex AI")                         | Use Google Vertex AI for similarity search and generative AI workflows.                                   | Vertex AI                            | External            |
| [LocalAI](/stable/develop/ai/ai-localai/ "LocalAI")                                                 | Build and run an LLM application entirely on-premises for privacy and security.                           | LocalAI                              | Local / on-premises |
| [Ollama](/stable/develop/ai/ai-ollama/ "Ollama")                                                    | Host and run embedding models locally for vector-based similarity search.                                 | Ollama                               | Local / on-premises |
| [YugabyteDB MCP server](/stable/develop/ai/mcp-server/ "YugabyteDB MCP server")                     | Enable LLMs to interact directly with YugabyteDB using natural language.                                  | Claude / Cursor                      | External            |
| [LlamaIndex](/stable/develop/ai/ai-llamaindex-openai/ "LlamaIndex")                                 | Connect LLMs to structured and unstructured data using LlamaIndex.                                        | OpenAI / LlamaIndex                  | External            |
| [LangChain](/stable/develop/ai/ai-langchain-openai/ "LangChain")                                    | Build a natural language interface to query your database without writing SQL.                            | OpenAI / LangChain                   | External            |
| [Distributed RAG](/stable/develop/ai/distributed-rag/ "Distributed RAG")                            | Build distributed RAG pipelines with integrated document preprocessing and embedding generation from SQL. | OpenAI / LangChain / Unstructured.io | External            |
