Skip to main content
This example demonstrates traditional RAG implementation using PgVector database with OpenAI embeddings, where knowledge context is automatically added to prompts without search functionality.

Code

traditional_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