Skip to main content
This example demonstrates how to implement Agentic RAG using PgVector (PostgreSQL with vector extensions) for storing and searching embeddings with hybrid search capabilities.

Code

agentic_rag_pgvector.py

Usage

1

Set up your virtual environment

2

Install dependencies

3

Setup PgVector

Start PostgreSQL with pgvector extension and update the connection string in the code as needed.
4

Export your OpenAI API key

5

Run Agent