Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focusing retrieval on list of document ids with doc_ids parameter doesn't work #323

Open
MartinV279 opened this issue Mar 7, 2024 · 0 comments

Comments

@MartinV279
Copy link

I have been trying to use something similar to metadata filtering with Colbert, and from the function description of
RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0").search()
I've seen that we can focus the retrieval search on a list of documents stated in docs_id.

The code I am using is the following (for testing purposes):

RAG = RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0")
index_path = RAG.index(index_name=index_name, collection=collection, document_ids = document_id)

p = RAG.encode(document_id[:20])
out_list = RAG.search("How do I change a password?", doc_ids = p)

However, I still get documents in the results (out_list) that are not in the list provided in variable p.
Is there another way of doing this correctly, or is the feature not fully implemented yet? I haven't been able to find some examples or better documentation on this.
Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant