How to store and retrive 2 diffreent domain infomration from database?

how to store and retrieve 2 different domain information from the database using langchain?

Let’s say we have 2 domains Sales and HR, we store docs in different domains as a knowledge base in Weaviate.

We don’t want to mix user search query results in one , if the query belongs to one domain only the result of that domain should return using long-chain or weaviate.

Also some cases search results should be retrieved depending on user role this is next requrimrenet

Hi @vaibhav_patil ! Welcome to our community :hugs:

You can both have a separate class for each “domain” or you can filter it out using metadata.

So when you ingest your documents, you can pass the desired metadata, such as the domain, and later on, query those documents considering those metadata.

Let me know if that helps.

THanks!