Skip to content

Commit

Permalink
Merge pull request #116 from bettersg/fix-reduce-number-of-results
Browse files Browse the repository at this point in the history
Reduce number of search results to top_k * 3
  • Loading branch information
yevkim authored Dec 22, 2024
2 parents b4e968f + c75e122 commit bddbb68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,5 @@ yarn-error.log*
#dataset_workflow
node_modules/
creds.json
frontend/env.development
frontend/env.staging
1 change: 1 addition & 0 deletions backend/functions/ml_logic/searchModelManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ def combine_and_aggregate_results(

# Sort by similarity in descending order
sorted_results = aggregated_results.sort_values(by="Similarity", ascending=False).reset_index(drop=True)
sorted_results = sorted_results.head(top_k * 3).reset_index(drop=True)

return sorted_results

Expand Down

0 comments on commit bddbb68

Please sign in to comment.