Skip to main content
Each user gets a private view of one shared knowledge base. Pinecone stores the owner in each vector’s metadata; documents uploaded without a user_id leave the field out and are shared with everyone.
pinecone_db.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your API keys

4

Run the example

Save the code above as pinecone_db.py, then run:
Full source: cookbook/07_knowledge/04_advanced/07_per_user_isolation/pinecone_db.py