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

e2e: add ranking tests for atom boosting #715

Merged
merged 2 commits into from
Jan 12, 2024
Merged

Conversation

keegancsmith
Copy link
Member

@keegancsmith keegancsmith commented Jan 11, 2024

This adds two cases which are exact phrases to search for.

"assets are not configured for this binary" finds the correct document, but it isn't shown in the summary. Our target rank doesn't capture that this could be better, but I will use the golden file to see if I improve this.

"sourcegraph/server docker image build" is an example of an exact phrase which also happens to contain words of highly ranked symbols. This leads to the exact phrase getting buried. I want to see if I can boost that.

"bufio flush writer" should find the symbol bufioFlushWriter.

"coverage data writer" should find the symbol CoverageDataWriter.

Test Plan: go test

This adds two cases which are exact phrases to search for.

"assets are not configured for this binary" finds the correct document,
but it isn't shown in the summary. Our target rank doesn't capture that
this could be better, but I will use the golden file to see if I improve
this.

"sourcegraph/server docker image build" is an example of an exact phrase
which also happens to contain words of highly ranked symbols. This leads
to the exact phrase getting buried. I want to see if I can boost that.

Test Plan: go test
@keegancsmith
Copy link
Member Author

I feel like there are many more examples which weren't just about exact phrases, but had more to do with tie breaking. Do you remember what those examples were? I wanna get a set of decent examples to help guide the work, but what those were in my brain have ended up the same place as all my christmas wrapping.

@stefanhengl
Copy link
Member

stefanhengl commented Jan 11, 2024

Any query that contains terms that are highly ranked individually should do.

Example:
r:golang/go bufio flush writer

There is a bufioFlushWriter but we don't find it. I believe if we added the atom scores it should surface. If we accounted for term proximity even more.

Example:
r:golang/go coverage data writer

This is very similar but even more extreme. The top match right now has "coverage" and "data" just in comments. The best match is not on the first page (symbol CoverageDataWriter)

@keegancsmith
Copy link
Member Author

@stefanhengl thanks those are some good test cases that we do poorly at. Added them.

@keegancsmith keegancsmith merged commit b35d8a2 into main Jan 12, 2024
8 checks passed
@keegancsmith keegancsmith deleted the k/atom-boost-tests branch January 12, 2024 13:01
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

Successfully merging this pull request may close these issues.

2 participants