# Cloud SQL for PostgreSQL for LangChain Resources

This directory provides code samples to help you get started with LangChain and Cloud SQL for PostgreSQL.

## Guides & Samples

| Sample | Description |
| ------ | ----------- |
| [Langchain Quick Start](./langchain_quick_start.ipynb) | This codelab demonstrates how to create a powerful interactive GenAI application using Retrieval Augmented Generation (RAG) powered by [CloudSQLfor PostgreSQL](https://cloud.google.com/sql/docs/postgres) and [LangChain](https://www.langchain.com/). |
| [Get Started: `PostgresVectorStore`](../docs/vector_store.ipynb) | This notebook goes over how to use Cloud SQL for PostgreSQL to store vector embeddings with the `PostgresVectorStore` class. |
| [Get Started: `PostgresLoader`](../docs/document_loader.ipynb) | This notebook goes over how to use Cloud SQL for PostgreSQL to load Documents with the `PostgresLoader` class. |
| [Get Started: `PostgresChatMessageHistory`](../docs/chat_message_history.ipynb) | This notebook goes over how to use Cloud SQL for PostgreSQL to store chat message history with the `PostgresChatMessageHistory` class. |
| [How to Choose a Nearest-Neighbor Index Guide](../docs/how_to_choose_an_index_guide.md) | This guide outlines different indexing strategies for approximate nearest neighbor (ANN) search. |
| [Index Tuning Sample](./index_tuning_sample) | This guide demonstrates how to fine-tune your LangChain PostgreSQL index for better vector similarity search results. |
| [Langchain on VertexAI](./langchain_on_vertexai) | This guide explains how to build and deploy LangChain apps to a managed Reasoning Engine runtime using LangChain on Vertex AI. |
