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

Filter out noisy chunks #1163

Merged
merged 2 commits into from
Dec 8, 2023
Merged

Filter out noisy chunks #1163

merged 2 commits into from
Dec 8, 2023

Conversation

ggordonhall
Copy link
Contributor

Semantic search results can be impeded by low-quality code chunks. These come in many forms, but one common case is where they consist of a sequence of floats (e.g. from an embedded SVG).

This PR introduces a first attempt to filter these out, by skipping chunks where numeric and punctuation chars make up more than 50% of the total number of non-whitespace chars.

Closes BLO-1822

server/bleep/src/semantic/chunk.rs Outdated Show resolved Hide resolved
@ggordonhall ggordonhall merged commit 6a31b80 into main Dec 8, 2023
1 check passed
@ggordonhall ggordonhall deleted the gabriel/filter-noisy-chunks branch December 8, 2023 16:09
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.

None yet

2 participants