id stringlengths 14 16 | text stringlengths 13 2.7k | source stringlengths 57 178 |
|---|---|---|
cadabab894fe-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. | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.has_mul_sub_str.html |
aa3cb23dafcd-0 | langchain.vectorstores.myscale.MyScale¶
class langchain.vectorstores.myscale.MyScale(embedding: Embeddings, config: Optional[MyScaleSettings] = None, **kwargs: Any)[source]¶
MyScale vector store.
You need a clickhouse-connect python package, and a valid account
to connect to MyScale.
MyScale can not only search with si... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-1 | 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)
Return VectorStoreRetriever initialized from this VectorStore.
asearch(query, search_... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-2 | similarity_search_with_relevance_scores(query)
Perform a similarity search with MyScale
similarity_search_with_score(*args, **kwargs)
Run similarity search with distance.
__init__(embedding: Embeddings, config: Optional[MyScaleSettings] = None, **kwargs: Any) → None[source]¶
MyScale Wrapper to LangChain
embedding (Embe... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-3 | ids – Optional list of ids to associate with the texts.
batch_size – Batch size of insertion
metadata – Optional column data to be inserted
Returns
List of ids from adding the texts into the vectorstore.
async adelete(ids: Optional[List[str]] = None, **kwargs: Any) → Optional[bool]¶
Delete by vector ID or other criteri... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-4 | 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. Can include things like:
k: Amount of documents to return (Default: 4)
score_threshold: Minimum relevance threshold
for similarity_score... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-5 | 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]¶
Return docs most similar to q... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-6 | False otherwise, None if not implemented.
Return type
Optional[bool]
drop() → None[source]¶
Helper function: Drop data
escape_str(value: str) → str[source]¶
classmethod from_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
cl... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-7 | 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 determines the degree
of diversity among the results with 0 corresponding
to max... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-8 | k (int, optional) – Top K neighbors to retrieve. Defaults to 4.
where_str (Optional[str], optional) – where condition string.
Defaults to None.
NOTE – Please do not let end-user to fill this and always be aware
of SQL injection. When dealing with metadatas, remember to
use {self.metadata_column}.attribute instead of at... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
aa3cb23dafcd-9 | NOTE – Please do not let end-user to fill this and always be aware
of SQL injection. When dealing with metadatas, remember to
use {self.metadata_column}.attribute instead of attribute
alone. The default name for it is metadata.
Returns
List of documents most similar to the query text
and cosine distance in float for ea... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.myscale.MyScale.html |
e0839866c1d6-0 | langchain.vectorstores.weaviate.Weaviate¶
class langchain.vectorstores.weaviate.Weaviate(client: ~typing.Any, index_name: str, text_key: str, embedding: ~typing.Optional[~langchain.schema.embeddings.Embeddings] = None, attributes: ~typing.Optional[~typing.List[str]] = None, relevance_score_fn: ~typing.Optional[~typing.... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-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)
Return VectorStoreRetriever... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-2 | similarity_search_with_relevance_scores(query)
Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k])
Return list of documents most similar to the query text and cosine distance in float for each.
__init__(client: ~typing.Any, index_name: str, text_key: str, embedding: ~typing.Op... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-3 | Upload texts with metadata (properties) to Weaviate.
async adelete(ids: Optional[List[str]] = None, **kwargs: Any) → Optional[bool]¶
Delete by vector ID or other criteria.
Parameters
ids – List of ids to delete.
**kwargs – Other keyword arguments that subclasses might use.
Returns
True if deletion is successful,
False ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-4 | search_kwargs (Optional[Dict]) – Keyword arguments to pass to the
search function. Can include things like:
k: Amount of documents to return (Default: 4)
score_threshold: Minimum relevance threshold
for similarity_score_threshold
fetch_k: Amount of documents to pass to MMR algorithm (Default: 20)
lambda_mult: Diversity... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-5 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-6 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, *, client: Optional[weaviate.Client] = None, weaviate_url: Optional[str] = None, weaviate_api_key: Optional[str] = None, batch_size: Optional[int] = None,... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-7 | batch_size – Size of batch operations.
index_name – Index name.
text_key – Key to use for uploading/retrieving text to/from vectorstore.
by_text – Whether to search by text or by embedding.
relevance_score_fn – Function for converting whatever distance function the
vector store uses to a relevance score, which is a nor... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-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][source]¶
Return docs selected using the maximal marginal relevance.
Maximal marginal... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
e0839866c1d6-9 | Returns
List of Documents most similar to the query.
similarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document][source]¶
Look up similar documents by embedding vector in Weaviate.
similarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, f... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.weaviate.Weaviate.html |
f7b359fd6a74-0 | langchain.vectorstores.xata.XataVectorStore¶
class langchain.vectorstores.xata.XataVectorStore(api_key: str, db_url: str, embedding: Embeddings, table_name: str)[source]¶
Xata vector store.
It assumes you have a Xata database
created with the right schema. See the guide at:
https://integrations.langchain.com/vectorstor... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
f7b359fd6a74-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 an... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
f7b359fd6a74-2 | Initialize with Xata client.
async aadd_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 texts.
Return type
List[str]
async... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
f7b359fd6a74-3 | **kwargs – Other keyword arguments that subclasses might use.
Returns
True if deletion is successful,
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 documen... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
f7b359fd6a74-4 | fetch_k: Amount of documents to pass to MMR algorithm (Default: 20)
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 documen... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
f7b359fd6a74-5 | 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 embedding vector.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs and r... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
f7b359fd6a74-6 | Return VectorStore initialized from texts and embeddings.
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 divers... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
f7b359fd6a74-7 | Return docs most similar to query using specified search type.
similarity_search(query: str, k: int = 4, filter: Optional[dict] = None, **kwargs: Any) → List[Document][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.
R... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
f7b359fd6a74-8 | k (int) – Number of results to return. Defaults to 4.
filter (Optional[dict]) – Filter by metadata. Defaults to None.
Returns
List of documents most similar to the querytext with distance in float.
Return type
List[Tuple[Document, float]]
wait_for_indexing(timeout: float = 5, ndocs: int = 1) → None[source]¶
Wait for th... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.xata.XataVectorStore.html |
21899ea630ad-0 | langchain.vectorstores.docarray.base.DocArrayIndex¶
class langchain.vectorstores.docarray.base.DocArrayIndex(doc_index: BaseDocIndex, embedding: Embeddings)[source]¶
Base class for DocArray based vector stores.
Initialize a vector store from DocArray’s DocIndex.
Attributes
doc_cls
embeddings
Access the query embedding ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html |
21899ea630ad-1 | 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])
Delete by vector ID or other criteria.
from... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html |
21899ea630ad-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html |
21899ea630ad-3 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html |
21899ea630ad-4 | )
# 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html |
21899ea630ad-5 | **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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html |
21899ea630ad-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.
max_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html |
21899ea630ad-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.docarray.base.DocArrayIndex.html |
6a4514ba9e42-0 | langchain.vectorstores.pgembedding.QueryResult¶
class langchain.vectorstores.pgembedding.QueryResult[source]¶
Result from a query.
Attributes
EmbeddingStore
distance
Methods
__init__()
__init__()¶ | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgembedding.QueryResult.html |
f7d96f3fda5e-0 | langchain.vectorstores.starrocks.StarRocksSettings¶
class langchain.vectorstores.starrocks.StarRocksSettings[source]¶
Bases: BaseSettings
StarRocks client configuration.
Attribute:
StarRocks_host (str)An URL to connect to MyScale backend.Defaults to ‘localhost’.
StarRocks_port (int) : URL port to connect with HTTP. Def... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.starrocks.StarRocksSettings.html |
f7d96f3fda5e-1 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.starrocks.StarRocksSettings.html |
f7d96f3fda5e-2 | classmethod from_orm(obj: Any) → Model¶
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_n... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.starrocks.StarRocksSettings.html |
fc0f4bdf237b-0 | langchain.vectorstores.sklearn.SKLearnVectorStore¶
class langchain.vectorstores.sklearn.SKLearnVectorStore(embedding: Embeddings, *, persist_path: Optional[str] = None, serializer: Literal['json', 'bson', 'parquet'] = 'json', metric: str = 'cosine', **kwargs: Any)[source]¶
Simple in-memory vector store based on the sci... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
fc0f4bdf237b-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
fc0f4bdf237b-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. Defaults to 4... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
fc0f4bdf237b-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
fc0f4bdf237b-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
fc0f4bdf237b-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
fc0f4bdf237b-6 | **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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
fc0f4bdf237b-7 | :param fetch_k: Number of Documents to fetch to pass to MMR algorithm.
: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.
Defaults to 0.5.
Returns
List of Documents selected by maximal marginal releva... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
fc0f4bdf237b-8 | 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 ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.SKLearnVectorStore.html |
13ff9de28090-0 | langchain.vectorstores.supabase.SupabaseVectorStore¶
class langchain.vectorstores.supabase.SupabaseVectorStore(client: supabase.client.Client, embedding: Embeddings, table_name: str, chunk_size: int = 500, query_name: Union[str, None] = None)[source]¶
Supabase Postgres vector store.
It assumes you have the pgvector
ext... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-1 | from supabase.client import create_client
embeddings = OpenAIEmbeddings()
supabase_client = create_client("my_supabase_url", "my_supabase_key")
vector_store = SupabaseVectorStore(
client=supabase_client,
embedding=embeddings,
table_name="documents",
query_name="match_documents",
)
Initialize with supaba... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-2 | 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 an... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-3 | similarity_search_with_score(*args, **kwargs)
Run similarity search with distance.
__init__(client: supabase.client.Client, embedding: Embeddings, table_name: str, chunk_size: int = 500, query_name: Union[str, None] = None) → None[source]¶
Initialize with supabase client.
async aadd_documents(documents: List[Document],... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-4 | Returns
List of ids from adding the texts into the vectorstore.
add_vectors(vectors: List[List[float]], documents: List[Document], ids: List[str]) → List[str][source]¶
async adelete(ids: Optional[List[str]] = None, **kwargs: Any) → Optional[bool]¶
Delete by vector ID or other criteria.
Parameters
ids – List of ids to d... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-5 | 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. Can include things like:
k: Amount of documents to return (Default: 4)
score_threshold: Minimum relevance threshold
for similarity_score... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-6 | 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]¶
Return docs most similar to q... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-7 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, client: Optional[supabase.client.Client] = None, table_name: Optional[str] = 'documents', query_name: Union[str, None] = 'match_documents', chunk_size: in... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-8 | content text,
metadata jsonb,
embedding vector(1536),
similarity float)
LANGUAGE plpgsql
AS $$
# variable_conflict use_column
BEGINRETURN query
SELECT
id,
content,
metadata,
embedding,
1 -(docstore.embedding <=> query_embedding) AS similarity
FROMdocstore
ORDER BYdocstore.embedding <=> query_embedding
LIMIT match_count... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
13ff9de28090-9 | 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_by_vector_returning_embeddings(query: List[float], k: int, filter: Optional[Dict... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.supabase.SupabaseVectorStore.html |
2784bfd83076-0 | langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch¶
class langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch(opensearch_url: str, index_name: str, embedding_function: Embeddings, **kwargs: Any)[source]¶
Amazon OpenSearch Vector Engine vector store.
Example
from langchain.vectorst... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-2 | Return docs and it's scores most similar to query.
__init__(opensearch_url: str, index_name: str, embedding_function: Embeddings, **kwargs: Any)[source]¶
Initialize with necessary components.
async aadd_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-3 | Optional Args:vector_field: Document field embeddings are stored in. Defaults to
“vector_field”.
text_field: Document field the text of the document is stored in. Defaults
to “text”.
add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, bulk_size: int = 500, **kwargs: ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-6 | **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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-7 | )
OpenSearch by default supports Approximate Search powered by nmslib, faiss
and lucene engines recommended for large datasets. Also supports brute force
search through Script Scoring and Painless Scripting.
Optional Args:vector_field: Document field embeddings are stored in. Defaults to
“vector_field”.
text_field: Doc... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-8 | texts,
embeddings,
opensearch_url="http://localhost:9200"
)
OpenSearch by default supports Approximate Search powered by nmslib, faiss
and lucene engines recommended for large datasets. Also supports brute force
search through Script Scoring and Painless Scripting.
Optional Args:vector_field: Document field emb... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-9 | k – Number of Documents to return. Defaults to 4.
fetch_k – Number of Documents to fetch to pass to MMR algorithm.
Defaults to 20.
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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-10 | k – Number of Documents to return. Defaults to 4.
Returns
List of Documents most similar to the query.
Optional Args:vector_field: Document field embeddings are stored in. Defaults to
“vector_field”.
text_field: Document field the text of the document is stored in. Defaults
to “text”.
metadata_field: Document field tha... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
2784bfd83076-11 | pre_filter: script_score query to pre-filter documents before identifying
nearest neighbors; default: {“match_all”: {}}
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 sim... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.opensearch_vector_search.OpenSearchVectorSearch.html |
0bd47ee51b3a-0 | langchain.vectorstores.tencentvectordb.TencentVectorDB¶
class langchain.vectorstores.tencentvectordb.TencentVectorDB(embedding: ~langchain.schema.embeddings.Embeddings, connection_params: ~langchain.vectorstores.tencentvectordb.ConnectionParams, index_params: ~langchain.vectorstores.tencentvectordb.IndexParams = <langc... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
0bd47ee51b3a-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
0bd47ee51b3a-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.schema.... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
0bd47ee51b3a-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:... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
0bd47ee51b3a-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. ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
0bd47ee51b3a-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
0bd47ee51b3a-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
0bd47ee51b3a-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
0bd47ee51b3a-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 ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.TencentVectorDB.html |
2f1e286c89d2-0 | langchain.vectorstores.zep.CollectionConfig¶
class langchain.vectorstores.zep.CollectionConfig(name: str, description: Optional[str], metadata: Optional[Dict[str, Any]], embedding_dimensions: int, is_auto_embedded: bool)[source]¶
Configuration for a Zep Collection.
If the collection does not exist, it will be created.
... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.zep.CollectionConfig.html |
1ec3fb9d509b-0 | langchain.vectorstores.tiledb.get_vector_index_uri_from_group¶
langchain.vectorstores.tiledb.get_vector_index_uri_from_group(group: Any) → str[source]¶ | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tiledb.get_vector_index_uri_from_group.html |
bb1468a98997-0 | langchain.vectorstores.matching_engine.MatchingEngine¶
class langchain.vectorstores.matching_engine.MatchingEngine(project_id: str, index: MatchingEngineIndex, endpoint: MatchingEngineIndexEndpoint, embedding: Embeddings, gcs_client: storage.Client, gcs_bucket_name: str, credentials: Optional[Credentials] = None)[sourc... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-1 | gcs_bucket_name¶
The GCS bucket name.
credentials¶
Created GCP credentials.
Type
Optional
Attributes
embeddings
Access the query embedding object if available.
Methods
__init__(project_id, index, endpoint, ...[, ...])
Vertex Matching Engine implementation of the vector store.
aadd_documents(documents, **kwargs)
Run mor... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-2 | 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])
Delete by vector ID or other criteria.
from_components(project_id, region, ...[, ...])
Takes the object creation out of the constructor.
... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-3 | documents will be stored in GCS.
An existing Index and corresponding Endpoint are preconditions for
using this module.
See usage in
docs/modules/indexes/vectorstores/examples/matchingengine.ipynb.
Note that this implementation is mostly meant for reading if you are
planning to do a real time implementation. While readi... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-4 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-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[str]] = None, **kwargs: Any) → Optional[bool]¶
Delete by vector ID or other criteria.
Parameters
... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-8 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, **kwargs: Any) → MatchingEngine[source]¶
Use from components instead.
max_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lambda_mult... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-9 | 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, filter: Optional[List[Namespace]] = None, **kwargs: Any) → Lis... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-10 | datapoints with “squared shape”. Please refer to
https://cloud.google.com/vertex-ai/docs/matching-engine/filtering#json
for more detail.
Returns
A list of k matching documents.
similarity_search_by_vector_with_score(embedding: List[float], k: int = 4, filter: Optional[List[Namespace]] = None) → List[Tuple[Document, flo... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
bb1468a98997-11 | filter the resulting set of retrieved docs
Returns
List of Tuples of (doc, similarity_score)
similarity_search_with_score(query: str, k: int = 4, filter: Optional[List[Namespace]] = None) → List[Tuple[Document, float]][source]¶
Return docs most similar to query and their cosine distance from the query.
Parameters
query... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.matching_engine.MatchingEngine.html |
3c70074abbe6-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]¶
ElasticVectorSearch uses the brute force method of searching o... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html |
3c70074abbe6-1 | Log in to the Elastic Cloud console at https://cloud.elastic.co
Go to “Security” > “Users”
Locate the “elastic” user and click “Edit”
Click “Reset password”
Follow the prompts to reset the password
The format for Elastic Cloud URLs is
https://username:password@cluster_id.region_id.gcp.cloud.es.io:9243.
Example
from lan... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html |
3c70074abbe6-2 | Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas, ids, ...])
Run more texts through the embeddings and add to the vectorstore.
adelete([ids])
Delete by vector ID or other criteria.
afrom_documents(documents, embedding, **kwargs)
Return VectorStore initialized from docume... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html |
3c70074abbe6-3 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elastic_vector_search.ElasticVectorSearch.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.