id
stringlengths
14
15
text
stringlengths
35
2.51k
source
stringlengths
61
154
3e67be62930b-7
filter the resulting set of retrieved docs Returns List of Tuples of (doc, similarity_score)
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html
0cde69f1f1ac-0
langchain.vectorstores.elastic_vector_search.ElasticVectorSearch¶ class langchain.vectorstores.elastic_vector_search.ElasticVectorSearch(elasticsearch_url: str, index_name: str, embedding: Embeddings, *, ssl_verify: Optional[Dict[str, Any]] = None)[source]¶ Bases: VectorStore, ABC Wrapper around Elasticsearch as a vect...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html
0cde69f1f1ac-1
Example from langchain import ElasticVectorSearch from langchain.embeddings import OpenAIEmbeddings embedding = OpenAIEmbeddings() elastic_host = "cluster_id.region_id.gcp.cloud.es.io" elasticsearch_url = f"https://username:password@{elastic_host}:9243" elastic_vector_search = ElasticVectorSearch( elasticsearch_url...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html
0cde69f1f1ac-2
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) asearch(query, search_type, **kwargs) Return docs most similar to query using specified search type. asimilarity_search(query[, k]) R...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html
0cde69f1f1ac-3
Run more documents through the embeddings and add to the vectorstore. Parameters (List[Document] (documents) – Documents to add to the vectorstore. 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...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html
0cde69f1f1ac-4
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.vectorstores.elastic_vector_search.ElasticVectorSearch.html
0cde69f1f1ac-5
Delete by vector IDs. Parameters ids – List of ids to delete. 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[dict]] =...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html
0cde69f1f1ac-6
to maximum diversity and 1 to minimum diversity. 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 max...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html
0cde69f1f1ac-7
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 in the range [0, 1]. 0 is dissimilar, 1 is most similar. Parameter...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html
63ae3bb8772c-0
langchain.vectorstores.docarray.base.DocArrayIndex¶ class langchain.vectorstores.docarray.base.DocArrayIndex(doc_index: BaseDocIndex, embedding: Embeddings)[source]¶ Bases: VectorStore, ABC Initialize a vector store from DocArray’s DocIndex. Methods __init__(doc_index, embedding) Initialize a vector store from DocArray...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html
63ae3bb8772c-1
Delete by vector ID. from_documents(documents, embedding, **kwargs) Return VectorStore initialized from documents and embeddings. from_texts(texts, embedding[, metadatas]) Return VectorStore initialized from texts and embeddings. max_marginal_relevance_search(query[, k, ...]) Return docs selected using the maximal marg...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html
63ae3bb8772c-2
Returns List of IDs of the added texts. Return type List[str] add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str][source]¶ Run more texts through the embeddings and add to the vectorstore. Parameters texts – Iterable of strings to add to the vectorstore. metadatas – Option...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html
63ae3bb8772c-3
Return docs most similar to query using specified search type. async asimilarity_search(query: str, k: int = 4, **kwargs: Any) → List[Document]¶ Return docs most similar to query. async asimilarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶ Return docs most similar to embeddin...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html
63ae3bb8772c-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 Documents selected by maximal marginal relevance. max_mar...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html
63ae3bb8772c-5
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 most similar to the query vector. similarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Docume...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html
3be938d05c07-0
langchain.vectorstores.tigris.Tigris¶ class langchain.vectorstores.tigris.Tigris(client: TigrisClient, embeddings: Embeddings, index_name: str)[source]¶ Bases: VectorStore Initialize Tigris vector store Methods __init__(client, embeddings, index_name) Initialize Tigris vector store aadd_documents(documents, **kwargs) R...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html
3be938d05c07-1
Delete by vector ID. from_documents(documents, embedding, **kwargs) Return VectorStore initialized from documents and embeddings. from_texts(texts, embedding[, metadatas, ...]) Return VectorStore initialized from texts and embeddings. max_marginal_relevance_search(query[, k, ...]) Return docs selected using the maximal...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html
3be938d05c07-2
(List[Document] (documents) – Documents to add to the vectorstore. 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, **kwargs: Any) → List[str][source]¶ Run more texts through the embeddings and add to t...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html
3be938d05c07-3
as_retriever(**kwargs: Any) → VectorStoreRetriever¶ 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]¶ Return docs most similar to query. async asimi...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html
3be938d05c07-4
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.vectorstores.tigris.Tigris.html
3be938d05c07-5
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.vectorstores.tigris.Tigris.html
f99039699e47-0
langchain.vectorstores.typesense.Typesense¶ class langchain.vectorstores.typesense.Typesense(typesense_client: Client, embedding: Embeddings, *, typesense_collection_name: Optional[str] = None, text_key: str = 'text')[source]¶ Bases: VectorStore Wrapper around Typesense vector search. To use, you should have the typese...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html
f99039699e47-1
add_texts(texts[, metadatas, ids]) Run more texts through the embedding and add to the vectorstore. afrom_documents(documents, embedding, **kwargs) Return VectorStore initialized from documents and embeddings. afrom_texts(texts, embedding[, metadatas]) Return VectorStore initialized from texts and embeddings. amax_marg...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html
f99039699e47-2
Return typesense documents most similar to query. similarity_search_by_vector(embedding[, k]) 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, filter]) Return typesense documents mos...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html
f99039699e47-3
Returns List of ids from adding the texts into the vectorstore. 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: Option...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html
f99039699e47-4
Return docs most similar to query. delete(ids: List[str]) → Optional[bool]¶ Delete by vector ID. Parameters ids – List of ids to delete. Returns True if deletion is successful, False otherwise, None if not implemented. Return type Optional[bool] classmethod from_client_params(embedding: Embeddings, *, host: str = 'loca...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html
f99039699e47-5
Construct Typesense wrapper from raw text. max_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. Maximal marginal relevance optimizes for similarity to query AND diversity among selec...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html
f99039699e47-6
Return docs most similar to query using specified search type. similarity_search(query: str, k: int = 10, filter: Optional[str] = '', **kwargs: Any) → List[Document][source]¶ Return typesense documents most similar to query. Parameters query – Text to look up documents similar to. k – Number of Documents to return. Def...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html
f99039699e47-7
Parameters query – Text to look up documents similar to. k – Number of Documents to return. Defaults to 10. Minimum 10 results would be returned. filter – typesense filter_by expression to filter documents on Returns List of Documents most similar to the query and score for each
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html
b2af55023b25-0
langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch¶ class langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch(embedding: Embeddings, config: AlibabaCloudOpenSearchSettings, **kwargs: Any)[source]¶ Bases: VectorStore Alibaba Cloud OpenSearch Vector Store Methods __init__(embedding, c...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch.html
b2af55023b25-1
create_results_with_score(json_result) delete(ids) Delete by vector ID. from_documents(documents, embedding[, ids, ...]) Return VectorStore initialized from documents and embeddings. from_texts(texts, embedding[, metadatas, config]) Return VectorStore initialized from texts and embeddings. inner_embedding_query(embeddi...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch.html
b2af55023b25-2
(List[Document] (documents) – Documents to add to the vectorstore. Returns List of IDs of the added texts. Return type List[str] add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str][source]¶ Run more texts through the embeddings and add to the vectorstore. Parameters texts ...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch.html
b2af55023b25-3
Return docs most similar to query using specified search type. async asimilarity_search(query: str, k: int = 4, **kwargs: Any) → List[Document]¶ Return docs most similar to query. async asimilarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶ Return docs most similar to embeddin...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch.html
b2af55023b25-4
max_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. Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. Parameters query – Text to l...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch.html
b2af55023b25-5
Return docs most similar to query using specified search type. similarity_search(query: str, k: int = 4, search_filter: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document][source]¶ Return docs most similar to query. similarity_search_by_vector(embedding: List[float], k: int = 4, search_filter: Optional[dic...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.alibabacloud_opensearch.AlibabaCloudOpenSearch.html
a181d7159d27-0
langchain.vectorstores.azuresearch.AzureSearchVectorStoreRetriever¶ class langchain.vectorstores.azuresearch.AzureSearchVectorStoreRetriever(*, vectorstore: AzureSearch, search_type: str = 'hybrid', k: int = 4)[source]¶ Bases: BaseRetriever, BaseModel Create a new model by parsing and validating input data from keyword...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.azuresearch.AzureSearchVectorStoreRetriever.html
0f88982f0c78-0
langchain.vectorstores.singlestoredb.SingleStoreDBRetriever¶ class langchain.vectorstores.singlestoredb.SingleStoreDBRetriever(*, vectorstore: SingleStoreDB, search_type: str = 'similarity', search_kwargs: dict = None, k: int = 4)[source]¶ Bases: VectorStoreRetriever Retriever for SingleStoreDB vector stores. Create a ...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.singlestoredb.SingleStoreDBRetriever.html
0f88982f0c78-1
model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.singlestoredb.SingleStoreDBRetriever.html
cd3116ded434-0
langchain.vectorstores.analyticdb.AnalyticDB¶ class langchain.vectorstores.analyticdb.AnalyticDB(connection_string: str, embedding_function: Embeddings, embedding_dimension: int = 1536, collection_name: str = 'langchain_document', pre_delete_collection: bool = False, logger: Optional[Logger] = None)[source]¶ Bases: Vec...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.analyticdb.AnalyticDB.html
cd3116ded434-1
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_retriever(**kwargs) asearch(query, search_type,...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.analyticdb.AnalyticDB.html
cd3116ded434-2
Return docs and relevance scores in the range [0, 1]. similarity_search_with_score(query[, k, filter]) Return docs most similar to query. similarity_search_with_score_by_vector(embedding) async aadd_documents(documents: List[Document], **kwargs: Any) → List[str]¶ Run more documents through the embeddings and add to the...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.analyticdb.AnalyticDB.html
cd3116ded434-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.vectorstores.analyticdb.AnalyticDB.html
cd3116ded434-4
Return connection string from database parameters. create_collection() → None[source]¶ create_table_if_not_exists() → None[source]¶ delete(ids: List[str]) → Optional[bool]¶ Delete by vector ID. Parameters ids – List of ids to delete. Returns True if deletion is successful, False otherwise, None if not implemented. Retu...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.analyticdb.AnalyticDB.html
cd3116ded434-5
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 algorithm. lambda_mult – Number between 0 and 1 that deter...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.analyticdb.AnalyticDB.html
cd3116ded434-6
Parameters query (str) – Query text to search for. k (int) – Number of results to return. Defaults to 4. filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None. Returns List of Documents most similar to the query. similarity_search_by_vector(embedding: List[float], k: int = 4, filter: Optional[dict] =...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.analyticdb.AnalyticDB.html
cd3116ded434-7
filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None. Returns List of Documents most similar to the query and score for each similarity_search_with_score_by_vector(embedding: List[float], k: int = 4, filter: Optional[dict] = None) → List[Tuple[Document, float]][source]¶
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.analyticdb.AnalyticDB.html
2c6a0ff0f93b-0
langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch¶ class langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch(doc_index: BaseDocIndex, embedding: Embeddings)[source]¶ Bases: DocArrayIndex Wrapper around HnswLib storage. To use it, you should have the docarray package with version >=0.32.0 installed. You can in...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch.html
2c6a0ff0f93b-1
asimilarity_search_by_vector(embedding[, k]) Return docs most similar to embedding vector. asimilarity_search_with_relevance_scores(query) Return docs most similar to query. delete(ids) Delete by vector ID. from_documents(documents, embedding, **kwargs) Return VectorStore initialized from documents and embeddings. from...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch.html
2c6a0ff0f93b-2
Run more texts through the embeddings and add to the vectorstore. add_documents(documents: List[Document], **kwargs: Any) → List[str]¶ Run more documents through the embeddings and add to the vectorstore. Parameters (List[Document] (documents) – Documents to add to the vectorstore. Returns List of IDs of the added text...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch.html
2c6a0ff0f93b-3
Return docs selected using the maximal marginal relevance. as_retriever(**kwargs: Any) → VectorStoreRetriever¶ 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) → Lis...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch.html
2c6a0ff0f93b-4
Initialize DocArrayHnswSearch store. Parameters embedding (Embeddings) – Embedding function. work_dir (str) – path to the location where all the data will be stored. n_dim (int) – dimension of an embedding. dist_metric (str) – Distance metric for DocArrayHnswSearch can be one of: “cosine”, “ip”, and “l2”. Defaults to “...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch.html
2c6a0ff0f93b-5
Defaults to None. work_dir (str) – path to the location where all the data will be stored. n_dim (int) – dimension of an embedding. **kwargs – Other keyword arguments to be passed to the __init__ method. Returns DocArrayHnswSearch Vector Store max_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lam...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch.html
2c6a0ff0f93b-6
to maximum diversity and 1 to minimum diversity. Defaults to 0.5. Returns List of Documents selected by maximal marginal relevance. search(query: str, search_type: str, **kwargs: Any) → List[Document]¶ Return docs most similar to query using specified search type. similarity_search(query: str, k: int = 4, **kwargs: Any...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch.html
2c6a0ff0f93b-7
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 text and cosine distance in float for each. Lower score represents more similarity. property doc_cls: Type[BaseDoc]¶
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.hnsw.DocArrayHnswSearch.html
ec00cc0f3028-0
langchain.vectorstores.cassandra.Cassandra¶ class langchain.vectorstores.cassandra.Cassandra(embedding: Embeddings, session: Session, keyspace: str, table_name: str, ttl_seconds: int | None = None)[source]¶ Bases: VectorStore Wrapper around Cassandra embeddings platform. There is no notion of a default table name, sinc...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.cassandra.Cassandra.html
ec00cc0f3028-1
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. asimilarity_search_by_vector(embedding[, k]) Return docs most similar to embedding vector. asimilarity_search_with_relevance_scores(query) Return docs mo...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.cassandra.Cassandra.html
ec00cc0f3028-2
max_marginal_relevance_search_by_vector(...) Return docs selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents. :param embedding: Embedding to look up documents similar to. :param k: Number of Documents to return. :param fetch_...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.cassandra.Cassandra.html
ec00cc0f3028-3
Run more texts through the embeddings and add to the vectorstore. add_documents(documents: List[Document], **kwargs: Any) → List[str]¶ Run more documents through the embeddings and add to the vectorstore. Parameters (List[Document] (documents) – Documents to add to the vectorstore. Returns List of IDs of the added text...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.cassandra.Cassandra.html
ec00cc0f3028-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.vectorstores.cassandra.Cassandra.html
ec00cc0f3028-5
Create a Cassandra vectorstore from a document list. No support for specifying text IDs Returns a Cassandra vectorstore. classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, **kwargs: Any) → CVST[source]¶ Create a Cassandra vectorstore from raw texts. No support for sp...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.cassandra.Cassandra.html
ec00cc0f3028-6
:param 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. Returns List of Documents selected by maximal marginal relevance. search(query: str, search_type: str, **kwargs: Any) → List[Document]¶ Return docs m...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.cassandra.Cassandra.html
ec00cc0f3028-7
similarity_search_with_score_by_vector(embedding: List[float], k: int = 4) → List[Tuple[Document, float]][source]¶ Return docs most similar to embedding vector. No support for filter query (on metadata) along with vector search. Parameters embedding (str) – Embedding to look up documents similar to. k (int) – Number of...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.cassandra.Cassandra.html
ecea860391e1-0
langchain.vectorstores.starrocks.debug_output¶ langchain.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.vectorstores.starrocks.debug_output.html
143b60873b11-0
langchain.vectorstores.starrocks.StarRocksSettings¶ class langchain.vectorstores.starrocks.StarRocksSettings(_env_file: Optional[Union[str, PathLike, List[Union[str, PathLike]], Tuple[Union[str, PathLike], ...]]] = '<object object>', _env_file_encoding: Optional[str] = None, _env_nested_delimiter: Optional[str] = None,...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.starrocks.StarRocksSettings.html
143b60873b11-1
‘metadata’: ‘metadata_dictionary_in_json’, } Defaults to identity map. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param column_map: Dict[str, str] = {'document': 'document', 'embedding': 'embedding', 'i...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.starrocks.StarRocksSettings.html
a1433904eeac-0
langchain.vectorstores.clickhouse.Clickhouse¶ class langchain.vectorstores.clickhouse.Clickhouse(embedding: Embeddings, config: Optional[ClickhouseSettings] = None, **kwargs: Any)[source]¶ Bases: VectorStore Wrapper around ClickHouse vector database You need a clickhouse-connect python package, and a valid account to c...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.Clickhouse.html
a1433904eeac-1
Return docs selected using the maximal marginal relevance. as_retriever(**kwargs) 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. asimilarity_search_by_vector(embedding[, k]) Return docs most similar t...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.Clickhouse.html
a1433904eeac-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.vectorstores.clickhouse.Clickhouse.html
a1433904eeac-3
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.vectorstores.clickhouse.Clickhouse.html
a1433904eeac-4
Return VectorStore initialized from documents and embeddings. classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[Dict[Any, Any]]] = None, config: Optional[ClickhouseSettings] = None, text_ids: Optional[Iterable[str]] = None, batch_size: int = 32, **kwargs: Any) → Clickhouse[source]...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.Clickhouse.html
a1433904eeac-5
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.vectorstores.clickhouse.Clickhouse.html
a1433904eeac-6
Returns List of Documents Return type List[Document] similarity_search_by_vector(embedding: List[float], k: int = 4, where_str: Optional[str] = None, **kwargs: Any) → List[Document][source]¶ Perform a similarity search with ClickHouse by vectors Parameters query (str) – query string k (int, optional) – Top K neighbors ...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.Clickhouse.html
fe71c72a6a85-0
langchain.vectorstores.weaviate.Weaviate¶ class langchain.vectorstores.weaviate.Weaviate(client: ~typing.Any, index_name: str, text_key: str, embedding: ~typing.Optional[~langchain.embeddings.base.Embeddings] = None, attributes: ~typing.Optional[~typing.List[str]] = None, relevance_score_fn: ~typing.Optional[~typing.Ca...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html
fe71c72a6a85-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) asearch(query, search_type, **kwargs) Return docs most similar to query using specified search type. asimilarity_search(query[, k]) R...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html
fe71c72a6a85-2
Run more documents through the embeddings and add to the vectorstore. Parameters (List[Document] (documents) – Documents to add to the vectorstore. 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...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html
fe71c72a6a85-3
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.vectorstores.weaviate.Weaviate.html
fe71c72a6a85-4
Embeds documents. Creates a new index for the embeddings in the Weaviate instance. Adds the documents to the newly created Weaviate index. This is intended to be a quick way to get started. Example from langchain.vectorstores.weaviate import Weaviate from langchain.embeddings import OpenAIEmbeddings embeddings = OpenAI...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html
fe71c72a6a85-5
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 that determines the degree of diversity among the results with 0 correspondi...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html
fe71c72a6a85-6
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 resulting set of retrieved docs Returns List of Tuples o...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html
2d923f592c7d-0
langchain.vectorstores.sklearn.BsonSerializer¶ class langchain.vectorstores.sklearn.BsonSerializer(persist_path: str)[source]¶ Bases: BaseSerializer Serializes data in binary json using the bson python package. Methods __init__(persist_path) extension() The file extension suggested by this serializer (without dot). loa...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.BsonSerializer.html
74f9b4aca3cc-0
langchain.vectorstores.clickhouse.has_mul_sub_str¶ langchain.vectorstores.clickhouse.has_mul_sub_str(s: str, *args: Any) → bool[source]¶ Check if a string contains multiple substrings. :param s: string to check. :param *args: substrings to check. Returns True if all substrings are in the string, False otherwise.
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.has_mul_sub_str.html
3cb51f09fb96-0
langchain.vectorstores.myscale.MyScale¶ class langchain.vectorstores.myscale.MyScale(embedding: Embeddings, config: Optional[MyScaleSettings] = None, **kwargs: Any)[source]¶ Bases: VectorStore Wrapper around MyScale vector database You need a clickhouse-connect python package, and a valid account to connect to MyScale....
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html
3cb51f09fb96-1
Return docs selected using the maximal marginal relevance. as_retriever(**kwargs) 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. asimilarity_search_by_vector(embedding[, k]) Return docs most similar t...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html
3cb51f09fb96-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.vectorstores.myscale.MyScale.html
3cb51f09fb96-3
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.vectorstores.myscale.MyScale.html
3cb51f09fb96-4
Return VectorStore initialized from documents and embeddings. classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[Dict[Any, Any]]] = None, config: Optional[MyScaleSettings] = None, text_ids: Optional[Iterable[str]] = None, batch_size: int = 32, **kwargs: Any) → MyScale[source]¶ Crea...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html
3cb51f09fb96-5
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.vectorstores.myscale.MyScale.html
3cb51f09fb96-6
Returns List of Documents Return type List[Document] similarity_search_by_vector(embedding: List[float], k: int = 4, where_str: Optional[str] = None, **kwargs: Any) → List[Document][source]¶ Perform a similarity search with MyScale by vectors Parameters query (str) – query string k (int, optional) – Top K neighbors to ...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html
3da3b15250bc-0
langchain.vectorstores.sklearn.ParquetSerializer¶ class langchain.vectorstores.sklearn.ParquetSerializer(persist_path: str)[source]¶ Bases: BaseSerializer Serializes data in Apache Parquet format using the pyarrow package. Methods __init__(persist_path) extension() The file extension suggested by this serializer (witho...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.ParquetSerializer.html
7f1d1814a4df-0
langchain.vectorstores.sklearn.SKLearnVectorStoreException¶ class langchain.vectorstores.sklearn.SKLearnVectorStoreException[source]¶ Bases: RuntimeError Exception raised by SKLearnVectorStore. add_note()¶ Exception.add_note(note) – add a note to the exception with_traceback()¶ Exception.with_traceback(tb) – set self._...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStoreException.html
dd9af551ffd5-0
langchain.vectorstores.myscale.has_mul_sub_str¶ langchain.vectorstores.myscale.has_mul_sub_str(s: str, *args: Any) → bool[source]¶ Check if a string contains multiple substrings. :param s: string to check. :param *args: substrings to check. Returns True if all substrings are in the string, False otherwise.
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.has_mul_sub_str.html
7d170faf2760-0
langchain.vectorstores.base.VectorStore¶ class langchain.vectorstores.base.VectorStore[source]¶ Bases: ABC Interface for vector stores. Methods __init__() aadd_documents(documents, **kwargs) Run more documents through the embeddings and add to the vectorstore. aadd_texts(texts[, metadatas]) Run more texts through the e...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.base.VectorStore.html
7d170faf2760-1
max_marginal_relevance_search(query[, k, ...]) Return docs selected using the maximal marginal relevance. max_marginal_relevance_search_by_vector(...) Return docs selected using the maximal marginal relevance. search(query, search_type, **kwargs) Return docs most similar to query using specified search type. similarity...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.base.VectorStore.html
7d170faf2760-2
Parameters texts – Iterable of strings to add to the vectorstore. metadatas – Optional list of metadatas associated with the texts. kwargs – vectorstore specific parameters Returns List of ids from adding the texts into the vectorstore. async classmethod afrom_documents(documents: List[Document], embedding: Embeddings,...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.base.VectorStore.html
7d170faf2760-3
Return docs most similar to query. async asimilarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document][source]¶ Return docs most similar to embedding vector. async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]][source]¶ R...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.base.VectorStore.html
7d170faf2760-4
to maximum diversity and 1 to minimum diversity. 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][source]¶ Return docs selected using...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.base.VectorStore.html
7d170faf2760-5
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]][source]¶ Return docs and relevance scores in the range [0, 1]. 0 is dissimilar, 1 is most similar. Parameters query – input text k – Number of Documen...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.base.VectorStore.html
76cf626360dc-0
langchain.vectorstores.lancedb.LanceDB¶ class langchain.vectorstores.lancedb.LanceDB(connection: Any, embedding: Embeddings, vector_key: Optional[str] = 'vector', id_key: Optional[str] = 'id', text_key: Optional[str] = 'text')[source]¶ Bases: VectorStore Wrapper around LanceDB vector database. To use, you should have l...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html
76cf626360dc-1
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. asimilarity_search_by_vector(embedding[, k]) Return docs most similar to embedding vector. asimilarity_search_with_relevance_scores(query) Return docs mo...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html
76cf626360dc-2
Run more texts through the embeddings and add to the vectorstore. add_documents(documents: List[Document], **kwargs: Any) → List[str]¶ Run more documents through the embeddings and add to the vectorstore. Parameters (List[Document] (documents) – Documents to add to the vectorstore. Returns List of IDs of the added text...
https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html