id stringlengths 14 16 | text stringlengths 13 2.7k | source stringlengths 57 178 |
|---|---|---|
63710d9809d5-8 | Returns
A Marqo vectorstore
Return type
VectorStore
classmethod from_texts(texts: List[str], embedding: Any = None, metadatas: Optional[List[dict]] = None, index_name: str = '', url: str = 'http://localhost:8882', api_key: str = '', add_documents_settings: Optional[Dict[str, Any]] = None, searchable_attributes: Optiona... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
63710d9809d5-9 | None. (accompany the texts. Defaults to) –
url (str, optional) – The URL for Marqo. Defaults to “http://localhost:8882”.
api_key (str, optional) – The API key for Marqo. Defaults to “”.
metadatas (Optional[List[dict]], optional) – A list of metadatas, to
None. –
Can (this is only used when a new index is being create... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
63710d9809d5-10 | Returns
The number of documents
Return type
int
marqo_bulk_similarity_search(queries: Iterable[Union[str, Dict[str, float]]], k: int = 4) → Dict[str, List[Dict[str, List[Dict[str, str]]]]][source]¶
Return documents from Marqo using a bulk search, exposes Marqo’s
output directly
Parameters
queries (Iterable[Union[str, D... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
63710d9809d5-11 | 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_marginal_relevance_search_by_vector(embedding: List[float], k: int =... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
63710d9809d5-12 | Returns
k documents ordered from best to worst match.
Return type
List[Document]
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 ret... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
7855c5d3e066-0 | langchain.vectorstores.sklearn.JsonSerializer¶
class langchain.vectorstores.sklearn.JsonSerializer(persist_path: str)[source]¶
Serializes data in json using the json package from python standard library.
Methods
__init__(persist_path)
extension()
The file extension suggested by this serializer (without dot).
load()
Loa... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sklearn.JsonSerializer.html |
304cecd148b9-0 | langchain.vectorstores.tencentvectordb.ConnectionParams¶
class langchain.vectorstores.tencentvectordb.ConnectionParams(url: str, key: str, username: str = 'root', timeout: int = 10)[source]¶
Tencent vector DB Connection params.
See the following documentation for details:
https://cloud.tencent.com/document/product/1709... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tencentvectordb.ConnectionParams.html |
4d22678ca5ac-0 | langchain.vectorstores.sqlitevss.SQLiteVSS¶
class langchain.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 sqlite-vss python package... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sqlitevss.SQLiteVSS.html |
4d22678ca5ac-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]... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sqlitevss.SQLiteVSS.html |
4d22678ca5ac-2 | Initialize with sqlite client with vss extension.
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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sqlitevss.SQLiteVSS.html |
4d22678ca5ac-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_... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sqlitevss.SQLiteVSS.html |
4d22678ca5ac-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sqlitevss.SQLiteVSS.html |
4d22678ca5ac-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 ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sqlitevss.SQLiteVSS.html |
4d22678ca5ac-6 | this embedding function returns. Needed for the virtual table DDL.
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 A... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sqlitevss.SQLiteVSS.html |
4d22678ca5ac-7 | Return docs most similar to query using specified search type.
similarity_search(query: str, k: int = 4, **kwargs: Any) → List[Document][source]¶
Return docs most similar to query.
similarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document][source]¶
Return docs most similar to embedd... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.sqlitevss.SQLiteVSS.html |
9b32e63487f5-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 | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.starrocks.debug_output.html |
6c3a6525ccdb-0 | langchain.vectorstores.redis.filters.RedisTag¶
class langchain.vectorstores.redis.filters.RedisTag(field: str)[source]¶
A RedisFilterField representing a tag in a Redis index.
Create a RedisTag FilterField
Parameters
field (str) – The name of the RedisTag field in the index to be queried
against.
Attributes
OPERATORS
O... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.redis.filters.RedisTag.html |
740a1954b492-0 | langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch¶
class langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch(collection: Collection[MongoDBDocumentType], embedding: Embeddings, *, index_name: str = 'default', text_key: str = 'text', embedding_key: str = 'embedding')[source]¶
MongoDB Atlas Vector S... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-1 | add_texts(texts[, metadatas])
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 documents and embeddings.
afrom_texts(texts, embedding[, metadatas])
Return VectorStor... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-2 | 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_search(query[, k, pre_filter, ...])
Return MongoDB documents most similar to the given query.
similarity_... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-3 | 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 texts.
Return type
List[str]
add_texts(texts: Iterable[str], metadatas... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-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.
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.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-7 | This is intended to be a quick way to get started.
Example
max_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, pre_filter: Optional[Dict] = None, post_filter_pipeline: Optional[List[Dict]] = None, **kwargs: Any) → List[Document][source]¶
Return documents selected using the... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-8 | 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(... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-9 | 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.mongodb_atlas.MongoDBAtlasVectorSearch.html |
740a1954b492-10 | following the knnBeta vector search.
Returns
List of documents most similar to the query and their scores.
Examples using MongoDBAtlasVectorSearch¶
MongoDB Atlas | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
dde01453f940-0 | langchain.vectorstores.qdrant.QdrantException¶
class langchain.vectorstores.qdrant.QdrantException[source]¶
Qdrant related exceptions. | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.qdrant.QdrantException.html |
9811f93100e1-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]¶
LanceDB vector store.
To use, you should have lancedb python package installed.
Exam... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html |
9811f93100e1-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.lancedb.LanceDB.html |
9811f93100e1-2 | similarity_search_with_score(*args, **kwargs)
Run similarity search with distance.
__init__(connection: Any, embedding: Embeddings, vector_key: Optional[str] = 'vector', id_key: Optional[str] = 'id', text_key: Optional[str] = 'text')[source]¶
Initialize with Lance DB connection
async aadd_documents(documents: List[Docu... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html |
9811f93100e1-3 | 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 otherwise, None if not implemented.
Return type
Optional[bool]
async classmethod afrom_documents(documents: List[Document], embedding... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html |
9811f93100e1-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 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 Vec... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html |
9811f93100e1-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.lancedb.LanceDB.html |
9811f93100e1-6 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, connection: Any = None, vector_key: Optional[str] = 'vector', id_key: Optional[str] = 'id', text_key: Optional[str] = 'text', **kwargs: Any) → LanceDB[sou... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html |
9811f93100e1-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(... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html |
9811f93100e1-8 | Returns
List of Tuples of (doc, similarity_score)
similarity_search_with_score(*args: Any, **kwargs: Any) → List[Tuple[Document, float]]¶
Run similarity search with distance.
Examples using LanceDB¶
LanceDB | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.lancedb.LanceDB.html |
fd75b361b0b5-0 | langchain.vectorstores.pgvecto_rs.PGVecto_rs¶
class langchain.vectorstores.pgvecto_rs.PGVecto_rs(embedding: Embeddings, dimension: int, db_url: str, collection_name: str, new_table: bool = False)[source]¶
Attributes
embeddings
Access the query embedding object if available.
Methods
__init__(embedding, dimension, db_url... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgvecto_rs.PGVecto_rs.html |
fd75b361b0b5-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.pgvecto_rs.PGVecto_rs.html |
fd75b361b0b5-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgvecto_rs.PGVecto_rs.html |
fd75b361b0b5-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_... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgvecto_rs.PGVecto_rs.html |
fd75b361b0b5-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgvecto_rs.PGVecto_rs.html |
fd75b361b0b5-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 ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgvecto_rs.PGVecto_rs.html |
fd75b361b0b5-6 | Return VectorStore initialized from documents.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, db_url: str = '', collection_name: str = '7ebd09bda1144d508f2d1313247612fe', **kwargs: Any) → PGVecto_rs[source]¶
Return VectorStore initialized from texts and optional ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgvecto_rs.PGVecto_rs.html |
fd75b361b0b5-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(... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgvecto_rs.PGVecto_rs.html |
fd75b361b0b5-8 | filter the resulting set of retrieved docs
Returns
List of Tuples of (doc, similarity_score)
similarity_search_with_score(query: str, k: int = 4, distance_func: Literal['sqrt_euclid', 'neg_dot_prod', 'ned_cos'] = 'sqrt_euclid', **kwargs: Any) → List[Tuple[Document, float]][source]¶
Run similarity search with distance.
... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.pgvecto_rs.PGVecto_rs.html |
aaccd8143819-0 | langchain.vectorstores.awadb.AwaDB¶
class langchain.vectorstores.awadb.AwaDB(table_name: str = 'langchain_awadb', embedding: Optional[Embeddings] = None, log_and_data_dir: Optional[str] = None, client: Optional[awadb.Client] = None, **kwargs: Any)[source]¶
AwaDB vector store.
Initialize with AwaDB client.If table_name ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-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.awadb.AwaDB.html |
aaccd8143819-2 | Return docs selected using the maximal marginal relevance.
search(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
similarity_search(query[, k, ...])
Return docs most similar to query.
similarity_search_by_vector([embedding, k, ...])
Return docs most similar to embedding vect... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-3 | 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.awadb.AwaDB.html |
aaccd8143819-4 | 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_... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-5 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-6 | 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 ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-7 | table_name (str) – Name of the table to create.
log_and_data_dir (Optional[str]) – Directory to persist the table.
client (Optional[awadb.Client]) – AwaDB client.
Any – Any possible parameters in the future
Returns
AwaDB vectorstore.
Return type
AwaDB
classmethod from_texts(texts: List[str], embedding: Optional[Embeddi... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-8 | meta_filter – Filter by any metadata of the document.
not_include_fields – Not pack the specified fields of each document.
limit – The number of documents to return. Defaults to 5. Optional.
Returns
Documents which satisfy the input conditions.
get_current_table(**kwargs: Any) → str[source]¶
Get the current table.
list... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-9 | 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, text_in_page_content: Optional[str] = None, meta_filter: Optional[dict] = None, **kwargs: Any) → List[Document][source]¶
Return docs ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-10 | meta_filter (Optional[dict]) – Filter by metadata. Defaults to None.
`{"color" (E.g.) – ”red”, “price”: 4.20}`. Optional.
`{"max_price" (E.g.) – 15.66, “min_price”: 4.20}`
field (price is the metadata) –
filter (means range) –
`{"maxe_price" (E.g.) – 15.66, “mine_price”: 4.20}`
field –
filter –
kwargs – Any possibl... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
aaccd8143819-11 | 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 of (doc, similarity_score)
similarity_search_wit... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.awadb.AwaDB.html |
0855a29094dc-0 | langchain.vectorstores.clickhouse.ClickhouseSettings¶
class langchain.vectorstores.clickhouse.ClickhouseSettings[source]¶
Bases: BaseSettings
ClickHouse client configuration.
Attribute:
host (str)An URL to connect to MyScale backend.Defaults to ‘localhost’.
port (int) : URL port to connect with HTTP. Defaults to 8443.
... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.ClickhouseSettings.html |
0855a29094dc-1 | Raises ValidationError if the input data cannot be parsed to form a valid model.
param column_map: Dict[str, str] = {'document': 'document', 'embedding': 'embedding', 'id': 'id', 'metadata': 'metadata', 'uuid': 'uuid'}¶
param database: str = 'default'¶
param host: str = 'localhost'¶
param index_param: Optional[Union[Li... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.ClickhouseSettings.html |
0855a29094dc-2 | the new model: you should trust this data
deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[boo... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.ClickhouseSettings.html |
0855a29094dc-3 | classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clickhouse.ClickhouseSettings.html |
6e2841983903-0 | langchain.vectorstores.atlas.AtlasDB¶
class langchain.vectorstores.atlas.AtlasDB(name: str, embedding_function: Optional[Embeddings] = None, api_key: Optional[str] = None, description: str = 'A description for your project', is_public: bool = True, reset_project_if_exists: bool = False)[source]¶
Atlas vector store.
Atl... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-1 | add_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas, ids, refresh])
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)
Ret... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-2 | Create an AtlasDB vectorstore from a raw documents.
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 simi... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-4 | 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 documents and embeddings.
async classmethod afrom_texts(texts: List[str], emb... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-5 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-6 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-7 | False otherwise, None if not implemented.
Return type
Optional[bool]
classmethod from_documents(documents: List[Document], embedding: Optional[Embeddings] = None, ids: Optional[List[str]] = None, name: Optional[str] = None, api_key: Optional[str] = None, persist_directory: Optional[str] = None, description: str = 'A de... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-8 | Returns
Nomic’s neural database and finest rhizomatic instrument
Return type
AtlasDB
classmethod from_texts(texts: List[str], embedding: Optional[Embeddings] = None, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, name: Optional[str] = None, api_key: Optional[str] = None, description: str = 'A ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-9 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6e2841983903-10 | Parameters
query (str) – Query text to search for.
k (int) – Number of results to return. Defaults to 4.
Returns
List of documents most similar to the query text.
Return type
List[Document]
similarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶
Return docs most similar to embed... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.atlas.AtlasDB.html |
6dedf2a3a213-0 | langchain.vectorstores.hologres.Hologres¶
class langchain.vectorstores.hologres.Hologres(connection_string: str, embedding_function: Embeddings, ndims: int = 1536, table_name: str = 'langchain_pg_embedding', pre_delete_table: bool = False, logger: Optional[Logger] = None)[source]¶
Hologres API vector store.
connection_... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-1 | Return VectorStore initialized from documents and embeddings.
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(...)
Retu... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-2 | 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.hologres.Hologres.html |
6dedf2a3a213-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]
add_embeddings(texts: Iterable[str], embeddings: List[List[float]], metadatas: List[dict], ids: List[str], **k... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-4 | 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_... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-5 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-6 | 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 ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-7 | “Either pass it as a parameter
or set the HOLOGRES_CONNECTION_STRING environment variable.
classmethod from_embeddings(text_embeddings: List[Tuple[str, List[float]]], embedding: Embeddings, metadatas: Optional[List[dict]] = None, ndims: int = 1536, table_name: str = 'langchain_pg_embedding', ids: Optional[List[str]] = ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-8 | Return VectorStore initialized from texts and embeddings.
Postgres connection string is required
“Either pass it as a parameter
or set the HOLOGRES_CONNECTION_STRING environment variable.
classmethod get_connection_string(kwargs: Dict[str, Any]) → str[source]¶
max_marginal_relevance_search(query: str, k: int = 4, fetch... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-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[dict] = None, **kwargs: Any) → List[Document]... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
6dedf2a3a213-10 | 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[dict] = None) → List[Tuple[Document, float]][source]¶
Return docs most similar to query.
Parameters
query – Text to look up documents similar to.
k – Number ... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.hologres.Hologres.html |
00b535d4daa5-0 | langchain.vectorstores.elasticsearch.ApproxRetrievalStrategy¶
class langchain.vectorstores.elasticsearch.ApproxRetrievalStrategy(query_model_id: Optional[str] = None, hybrid: Optional[bool] = False, rrf: Optional[Union[dict, bool]] = True)[source]¶
Approximate retrieval strategy using the HNSW algorithm.
Methods
__init... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elasticsearch.ApproxRetrievalStrategy.html |
00b535d4daa5-1 | Create the mapping for the Elasticsearch index.
query(query_vector: Optional[List[float]], query: Optional[str], k: int, fetch_k: int, vector_query_field: str, text_field: str, filter: List[dict], similarity: Optional[DistanceStrategy]) → Dict[source]¶
Executes when a search is performed on the store.
Parameters
query_... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.elasticsearch.ApproxRetrievalStrategy.html |
8c1227208f52-0 | langchain.vectorstores.clarifai.Clarifai¶
class langchain.vectorstores.clarifai.Clarifai(user_id: Optional[str] = None, app_id: Optional[str] = None, pat: Optional[str] = None, number_of_docs: Optional[int] = None, api_base: Optional[str] = None)[source]¶
Clarifai AI vector store.
To use, you should have the clarifai p... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
8c1227208f52-1 | Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas, ids])
Add texts to the Clarifai vectorstore.
adelete([ids])
Delete by vector ID or other criteria.
afrom_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
afrom_texts(... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
8c1227208f52-2 | 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_search(query[, k])
Run similarity search using Clarifai.
similarity_search_by_vector(embedding[, k])
Retu... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
8c1227208f52-3 | 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.clarifai.Clarifai.html |
8c1227208f52-4 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
8c1227208f52-5 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
8c1227208f52-6 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
8c1227208f52-7 | documents (List[Document]) – List of documents to add.
pat (Optional[str]) – Personal access token. Defaults to None.
number_of_docs (Optional[int]) – Number of documents to return
None. (during vector search. Defaults to) –
api_base (Optional[str]) – API base. Defaults to None.
Returns
Clarifai vectorstore.
Return ty... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
8c1227208f52-8 | 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... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
8c1227208f52-9 | k – Number of Documents to return. Defaults to 4.
Returns
List of Documents most similar to the query and score for each
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 si... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.clarifai.Clarifai.html |
814fdc2c5c1f-0 | langchain.vectorstores.usearch.dependable_usearch_import¶
langchain.vectorstores.usearch.dependable_usearch_import() → Any[source]¶
Import usearch if available, otherwise raise error. | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.usearch.dependable_usearch_import.html |
4e51e8e9a98f-0 | langchain.vectorstores.redis.schema.FlatVectorField¶
class langchain.vectorstores.redis.schema.FlatVectorField[source]¶
Bases: RedisVectorField
Schema for flat vector fields in Redis.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parse... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.redis.schema.FlatVectorField.html |
4e51e8e9a98f-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, 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, ex... | lang/api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.redis.schema.FlatVectorField.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.