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

fix(context): ensure minimum number of search results #815

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

deathbeam
Copy link
Collaborator

Adds MIN_RESULTS constant to guarantee at least 3 results are returned when searching for related code context, even if they don't meet the similarity threshold. This improves the quality of contextual responses by preventing cases where too few results would be returned.

Also adds score normalization for symbol-based search and debug logging for generated messages.

Adds MIN_RESULTS constant to guarantee at least 3 results are returned when
searching for related code context, even if they don't meet the similarity
threshold. This improves the quality of contextual responses by preventing
cases where too few results would be returned.

Also adds score normalization for symbol-based search and debug logging for
generated messages.
@deathbeam deathbeam added bug Something isn't working enhancement New feature or request labels Feb 19, 2025
@deathbeam deathbeam merged commit 5014b41 into CopilotC-Nvim:main Feb 19, 2025
2 checks passed
@deathbeam deathbeam deleted the score-min branch February 19, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant