spring-projects / spring-projects/spring-ai

Similarity search threshold can be a float instead of a double

Open
#1,996 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

public Builder similarityThreshold(double threshold)

results in having to pass in a d to the method that is inconvenient. There isn't a need for such fine grained values of the threshold.

SearchRequest.builder().similarityThreshold(0.99d).topK(6).build()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the SearchRequest.builder().similarityThreshold(double threshold) entry point shown in the issue and inspect its callers and related tests. Change the threshold parameter to the requested numeric type, update affected usages, and run the relevant project tests to confirm the builder still constructs requests correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai, search
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.