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

Is the query-side term weighting intentional? #26

Open
RonanKMcGovern opened this issue Dec 10, 2024 · 0 comments
Open

Is the query-side term weighting intentional? #26

RonanKMcGovern opened this issue Dec 10, 2024 · 0 comments

Comments

@RonanKMcGovern
Copy link

For example running a query like:

WITH query_vector AS (
    SELECT bm25_query_to_svector(
        'documents_content_bm25',
        'Paris capital france',
        'pgvector'
    )::sparsevec AS qv
)
SELECT qv FROM query_vector;

yields:

                     qv                      
---------------------------------------------
 {4:0.26759678,8:0.4648064,13:0.26759678}/17

This suggests there is some weighting of the three tokens in that query.

My understanding is that bm25 typically has no term weighting, but perhaps I'm misunderstanding the implementation (or what is considered standard for bm25).

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