Replies: 3 comments
-
You can prepend or append it to the index data. https://github.com/facebookresearch/faiss/blob/main/faiss/index_io.h#L39 |
Beta Was this translation helpful? Give feedback.
-
Thanks. Could you explain more about how I can prepend or append the metadata to the index data, i.e., using what method? The mentioned line of the code (https://github.com/facebookresearch/faiss/blob/main/faiss/index_io.h#L39) seems to explain that the write_index method takes two arguments, one the index object and the other file name. I don't quite get how that relates to my question, as I am not a C programmer. Could you explain further if I have misunderstood it? Thanks |
Beta Was this translation helpful? Give feedback.
-
LangChain's integration keeps the metadata in a separate structure that maps to the index items. Instead of trying to write the metadata inside the FAISS index file, you can store it in a separate file/database and maintain the relationship between the two using identifiers. |
Beta Was this translation helpful? Give feedback.
-
Summary
Hi,
I am trying to write metadata, e.g., the date, the user, the faiss version, and other dependencies into index files. Is there a way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions