id
stringlengths
14
15
text
stringlengths
13
2.7k
source
stringlengths
60
181
3ec1fb53491e-4
Returns SurrealDBStore object initialized and ready for use. async amax_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶ Return docs selected using the maximal marginal relevance. async amax_marginal_relevance_search_by_vector(embedding: Lis...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.surrealdb.SurrealDBStore.html
3ec1fb53491e-5
) # Fetch more documents for the MMR algorithm to consider # But only return the top 5 docsearch.as_retriever( search_type="mmr", search_kwargs={'k': 5, 'fetch_k': 50} ) # Only retrieve documents that have a relevance score # Above a certain threshold docsearch.as_retriever( search_type="similarity_score_th...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.surrealdb.SurrealDBStore.html
3ec1fb53491e-6
Returns List of Documents most similar to the query async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]][source]¶ Run similarity search asynchronously and return relevance scores Parameters query (str) – Query k (int) – Number of results to return. Default...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.surrealdb.SurrealDBStore.html
3ec1fb53491e-7
ns (str) – surrealdb namespace for the vector store. (default: “langchain”) db (str) – surrealdb database for the vector store. (default: “database”) collection (str) – surrealdb collection for the vector store. (default: “documents”) db_pass ((optional) db_user and) – surrealdb credentials Returns SurrealDBStore objec...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.surrealdb.SurrealDBStore.html
3ec1fb53491e-8
k – Number of Documents to return. Defaults to 4. fetch_k – Number of Documents to fetch to pass to MMR algorithm. lambda_mult – Number between 0 and 1 that determines the degree of diversity among the results with 0 corresponding to maximum diversity and 1 to minimum diversity. Defaults to 0.5. Returns List of Documen...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.surrealdb.SurrealDBStore.html
3ec1fb53491e-9
Run similarity search synchronously and return distance scores Parameters query (str) – Query k (int) – Number of results to return. Defaults to 4. Returns List of Documents most similar along with relevance distance scores
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.surrealdb.SurrealDBStore.html
6bc58097cf8d-0
langchain_community.vectorstores.semadb.SemaDB¶ class langchain_community.vectorstores.semadb.SemaDB(collection_name: str, vector_size: int, embedding: Embeddings, distance_strategy: DistanceStrategy = DistanceStrategy.EUCLIDEAN_DISTANCE, api_key: str = '')[source]¶ SemaDB vector store. This vector store is a wrapper a...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
6bc58097cf8d-1
Return docs selected using the maximal marginal relevance. as_retriever(**kwargs) Return VectorStoreRetriever initialized from this VectorStore. asearch(query, search_type, **kwargs) Return docs most similar to query using specified search type. asimilarity_search(query[, k]) Return docs most similar to query. asimilar...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
6bc58097cf8d-2
similarity_search_with_score(query[, k]) Run similarity search with distance. __init__(collection_name: str, vector_size: int, embedding: Embeddings, distance_strategy: DistanceStrategy = DistanceStrategy.EUCLIDEAN_DISTANCE, api_key: str = '')[source]¶ Initialise the SemaDB vector store. async aadd_documents(documents:...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
6bc58097cf8d-3
False otherwise, None if not implemented. Return type Optional[bool] async classmethod afrom_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶ Return VectorStore initialized from documents and embeddings. async classmethod afrom_texts(texts: List[str], embedding: Embeddings, metadatas: O...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
6bc58097cf8d-4
lambda_mult: Diversity of results returned by MMR; 1 for minimum diversity and 0 for maximum. (Default: 0.5) filter: Filter by document metadata Returns Retriever class for VectorStore. Return type VectorStoreRetriever Examples: # Retrieve more documents with higher diversity # Useful if your dataset has many similar d...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
6bc58097cf8d-5
Return docs most similar to embedding vector. async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶ Return docs and relevance scores in the range [0, 1], asynchronously. 0 is dissimilar, 1 is most similar. Parameters query – input text k – Number of Docume...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
6bc58097cf8d-6
Return VectorStore initialized from documents and embeddings. classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, collection_name: str = '', vector_size: int = 0, api_key: str = '', distance_strategy: DistanceStrategy = DistanceStrategy.EUCLIDEAN_DISTANCE, **kwargs: A...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
6bc58097cf8d-7
fetch_k – Number of Documents to fetch to pass to MMR algorithm. lambda_mult – Number between 0 and 1 that determines the degree of diversity among the results with 0 corresponding to maximum diversity and 1 to minimum diversity. Defaults to 0.5. Returns List of Documents selected by maximal marginal relevance. search(...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
6bc58097cf8d-8
Run similarity search with distance.
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.semadb.SemaDB.html
3234a578d22d-0
langchain_community.vectorstores.pgembedding.EmbeddingStore¶ class langchain_community.vectorstores.pgembedding.EmbeddingStore(**kwargs)[source]¶ Embedding store. A simple constructor that allows initialization from kwargs. Sets attributes on the constructed instance using the names and values in kwargs. Only keys that...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.pgembedding.EmbeddingStore.html
dba6d75995be-0
langchain_community.vectorstores.tigris.Tigris¶ class langchain_community.vectorstores.tigris.Tigris(client: TigrisClient, embeddings: Embeddings, index_name: str)[source]¶ Tigris vector store. Initialize Tigris vector store. Attributes embeddings Access the query embedding object if available. search_index Methods __i...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tigris.Tigris.html
dba6d75995be-1
asimilarity_search_by_vector(embedding[, k]) Return docs most similar to embedding vector. asimilarity_search_with_relevance_scores(query) Return docs and relevance scores in the range [0, 1], asynchronously. asimilarity_search_with_score(*args, **kwargs) Run similarity search with distance asynchronously. delete([ids]...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tigris.Tigris.html
dba6d75995be-2
Returns List of IDs of the added texts. Return type List[str] async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str]¶ Run more texts through the embeddings and add to the vectorstore. add_documents(documents: List[Document], **kwargs: Any) → List[str]¶ Run more documen...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tigris.Tigris.html
dba6d75995be-3
Return VectorStore initialized from documents and embeddings. async classmethod afrom_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, **kwargs: Any) → VST¶ Return VectorStore initialized from texts and embeddings. async amax_marginal_relevance_search(query: str, k: int = 4, fetch_...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tigris.Tigris.html
dba6d75995be-4
Return type VectorStoreRetriever Examples: # Retrieve more documents with higher diversity # Useful if your dataset has many similar documents docsearch.as_retriever( search_type="mmr", search_kwargs={'k': 6, 'lambda_mult': 0.25} ) # Fetch more documents for the MMR algorithm to consider # But only return the t...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tigris.Tigris.html
dba6d75995be-5
Return docs and relevance scores in the range [0, 1], asynchronously. 0 is dissimilar, 1 is most similar. Parameters query – input text k – Number of Documents to return. Defaults to 4. **kwargs – kwargs to be passed to similarity search. Should include: score_threshold: Optional, a floating point value between 0 to 1 ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tigris.Tigris.html
dba6d75995be-6
Return docs selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. Parameters query – Text to look up documents similar to. k – Number of Documents to return. Defaults to 4. fetch_k – Number of Documents to fetch to pass to MMR...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tigris.Tigris.html
dba6d75995be-7
Return docs most similar to query. similarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶ Return docs most similar to embedding vector. Parameters embedding – Embedding to look up documents similar to. k – Number of Documents to return. Defaults to 4. Returns List of Documents ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tigris.Tigris.html
8e428e7e17b4-0
langchain_community.vectorstores.faiss.FAISS¶ class langchain_community.vectorstores.faiss.FAISS(embedding_function: Union[Callable[[str], List[float]], Embeddings], index: Any, docstore: Docstore, index_to_docstore_id: Dict[int, str], relevance_score_fn: Optional[Callable[[float], float]] = None, normalize_L2: bool = ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-1
afrom_documents(documents, embedding, **kwargs) Return VectorStore initialized from documents and embeddings. afrom_embeddings(text_embeddings, embedding) Construct FAISS wrapper from raw documents asynchronously. afrom_texts(texts, embedding[, metadatas, ids]) Construct FAISS wrapper from raw documents asynchronously....
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-2
from_embeddings(text_embeddings, embedding) Construct FAISS wrapper from raw documents. from_texts(texts, embedding[, metadatas, ids]) Construct FAISS wrapper from raw documents. load_local(folder_path, embeddings[, index_name]) Load FAISS index, docstore, and index_to_docstore_id from disk. max_marginal_relevance_sear...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-3
similarity_search_with_score_by_vector(embedding) Return docs most similar to query. __init__(embedding_function: Union[Callable[[str], List[float]], Embeddings], index: Any, docstore: Docstore, index_to_docstore_id: Dict[int, str], relevance_score_fn: Optional[Callable[[float], float]] = None, normalize_L2: bool = Fal...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-4
Returns List of IDs of the added texts. Return type List[str] add_embeddings(text_embeddings: Iterable[Tuple[str, List[float]]], metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, **kwargs: Any) → List[str][source]¶ Add the given texts and embeddings to the vectorstore. Parameters text_embeddings ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-5
Return VectorStore initialized from documents and embeddings. async classmethod afrom_embeddings(text_embeddings: Iterable[Tuple[str, List[float]]], embedding: Embeddings, metadatas: Optional[Iterable[dict]] = None, ids: Optional[List[str]] = None, **kwargs: Any) → FAISS[source]¶ Construct FAISS wrapper from raw docume...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-6
of diversity among the results with 0 corresponding to maximum diversity and 1 to minimum diversity. Defaults to 0.5. Returns List of Documents selected by maximal marginal relevance. async amax_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, filter: ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-7
fetch_k – Number of Documents to fetch before filtering to pass to MMR algorithm. lambda_mult – Number between 0 and 1 that determines the degree of diversity among the results with 0 corresponding to maximum diversity and 1 to minimum diversity. Defaults to 0.5. Returns List of Documents and similarity scores selected...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-8
search_kwargs={'k': 5, 'fetch_k': 50} ) # Only retrieve documents that have a relevance score # Above a certain threshold docsearch.as_retriever( search_type="similarity_score_threshold", search_kwargs={'score_threshold': 0.8} ) # Only get the single most similar document from the dataset docsearch.as_retriever...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-9
Parameters embedding – Embedding to look up documents similar to. k – Number of Documents to return. Defaults to 4. filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None. fetch_k – (Optional[int]) Number of Documents to fetch before filtering. Defaults to 20. Returns List of Documents most similar to...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-10
L2 distance in float. Lower score represents more similarity. async asimilarity_search_with_score_by_vector(embedding: List[float], k: int = 4, filter: Optional[Dict[str, Any]] = None, fetch_k: int = 20, **kwargs: Any) → List[Tuple[Document, float]][source]¶ Return docs most similar to query asynchronously. Parameters ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-11
Return VectorStore initialized from documents and embeddings. classmethod from_embeddings(text_embeddings: Iterable[Tuple[str, List[float]]], embedding: Embeddings, metadatas: Optional[Iterable[dict]] = None, ids: Optional[List[str]] = None, **kwargs: Any) → FAISS[source]¶ Construct FAISS wrapper from raw documents. Th...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-12
Parameters folder_path – folder path to load index, docstore, and index_to_docstore_id from. embeddings – Embeddings to use when generating queries index_name – for saving with a specific index file name asynchronous – whether to use async version or not max_marginal_relevance_search(query: str, k: int = 4, fetch_k: in...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-13
fetch_k – Number of Documents to fetch before filtering to pass to MMR algorithm. lambda_mult – Number between 0 and 1 that determines the degree of diversity among the results with 0 corresponding to maximum diversity and 1 to minimum diversity. Defaults to 0.5. Returns List of Documents selected by maximal marginal r...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-14
Parameters folder_path – folder path to save index, docstore, and index_to_docstore_id to. index_name – for saving with a specific index file name search(query: str, search_type: str, **kwargs: Any) → List[Document]¶ Return docs most similar to query using specified search type. serialize_to_bytes() → bytes[source]¶ Se...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-15
Defaults to 20. Returns List of Documents most similar to the embedding. similarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶ Return docs and relevance scores in the range [0, 1]. 0 is dissimilar, 1 is most similar. Parameters query – input text k – Number of Do...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
8e428e7e17b4-16
Parameters embedding – Embedding vector to look up documents similar to. k – Number of Documents to return. Defaults to 4. filter (Optional[Dict[str, Any]]) – Filter by metadata. Defaults to None. fetch_k – (Optional[int]) Number of Documents to fetch before filtering. Defaults to 20. **kwargs – kwargs to be passed to ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.faiss.FAISS.html
51edd30b3316-0
langchain_community.vectorstores.redis.filters.RedisFilterExpression¶ class langchain_community.vectorstores.redis.filters.RedisFilterExpression(_filter: Optional[str] = None, operator: Optional[RedisFilterOperator] = None, left: Optional[RedisFilterExpression] = None, right: Optional[RedisFilterExpression] = None)[sou...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.redis.filters.RedisFilterExpression.html
8ee75b498129-0
langchain_community.vectorstores.utils.maximal_marginal_relevance¶ langchain_community.vectorstores.utils.maximal_marginal_relevance(query_embedding: ndarray, embedding_list: list, lambda_mult: float = 0.5, k: int = 4) → List[int][source]¶ Calculate maximal marginal relevance.
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.utils.maximal_marginal_relevance.html
eb704b603d17-0
langchain_community.vectorstores.starrocks.debug_output¶ langchain_community.vectorstores.starrocks.debug_output(s: Any) → None[source]¶ Print a debug message if DEBUG is True. :param s: The message to print
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.starrocks.debug_output.html
f643042fb8a2-0
langchain_community.vectorstores.hippo.Hippo¶ class langchain_community.vectorstores.hippo.Hippo(embedding_function: Embeddings, table_name: str = 'test', database_name: str = 'default', number_of_shards: int = 1, number_of_replicas: int = 1, connection_args: Optional[Dict[str, Any]] = None, index_params: Optional[dict...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-1
The connection args used for this class comes in the form of a dict, here are a few of the options: host (str): The host of Hippo instance. Default at “localhost”. port (str/int): The port of Hippo instance. Default at 7788. user (str): Use which user to connect to Hippo instance. If user and password are provided, we ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-2
afrom_texts(texts, embedding[, metadatas]) Return VectorStore initialized from texts and embeddings. amax_marginal_relevance_search(query[, k, ...]) Return docs selected using the maximal marginal relevance. amax_marginal_relevance_search_by_vector(...) Return docs selected using the maximal marginal relevance. as_retr...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-3
Return docs most similar to embedding vector. similarity_search_with_relevance_scores(query) Return docs and relevance scores in the range [0, 1]. similarity_search_with_score(query[, k, ...]) Performs a search on the query string and returns results with scores. similarity_search_with_score_by_vector(embedding) Perfor...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-4
Returns List of IDs of the added texts. Return type List[str] add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, timeout: Optional[int] = None, batch_size: int = 1000, **kwargs: Any) → List[str][source]¶ Add text to the collection. Parameters texts – An iterable that contains the text to be added. ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-5
Return VectorStore initialized from texts and embeddings. async amax_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶ Return docs selected using the maximal marginal relevance. async amax_marginal_relevance_search_by_vector(embedding: List[f...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-6
) # Fetch more documents for the MMR algorithm to consider # But only return the top 5 docsearch.as_retriever( search_type="mmr", search_kwargs={'k': 5, 'fetch_k': 50} ) # Only retrieve documents that have a relevance score # Above a certain threshold docsearch.as_retriever( search_type="similarity_score_th...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-7
**kwargs – kwargs to be passed to similarity search. Should include: score_threshold: Optional, a floating point value between 0 to 1 to filter the resulting set of retrieved docs Returns List of Tuples of (doc, similarity_score) async asimilarity_search_with_score(*args: Any, **kwargs: Any) → List[Tuple[Document, floa...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-8
None. (List of metadata dictionaries for each text.Defaults to) – table_name (str) – Name of the table. Defaults to “test”. database_name (str) – Name of the database. Defaults to “default”. connection_args (dict[str, Any]) – Connection parameters. DEFAULT_HIPPO_CONNECTION. (Defaults to) – index_params (dict) – Index...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-9
Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. Parameters embedding – Embedding to look up documents similar to. k – Number of Documents to return. Defaults to 4. fetch_k – Number of Documents to fetch to pass to MMR algorithm. lambda_mult – Number between 0 and 1 t...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-10
Parameters embedding – Embedding to look up documents similar to. k – Number of Documents to return. Defaults to 4. Returns List of Documents most similar to the query vector. similarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶ Return docs and relevance scores ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
f643042fb8a2-11
Return type List[float], List[Tuple[Document, any, any]] similarity_search_with_score_by_vector(embedding: List[float], k: int = 4, param: Optional[dict] = None, expr: Optional[str] = None, timeout: Optional[int] = None, **kwargs: Any) → List[Tuple[Document, float]][source]¶ Performs a search on the query string and re...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.hippo.Hippo.html
1055566a49fe-0
langchain_community.vectorstores.tencentvectordb.TencentVectorDB¶ class langchain_community.vectorstores.tencentvectordb.TencentVectorDB(embedding: ~langchain_core.embeddings.Embeddings, connection_params: ~langchain_community.vectorstores.tencentvectordb.ConnectionParams, index_params: ~langchain_community.vectorstore...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1055566a49fe-1
Return docs selected using the maximal marginal relevance. amax_marginal_relevance_search_by_vector(...) Return docs selected using the maximal marginal relevance. as_retriever(**kwargs) Return VectorStoreRetriever initialized from this VectorStore. asearch(query, search_type, **kwargs) Return docs most similar to quer...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1055566a49fe-2
Return docs and relevance scores in the range [0, 1]. similarity_search_with_score(query[, k, ...]) Perform a search on a query string and return results with score. similarity_search_with_score_by_vector(embedding) Perform a search on a query string and return results with score. __init__(embedding: ~langchain_core.em...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1055566a49fe-3
Returns List of IDs of the added texts. Return type List[str] add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, timeout: Optional[int] = None, batch_size: int = 1000, **kwargs: Any) → List[str][source]¶ Insert text data into TencentVectorDB. async adelete(ids: Optional[List[str]] = None, **kwargs:...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1055566a49fe-4
Return VectorStoreRetriever initialized from this VectorStore. Parameters search_type (Optional[str]) – Defines the type of search that the Retriever should perform. Can be “similarity” (default), “mmr”, or “similarity_score_threshold”. search_kwargs (Optional[Dict]) – Keyword arguments to pass to the search function. ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1055566a49fe-5
docsearch.as_retriever( search_kwargs={'filter': {'paper_title':'GPT-4 Technical Report'}} ) async asearch(query: str, search_type: str, **kwargs: Any) → List[Document]¶ Return docs most similar to query using specified search type. async asimilarity_search(query: str, k: int = 4, **kwargs: Any) → List[Document]¶ R...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1055566a49fe-6
False otherwise, None if not implemented. Return type Optional[bool] classmethod from_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶ Return VectorStore initialized from documents and embeddings. classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[d...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1055566a49fe-7
Return docs most similar to query using specified search type. similarity_search(query: str, k: int = 4, param: Optional[dict] = None, expr: Optional[str] = None, timeout: Optional[int] = None, **kwargs: Any) → List[Document][source]¶ Perform a similarity search against the query string. similarity_search_by_vector(emb...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1055566a49fe-8
Perform a search on a query string and return results with score. similarity_search_with_score_by_vector(embedding: List[float], k: int = 4, param: Optional[dict] = None, expr: Optional[str] = None, timeout: Optional[int] = None, **kwargs: Any) → List[Tuple[Document, float]][source]¶ Perform a search on a query string ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.TencentVectorDB.html
1d9265749893-0
langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch¶ class langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch(index: VectorSearchIndex, *, embedding: Optional[Embeddings] = None, text_column: Optional[str] = None, columns: Optional[List[str]] = None)[source]¶ D...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-1
from langchain_community.embeddings.openai import OpenAIEmbeddings vs_client = VectorSearchClient() vs_index = vs_client.get_index( endpoint_name="vs_endpoint", index_name="ml.llm.index" ) vectorstore = DatabricksVectorSearch( index=vs_index, embedding=OpenAIEmbeddings(), text_column="document_content" ) If y...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-2
Run more documents through the embeddings and add to the vectorstore. add_texts(texts[, metadatas, ids]) Add texts to the index. adelete([ids]) Delete by vector ID or other criteria. afrom_documents(documents, embedding, **kwargs) Return VectorStore initialized from documents and embeddings. afrom_texts(texts, embeddin...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-3
search(query, search_type, **kwargs) Return docs most similar to query using specified search type. similarity_search(query[, k, filters]) Return docs most similar to query. similarity_search_by_vector(embedding[, k, ...]) Return docs most similar to embedding vector. similarity_search_by_vector_with_score(embedding) R...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-4
Returns List of IDs of the added texts. Return type List[str] add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, ids: Optional[List[Any]] = None, **kwargs: Any) → List[str][source]¶ Add texts to the index. Only support direct-access index. Parameters texts – List of texts to add. metadatas – List o...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-5
Return docs selected using the maximal marginal relevance. async amax_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶ Return docs selected using the maximal marginal relevance. as_retriever(**kwargs: Any) → VectorStore...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-6
search_kwargs={'k': 5, 'fetch_k': 50} ) # Only retrieve documents that have a relevance score # Above a certain threshold docsearch.as_retriever( search_type="similarity_score_threshold", search_kwargs={'score_threshold': 0.8} ) # Only get the single most similar document from the dataset docsearch.as_retriever...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-7
Returns List of Tuples of (doc, similarity_score) async asimilarity_search_with_score(*args: Any, **kwargs: Any) → List[Tuple[Document, float]]¶ Run similarity search with distance asynchronously. delete(ids: Optional[List[Any]] = None, **kwargs: Any) → Optional[bool][source]¶ Delete documents from the index. Only supp...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-8
Defaults to 0.5. Returns List of Documents selected by maximal marginal relevance. max_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶ Return docs selected using the maximal marginal relevance. Maximal marginal relevan...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-9
Parameters embedding – Embedding to look up documents similar to. k – Number of Documents to return. Defaults to 4. filters – Filters to apply to the query. Defaults to None. Returns List of Documents most similar to the embedding. similarity_search_by_vector_with_score(embedding: List[float], k: int = 4, filters: Opti...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
1d9265749893-10
k – Number of Documents to return. Defaults to 4. filters – Filters to apply to the query. Defaults to None. Returns List of Documents most similar to the embedding and score for each.
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch.html
b655991ed76d-0
langchain_community.vectorstores.tiledb.TileDB¶ class langchain_community.vectorstores.tiledb.TileDB(embedding: Embeddings, index_uri: str, metric: str, *, vector_index_uri: str = '', docs_array_uri: str = '', config: Optional[Mapping[str, Any]] = None, timestamp: Any = None, **kwargs: Any)[source]¶ Wrapper around Tile...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-1
Return docs selected using the maximal marginal relevance. as_retriever(**kwargs) Return VectorStoreRetriever initialized from this VectorStore. asearch(query, search_type, **kwargs) Return docs most similar to query using specified search type. asimilarity_search(query[, k]) Return docs most similar to query. asimilar...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-2
search(query, search_type, **kwargs) Return docs most similar to query using specified search type. similarity_search(query[, k, filter, fetch_k]) Return docs most similar to query. similarity_search_by_vector(embedding[, k, ...]) Return docs most similar to embedding vector. similarity_search_with_relevance_scores(que...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-3
Returns List of IDs of the added texts. Return type List[str] add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, timestamp: int = 0, **kwargs: Any) → List[str][source]¶ Run more texts through the embeddings and add to the vectorstore. Parameters texts – Iterable of ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-4
Return docs selected using the maximal marginal relevance. async amax_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶ Return docs selected using the maximal marginal relevance. as_retriever(**kwargs: Any) → VectorStore...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-5
search_kwargs={'k': 5, 'fetch_k': 50} ) # Only retrieve documents that have a relevance score # Above a certain threshold docsearch.as_retriever( search_type="similarity_score_threshold", search_kwargs={'score_threshold': 0.8} ) # Only get the single most similar document from the dataset docsearch.as_retriever...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-6
Returns List of Tuples of (doc, similarity_score) async asimilarity_search_with_score(*args: Any, **kwargs: Any) → List[Tuple[Document, float]]¶ Run similarity search with distance asynchronously. consolidate_updates(**kwargs: Any) → None[source]¶ classmethod create(index_uri: str, index_type: str, dimensions: int, vec...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-7
metadatas – List of metadata dictionaries to associate with documents. metric – Optional, Metric to use for indexing. Defaults to “euclidean”. index_type – Optional, Vector index type (“FLAT”, IVF_FLAT”) config – Optional, TileDB config index_timestamp – Optional, timestamp to write new texts with. Example from langcha...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-8
index = TileDB.from_texts(texts, embeddings) classmethod load(index_uri: str, embedding: Embeddings, *, metric: str = 'euclidean', config: Optional[Mapping[str, Any]] = None, timestamp: Any = None, **kwargs: Any) → TileDB[source]¶ Load a TileDB index from a URI. Parameters index_uri – The URI of the TileDB vector index...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-9
Return docs selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. Parameters embedding – Embedding to look up documents similar to. k – Number of Documents to return. Defaults to 4. fetch_k – Number of Documents to fetch befor...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-10
Returns List of Documents and similarity scores selected by maximal marginalrelevance and score for each. process_index_results(ids: List[int], scores: List[float], *, k: int = 4, filter: Optional[Dict[str, Any]] = None, score_threshold: float = 1.7976931348623157e+308) → List[Tuple[Document, float]][source]¶ Turns Til...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-11
Defaults to 20. Returns List of Documents most similar to the query. similarity_search_by_vector(embedding: List[float], k: int = 4, filter: Optional[Dict[str, Any]] = None, fetch_k: int = 20, **kwargs: Any) → List[Document][source]¶ Return docs most similar to embedding vector. Parameters embedding – Embedding to look...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
b655991ed76d-12
k – Number of Documents to return. Defaults to 4. filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None. fetch_k – (Optional[int]) Number of Documents to fetch before filtering. Defaults to 20. Returns List of documents most similar to the query text with Distance as float. Lower score represents mor...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.TileDB.html
1c4a01cceb9e-0
langchain_community.vectorstores.yellowbrick.Yellowbrick¶ class langchain_community.vectorstores.yellowbrick.Yellowbrick(embedding: Embeddings, connection_string: str, table: str)[source]¶ Wrapper around Yellowbrick as a vector database. .. rubric:: Example Initialize with yellowbrick client. :param embedding: Embeddin...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
1c4a01cceb9e-1
asimilarity_search(query[, k]) Return docs most similar to query. asimilarity_search_by_vector(embedding[, k]) Return docs most similar to embedding vector. asimilarity_search_with_relevance_scores(query) Return docs and relevance scores in the range [0, 1], asynchronously. asimilarity_search_with_score(*args, **kwargs...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
1c4a01cceb9e-2
Initialize with yellowbrick client. :param embedding: Embedding operator :param connection_string: Format ‘postgres://username:password@host:port/database’ :param table: Table used to store / retrieve embeddings from async aadd_documents(documents: List[Document], **kwargs: Any) → List[str]¶ Run more documents through ...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
1c4a01cceb9e-3
False otherwise, None if not implemented. Return type Optional[bool] async classmethod afrom_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶ Return VectorStore initialized from documents and embeddings. async classmethod afrom_texts(texts: List[str], embedding: Embeddings, metadatas: O...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
1c4a01cceb9e-4
lambda_mult: Diversity of results returned by MMR; 1 for minimum diversity and 0 for maximum. (Default: 0.5) filter: Filter by document metadata Returns Retriever class for VectorStore. Return type VectorStoreRetriever Examples: # Retrieve more documents with higher diversity # Useful if your dataset has many similar d...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
1c4a01cceb9e-5
Return docs most similar to embedding vector. async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶ Return docs and relevance scores in the range [0, 1], asynchronously. 0 is dissimilar, 1 is most similar. Parameters query – input text k – Number of Docume...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
1c4a01cceb9e-6
Return VectorStore initialized from documents and embeddings. classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, connection_string: str = '', table: str = 'langchain', **kwargs: Any) → Yellowbrick[source]¶ Add texts to the vectorstore index. :param texts: Iterable of...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
1c4a01cceb9e-7
Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. Parameters embedding – Embedding to look up documents similar to. k – Number of Documents to return. Defaults to 4. fetch_k – Number of Documents to fetch to pass to MMR algorithm. lambda_mult – Number between 0 and 1 t...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
1c4a01cceb9e-8
Return docs and relevance scores in the range [0, 1]. 0 is dissimilar, 1 is most similar. Parameters query – input text k – Number of Documents to return. Defaults to 4. **kwargs – kwargs to be passed to similarity search. Should include: score_threshold: Optional, a floating point value between 0 to 1 to filter the re...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.yellowbrick.Yellowbrick.html
edefbf8a0d8f-0
langchain_community.vectorstores.sqlitevss.SQLiteVSS¶ class langchain_community.vectorstores.sqlitevss.SQLiteVSS(table: str, connection: Optional[sqlite3.Connection], embedding: Embeddings, db_file: str = 'vss.db')[source]¶ Wrapper around SQLite with vss extension as a vector database. To use, you should have the sqlit...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.sqlitevss.SQLiteVSS.html
edefbf8a0d8f-1
Return docs most similar to query using specified search type. asimilarity_search(query[, k]) Return docs most similar to query. asimilarity_search_by_vector(embedding[, k]) Return docs most similar to embedding vector. asimilarity_search_with_relevance_scores(query) Return docs and relevance scores in the range [0, 1]...
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.sqlitevss.SQLiteVSS.html