Some questions about a parameter"search_type="similarity_score_threshold"" #19227
Replies: 1 comment 2 replies
-
Hey @WuYanZhao107, great to see you back here! Hope you're ready to dive into another fun puzzle with LangChain. 🚀 Based on the context provided, the You can find this information in the DEFAULT_DISTANCE_STRATEGY = "cosine" # or "l2", "inner_product"
class TiDBVectorStore(VectorStore):
def __init__(
self,
...
distance_strategy: str = DEFAULT_DISTANCE_STRATEGY,
...
) -> None:
... This setup allows users to choose the most appropriate similarity calculation method for their specific use case by setting the The output = docsearch.similarity_search_by_vector(query_vec, k=2, score_threshold=0.2) output = await docsearch.asimilarity_search_by_vector(
query_vec, k=2, score_threshold=0.2
) In both synchronous and asynchronous versions of the method, the Regarding your question about where to check this method, you can find the implementation of the I hope this information helps! If you have any other questions, feel free to ask. Sources
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
upsearch_kwargs={"score_threshold": 0.4}
System Info
python 3.11.7
langchain 0.1.11
faiss-cpu 1.8.0
windows
Beta Was this translation helpful? Give feedback.
All reactions