Return type
List[Document]
semantic_hybrid_search_with_score(query: str, k: int = 4, filters: Optional[str] = None) → List[Tuple[langchain.schema.Document, float]][source]#
Return docs most similar to query with an hybrid query.
Parameters
query – Text to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
Returns
List of Documents most similar to the query and score for each
similarity_search(query: str, k: int = 4, **kwargs: Any) → List[langchain.schema.Document][source]#
Return docs most similar to query.
vector_search(query: str, k: int = 4, **kwargs: Any) → List[langchain.schema.Document][source]#
Returns the most similar indexed documents to the query text.
Parameters
query (str) – The query text for which to find similar documents.
k (int) – The number of documents to return. Default is 4.
Returns
A list of documents that are most similar to the query text.
Return type
List[Document]
vector_search_with_score(query: str, k: int = 4, filters: Optional[str] = None) → List[Tuple[langchain.schema.Document, float]][source]#
Return docs most similar to query.
Parameters
query – Text to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
Returns
List of Documents most similar to the query and score for each
rtdocs_stable/api.python.langchain.com/en/stable/reference/modules/vectorstores.html