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

k param when creating sbert retriever not taken into account #18

Open
fpservant opened this issue Sep 7, 2023 · 1 comment
Open

k param when creating sbert retriever not taken into account #18

fpservant opened this issue Sep 7, 2023 · 1 comment

Comments

@fpservant
Copy link
Collaborator

Create a retriever based on a sentence bert, passing a value, eg. 10, to k param.
It is not taken into account when calling the retriever (more values are returned)

    retriever = retrieve.Encoder(
        key='id',
        on=['content'],
        encoder=SentenceTransformer('sentence-transformers/all-MiniLM-L12-v2').encode,
        k = 10
    )
    retriever(documents=docs)

len(retriever(queries)[0]) > 10

@fpservant
Copy link
Collaborator Author

Hum, seems to be same kind of problem as fe08cc8

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