Storing Structured Data in Milvus #24576
Replies: 1 comment 6 replies
-
Hi gem, On the other side, if you have relatively long document and many fields, store in traditional database, especially mongo db is highly recommended. |
Beta Was this translation helpful? Give feedback.
-
I plan to use Milvus as my vector database to store chat interaction between the user and my LLM so that I can give my LLM a "long-term memory". The thing is, I want to store some metadata (timestamp, username, original message before embedding, etc) along the chat message.
Here are the two options I thought of so far:
Option 1 - Use Milvus along with a structured Database
Use Milvus and another traditional structured database (like Postgresql) simultaneously. Store the chat message embedding (vectors) in Milvus with an "entity ID" to uniquely identify the chat message, and store all the metadata (timestamp, username, etc) in the structured database.
CONS: It's slower and less efficient because the app has to sequentially first query the
search
at Milvus and thenselect
by ID in the structured database.Option 2 - Only use Milvus
Only use Milvus and to store all the data, including metadata such as the message timestamp, username, original message, etc. Store all these information into
fields
.CONS: Milvus is not designed to store structured data (to my knowledge) and the
field
are not intended for just storing data in a structured manner (I think). Furthermore, I believe I cannot easily query by an attribute like timestamp.Are any of my statements wrong/incorrect? What option should I go with and why? Or perhaps am I missing a 3rd option?
Beta Was this translation helpful? Give feedback.
All reactions