Shashank Agarwal
Shashank Agarwal

Reputation: 33

How to seperate data for multiple chatbots in pinecone vector database service?

I am building a platform where users can upload their custom data, and build a chatbot.

I am thinking of using lanchain + open ai embeddings + chat gpt api + pinecone to manage this service.

I was checking out pinecone documentation at https://docs.pinecone.io/docs/gen-qa-openai but I am unable to figure out how I will organise my database for different chatbots, that are meant for different data sets.

Will every single chatbot have a different index? Can multiple indexes be stored on a single pod? Or will each index be stored on a seperate pod?

Upvotes: 1

Views: 990

Answers (1)

Richard D
Richard D

Reputation: 1

namespaces will do the trick! Pinecone allows you to partition vectors in an index into namespaces. See the documentation in the link below.

https://docs.pinecone.io/docs/namespaces

Basically in Python;

index.upsert(vectors=[('id-1', [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1])],namespace='my-first-namespace')

index.query(vector=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1],top_k=1,namespace='my-first-namespace')

Upvotes: 0

Related Questions