Skip to content

langchain.vectorstores.redis.base:score_threshold is deprecated #10

@antonum

Description

@antonum

Langchain-based notebooks display the following warning:

WARNING:langchain.vectorstores.redis.base:score_threshold is deprecated. Use distance_threshold instead.score_threshold should only be used in similarity_search_with_relevance_scores.score_threshold will be removed in a future release.

The following change would remove the warning:

# retriever=redis.as_retriever()
retriever=redis.as_retriever(search_type="similarity_distance_threshold",search_kwargs={"distance_threshold":0.5}),

Open questions:

  • What are the reasonable defaults for distance_threshold?
  • Any other defaults such as "k":5 worth adding?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions