examples/online_store/pgvector_tutorial/README.md
This tutorial demonstrates how to use PostgreSQL with the pgvector extension as a vector database backend for Feast. You'll learn how to set up pgvector, create embeddings, store them in Feast, and perform similarity searches.
pip install 'feast[postgres]')docker run -d \
--name postgres-pgvector \
-e POSTGRES_USER=feast \
-e POSTGRES_PASSWORD=feast \
-e POSTGRES_DB=feast \
-p 5432:5432 \
pgvector/pgvector:pg16
docker exec -it postgres-pgvector psql -U feast -c "CREATE EXTENSION IF NOT EXISTS vector;"
pgvector_tutorial/
├── README.md
├── feature_store.yaml # Feast configuration
├── data/ # Data directory
│ └── sample_data.parquet # Sample data with embeddings
└── pgvector_example.py # Example script
Follow the instructions in pgvector_example.py to run the complete example.
This tutorial demonstrates:
The pgvector extension enables PostgreSQL to store and query vector embeddings efficiently, making it suitable for similarity search applications like semantic search and recommendation systems.