Skip to main content
This example implements Agentic RAG using PgVector (PostgreSQL with vector extensions) to store and search embeddings with hybrid search.

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