You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for i, item in enumerate(list(input_path.iterdir())): can return the files in all sorts of ordering styles. I'm not even sure what it is on my local, but it isn't lexical. What ordering are you expecting?
As a result, we don't know what order to pass in the doc_ids and metadata. Let's either come up with predictable ordering or map filenames to ids/metadata so it isn't left to mismapping 0...N indices.
I have some bandwidth, so once we have a direction, I can implement it if you'd like.
The text was updated successfully, but these errors were encountered:
dimroc
changed the title
Ordering of input files nondeterministic, which can assign incorrect of doc id, metadata
Ordering of input files nondeterministic, which can assign incorrect doc id, metadata
Sep 5, 2024
This has actually been on my to-do in some form, and the way I've been thinking about handling this is:
Allow doc ids to be strings (requiring a mapping update, but that's fine) for extra flexibility
If passing a folder, require the user passed doc ids and metadata to be a dictionary, in the format {filename: XXX}.
Should the user not pass doc_ids, the document IDs would just default to the file names.
I'm not sure I'll have the bandwidth to do it today (I'd love to though), so if you're interested in taking this on and think you can do it quickly, you're more than welcome!
In the meantime, I'm releasing 0.0.2, which among other minor updates, makes index(), add_to_index() and the newly added get_doc_ids_to_file_names() return a dict mapping {doc_id: filename}, so it's easy to pass the right context to your LLM, though it doesn't fix the metadata issue.
for i, item in enumerate(list(input_path.iterdir())):
can return the files in all sorts of ordering styles. I'm not even sure what it is on my local, but it isn't lexical. What ordering are you expecting?As a result, we don't know what order to pass in the doc_ids and metadata. Let's either come up with predictable ordering or map filenames to ids/metadata so it isn't left to mismapping 0...N indices.
I have some bandwidth, so once we have a direction, I can implement it if you'd like.
Snippet:
byaldi/byaldi/colpali.py
Lines 278 to 289 in 427a859
The text was updated successfully, but these errors were encountered: