examples/azure_blob_embedding/README.md
This example indexes Markdown files from an Azure Blob Storage container into Postgres with pgvector.
It is the same basic flow as the local text embedding example:
sentence-transformers/all-MiniLM-L6-v2.DefaultAzureCredential source.Storage Blob Data Reader is enough.az login
az account set --subscription "<subscription-name-or-id>"
Upload a few .md files to your container. If you only want to index a folder inside the container, set AZURE_BLOB_PREFIX.
Start Postgres:
docker compose -f ../../dev/postgres.yaml up -d
Configure the example:
cp .env.example .env
Edit .env:
AZURE_STORAGE_ACCOUNT=myaccount
AZURE_STORAGE_CONTAINER=docs
AZURE_BLOB_PREFIX=
Install dependencies:
pip install -e .
Build the index:
cocoindex update main
Query the index:
python main.py "what is in these docs?"
Re-run cocoindex update main to pick up changed, added, or deleted blobs.