id
stringlengths
14
15
text
stringlengths
23
2.21k
source
stringlengths
52
97
72c4d1fb1040-0
ElasticSearch | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
72c4d1fb1040-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
72c4d1fb1040-2
https://username:password@es_host:9243. For example, to connect to Elastic Cloud, create the Elasticsearch URL with the required authentication details and pass it to the ElasticVectorSearch constructor as the named parameter elasticsearch_url.You can obtain your Elastic Cloud URL and login credentials by logging in to...
https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
72c4d1fb1040-3
https://username:password@cluster_id.region_id.gcp.cloud.es.io:9243.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://u...
https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
72c4d1fb1040-4
= "What did the president say about Ketanji Brown Jackson"docs = db.similarity_search(query)print(docs[0].page_content) In state after state, new laws have been passed, not only to suppress the vote, but to subvert entire elections. We cannot let this happen. Tonight. I call on the Senate to: Pass th...
https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
72c4d1fb1040-5
= "<index_name>"# input_field = "your_input_field" # if different from 'text_field'# Generate embedding objectembeddings = ElasticsearchEmbeddings.from_credentials( model_id, # input_field=input_field, es_cloud_id=es_cloud_id, es_user=es_user, es_password=es_password,)# Initialize ElasticKnnSearchknn_sea...
https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
72c4d1fb1040-6
search results for query '{query}': {hybrid_result}")print( f"The 'text' field value from the top hit is: '{hybrid_result['hits']['hits'][0]['_source']['text']}'")Test knn search using pre generated vector​# Generate embedding for testsquery_text = "Hello"query_embedding = embeddings.embed_query(query_text)print( ...
https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
72c4d1fb1040-7
Test `knn_search` method with model_id and query_textquery = "Hello"knn_result = knn_search.knn_search(query=query, model_id=model_id, k=2, fields=["text"])assert "text" in knn_result["hits"]["hits"][0]["fields"].keys()# Test `hybrid_search` methodquery = "Hello"hybrid_result = knn_search.knn_hybrid_search( query=qu...
https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
453d349ca215-0
Typesense | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/typesense
453d349ca215-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/typesense
453d349ca215-2
import Typesensefrom langchain.document_loaders import TextLoaderLet's import our test dataset:loader = TextLoader("../../../state_of_the_union.txt")documents = loader.load()text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)docs = text_splitter.split_documents(documents)embeddings = OpenAIEmbedding...
https://python.langchain.com/docs/integrations/vectorstores/typesense
5e906769f3b1-0
LanceDB | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/lancedb
5e906769f3b1-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/lancedb
5e906769f3b1-2
= OpenAIEmbeddings()import lancedbdb = lancedb.connect("/tmp/lancedb")table = db.create_table( "my_table", data=[ { "vector": embeddings.embed_query("Hello World"), "text": "Hello World", "id": "1", } ], mode="overwrite",)docsearch = LanceDB.from_documents(docu...
https://python.langchain.com/docs/integrations/vectorstores/lancedb
5e906769f3b1-3
not abandon our streets. Or choose between safety and equal justice. Let’s come together to protect our communities, restore trust, and hold law enforcement accountable. That’s why the Justice Department required body cameras, banned chokeholds, and restricted no-knock warrants for its officers. ...
https://python.langchain.com/docs/integrations/vectorstores/lancedb
5e906769f3b1-4
The most fundamental right in America is the right to vote – and to have it counted. And it’s under assault. In state after state, new laws have been passed, not only to suppress the vote, but to subvert entire elections. We cannot let this happen. Tonight. I call on the Senate to: Pass the ...
https://python.langchain.com/docs/integrations/vectorstores/lancedb
5e906769f3b1-5
secure the Border and fix the immigration system. We can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. We’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. We’re putting in place dedicat...
https://python.langchain.com/docs/integrations/vectorstores/lancedb
40fac49160a9-0
Azure Cognitive Search | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/azuresearch
40fac49160a9-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/azuresearch
40fac49160a9-2
= "azure"openai.api_base = "YOUR_OPENAI_ENDPOINT"openai.api_version = "2023-05-15"openai.api_key = "YOUR_OPENAI_API_KEY"model: str = "text-embedding-ada-002"Configure vector store settings​Set up the vector store settings using environment variables:vector_store_address: str = "YOUR_AZURE_SEARCH_ENDPOINT"vector_store...
https://python.langchain.com/docs/integrations/vectorstores/azuresearch
40fac49160a9-3
Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. Tonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer...
https://python.langchain.com/docs/integrations/vectorstores/azuresearch
40fac49160a9-4
One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s...
https://python.langchain.com/docs/integrations/vectorstores/azuresearch
a8b424a58e25-0
MongoDB Atlas | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/mongodb_atlas
a8b424a58e25-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/mongodb_atlas
a8b424a58e25-2
To get started head over to Atlas here: quick start.pip install pymongoimport osimport getpassMONGODB_ATLAS_CLUSTER_URI = getpass.getpass("MongoDB Atlas Cluster URI:")We want to use OpenAIEmbeddings so we need to set up our OpenAI API Key. os.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")Now, let's crea...
https://python.langchain.com/docs/integrations/vectorstores/mongodb_atlas
a8b424a58e25-3
You can name the index langchain_demo and create the index on the namespace lanchain_db.langchain_col. Finally, write the following definition in the JSON editor on MongoDB Atlas:{ "mappings": { "dynamic": true, "fields": { "embedding": { "dimensions": 1536, "similarity": "cosine", "typ...
https://python.langchain.com/docs/integrations/vectorstores/mongodb_atlas
a8b424a58e25-4
collection, OpenAIEmbeddings(), index_name=index_name)# perform a similarity search between a query and the ingested documentsquery = "What did the president say about Ketanji Brown Jackson"docs = vectorstore.similarity_search(query)print(docs[0].page_content)PreviousMilvusNextMyScaleCommunityDiscordTwitterGitHubPython...
https://python.langchain.com/docs/integrations/vectorstores/mongodb_atlas
822522377f3b-0
OpenSearch | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/opensearch
822522377f3b-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/opensearch
822522377f3b-2
Check this for more details.Installation​Install the Python client.pip install opensearch-pyWe want to use OpenAIEmbeddings so we have to get the OpenAI API Key.import osimport getpassos.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")from langchain.embeddings.openai import OpenAIEmbeddingsfrom langchai...
https://python.langchain.com/docs/integrations/vectorstores/opensearch
822522377f3b-3
OpenSearchVectorSearch.from_documents( docs, embeddings, opensearch_url="http://localhost:9200", engine="faiss", space_type="innerproduct", ef_construction=256, m=48,)query = "What did the president say about Ketanji Brown Jackson"docs = docsearch.similarity_search(query)print(docs[0].page_content)...
https://python.langchain.com/docs/integrations/vectorstores/opensearch
822522377f3b-4
you’d like to look up for some similar documents, but you’d also like to receive diverse results, MMR is method you should consider. Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents.query = "What did the president say about Ketanji Brown Jackson"docs = docsearch.ma...
https://python.langchain.com/docs/integrations/vectorstores/opensearch
576a3cc140f3-0
StarRocks | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-2
StarRocks is a next-gen sub-second MPP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics and ad-hoc query.Usually StarRocks is categorized into OLAP, and it has showed excellent performance in ClickBench — a Benchmark For Analytical DBMS. Since it has a super-fast vecto...
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-3
and there is docs directory in it.loader = DirectoryLoader( "./docs", glob="**/*.md", loader_cls=UnstructuredMarkdownLoader)documents = loader.load()Split docs into tokens, and set update_vectordb = True because there are new docs/tokens.# load text splitter and split docs into snippets of texttext_splitter = TokenT...
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-4
|\n | --------------- | ------------------------------------ |\n | main | starrocks/dev-env-centos7:latest |\n | branch-3.0 | starrocks/dev-env-centos7:3.0-latest |\n | branch-2.5 | starrocks/dev-env-centos7:2.5-latest |\n\nPrerequisites\n\nBefore compiling StarRocks, make sure the followin...
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-5
settings(host/port/user/pw/db)settings = StarRocksSettings()settings.port = 41003settings.host = "127.0.0.1"settings.username = "root"settings.password = ""settings.database = "zya"docsearch = gen_starrocks(update_vectordb, embeddings, settings)print(docsearch)update_vectordb = False Inserting data...:
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-6
100%|██████████████████████████████████████████████████████████████████████████████████████████████████â–
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-7
ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ|
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-8
2802/2802 [02:26<00:00, 19.11it/s] zya.langchain @ 127.0.0.1:41003 username: root Table Schema: ---------------------------------------------------------------------------- |name |type |key | --------------------------------------------...
https://python.langchain.com/docs/integrations/vectorstores/starrocks
576a3cc140f3-9
it​llm = OpenAI()qa = RetrievalQA.from_chain_type( llm=llm, chain_type="stuff", retriever=docsearch.as_retriever())query = "is profile enabled by default? if not, how to enable profile?"resp = qa.run(query)print(resp) No, profile is not enabled by default. To enable profile, set the variable `enable_profile` t...
https://python.langchain.com/docs/integrations/vectorstores/starrocks
5510abcc3dba-0
Chroma | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-2
then query it.# importfrom langchain.embeddings.sentence_transformer import SentenceTransformerEmbeddingsfrom langchain.text_splitter import CharacterTextSplitterfrom langchain.vectorstores import Chromafrom langchain.document_loaders import TextLoader# load the document and split it into chunksloader = TextLoader("../...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-3
you for your service. One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who wi...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-4
most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of ...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-5
can also run the Chroma Server in a Docker container separately, create a Client to connect to it, and then pass that to LangChain. Chroma has the ability to handle multiple Collections of documents, but the LangChain interface expects one, so we need to specify the collection name. The default collection name used by ...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-6
Supreme Court. And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.Update and Delete​While building toward a real application, you want to go beyond adding data, and a...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-7
I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \n\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army ve...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-8
Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. Tonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-9
Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../../state_of_the_union.txt'}), 1.1972057819366455)Retriever options​This section goes over different options for how to use Chroma as ...
https://python.langchain.com/docs/integrations/vectorstores/chroma
5510abcc3dba-10
sourceexample_db.get(where={"source": "some_other_source"}) {'ids': [], 'embeddings': None, 'metadatas': [], 'documents': []}PreviousCassandraNextClarifaiBasic ExampleBasic Example (including saving to disk)Passing a Chroma Client into LangchainBasic Example (using the Docker Container)Update and DeleteUse OpenAI Em...
https://python.langchain.com/docs/integrations/vectorstores/chroma
f37ff2935787-0
pg_embedding | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/pgembedding
f37ff2935787-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/pgembedding
f37ff2935787-2
import OpenAIEmbeddingsfrom langchain.text_splitter import CharacterTextSplitterfrom langchain.vectorstores import PGEmbeddingfrom langchain.document_loaders import TextLoaderfrom langchain.docstore.document import Documentos.environ["DATABASE_URL"] = getpass.getpass("Database Url:") Database Url:········loa...
https://python.langchain.com/docs/integrations/vectorstores/pgembedding
f37ff2935787-3
index for approximate nearest neighbor (ANN) search to speed up similarity_search_with_score execution time. To create the HNSW index on your vector column, use a create_hnsw_index function:PGEmbedding.create_hnsw_index( max_elements=10000, dims=1536, m=8, ef_construction=16, ef_search=16)The function above is equiv...
https://python.langchain.com/docs/integrations/vectorstores/pgembedding
f37ff2935787-4
The following additional index options are supported:efConstruction: Defines the number of nearest neighbors considered during index construction. The default value is 32.efsearch: Defines the number of nearest neighbors considered during index search. The default value is 32. For information about how you can configur...
https://python.langchain.com/docs/integrations/vectorstores/pgembedding
638b192b4582-0
Weaviate | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-2
(from weaviate-client) (0.20.0) Requirement already satisfied: tqdm<5.0.0,>=4.59.0 in /workspaces/langchain/.venv/lib/python3.9/site-packages (from weaviate-client) (4.65.0) Requirement already satisfied: authlib>=1.1.0 in /workspaces/langchain/.venv/lib/python3.9/site-packages (from weaviate-client) (1.2.0) R...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-3
requests<2.29.0,>=2.28.0->weaviate-client) (2023.5.7) Requirement already satisfied: decorator>=3.4.0 in /workspaces/langchain/.venv/lib/python3.9/site-packages (from validators<=0.21.0,>=0.18.2->weaviate-client) (5.1.1) Requirement already satisfied: cffi>=1.12 in /workspaces/langchain/.venv/lib/python3.9/site-p...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-4
= text_splitter.split_documents(documents)embeddings = OpenAIEmbeddings()db = Weaviate.from_documents(docs, embeddings, weaviate_url=WEAVIATE_URL, by_text=False)query = "What did the president say about Ketanji Brown Jackson"docs = db.similarity_search(query)print(docs[0].page_content) Tonight. I call on the Senate ...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-5
The returned distance score is cosine distance. Therefore, a lower score is better.docs = db.similarity_search_with_score(query, by_text=False)docs[0] (Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disc...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-6
-0.029978717, 0.011555385, 0.0009751897, 0.014675993, -0.02102166, 0.0301354, -0.031754456, 0.013526983, -0.03392191, 0.002800712, -0.0027778621, -0.024259781, -0.006202043, -0.019950991, 0.0176138, -0.0001134321, 0.008343379, 0.034209162, -0.027654583, 0.03149332, -0.0008389079, 0.0053696632, -0.0024644958, -0.0165823...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-7
0.040868197, -0.010909067, -0.03339963, 0.010954766, -0.014689049, -0.021596165, 0.0025607906, -0.01599474, -0.017757427, -0.0041651614, 0.010752384, 0.0053598704, -0.00019248774, 0.008480477, -0.010517359, -0.005017126, 0.0020434097, 0.011699011, 0.0051379027, 0.021687564, -0.010830725, 0.020734407, -0.006606808, 0.02...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-8
-0.015185213, 0.010719741, -0.014636821, 0.0001918757, 0.011783881, 0.0036330915, -0.02132197, 0.0031010215, 0.0024334856, -0.0033229894, 0.050086394, 0.0031973163, -0.01115062, 0.004837593, 0.01298512, -0.018645298, -0.02992649, 0.004837593, 0.0067634913, 0.02992649, 0.0145062525, 0.00566018, -0.0017055618, -0.0056667...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-9
0.0004859627, 0.018828096, 0.012906778, 0.027941836, 0.027550127, -0.015028529, 0.018606128, 0.03449641, -0.017757427, -0.016020855, -0.012142947, 0.025304336, 0.00821281, -0.0025461016, -0.01902395, -0.635507, -0.030083172, 0.0177052, -0.0104912445, 0.012502013, -0.0010747487, 0.00465806, 0.020825805, -0.006887532, 0....
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-10
-0.0028251936, 0.035932675, -0.02183119, -0.008611047, 0.025121538, 0.008349908, 0.00035641342, 0.009028868, 0.007631777, -0.01298512, -0.0015350056, 0.009982024, -0.024207553, -0.003332782, 0.006283649, 0.01868447, -0.010732798, -0.00876773, -0.0075273216, -0.016530076, 0.018175248, 0.016020855, -0.00067284, 0.0134616...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-11
0.0037767177, 0.018997835, -0.026766712, 0.005026919, 0.015942514, 0.0097469995, -0.0067830766, 0.023828901, -0.01523744, -0.0121494755, 0.00744898, 0.010445545, -0.011006993, -0.0032789223, 0.020394927, -0.017796598, -0.0029116957, 0.02318911, -0.031754456, -0.018188305, -0.031441092, -0.030579336, 0.0011832844, 0.006...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-12
0.011894866, -0.03658552, 0.007266183, -0.015172156, -0.02038187, -0.033739112, 0.0018948873, -0.011379116, -0.0020923733, -0.014075373, 0.01970291, 0.0020352493, -0.0075273216, -0.02136114, 0.0027974476, -0.009577259, -0.023815846, 0.024847344, 0.014675993, -0.019454828, -0.013670608, 0.011059221, -0.005438212, 0.0406...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-13
-0.0045699263, -0.010112594, 0.009237779, 0.008728559, 0.0423828, 0.010909067, 0.04225223, -0.031806685, -0.013696723, -0.025787441, 0.00838255, -0.008715502, 0.006776548, 0.01825359, -0.014480138, -0.014427911, -0.017600743, -0.030004831, 0.0145845935, 0.013762007, -0.013226673, 0.004168425, 0.0047951583, -0.026923396...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-14
-0.00024318536, -0.007011573, -0.002746852, -0.004298995, 0.007710119, 0.03407859, -0.008898299, -0.008565348, 0.030527107, -0.0003027576, 0.025082368, 0.0405026, 0.03867463, 0.0014117807, -0.024076983, 0.003933401, -0.009812284, 0.00829768, -0.0074293944, 0.0061530797, -0.016647588, -0.008147526, -0.015629148, 0.02055...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-15
-0.0152504975, -0.0111114485, 0.032355078, 0.0025542623, -0.0030226798, -0.00074261305, 0.030892702, -0.026218321, 0.0062803845, -0.018031623, -0.021504767, -0.012834964, 0.009009283, -0.0029198565, -0.014349569, -0.020434098, 0.009838398, -0.005993132, -0.013618381, -0.031597774, -0.019206747, 0.00086583785, 0.1583544...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-16
-0.004073763, 0.0032544404, -0.0025983294, -0.020943318, 0.019650683, -0.0074424515, -0.0030977572, 0.0073379963, -0.00012455089, 0.010230106, -0.0007254758, -0.0025052987, -0.009681715, 0.03439196, -0.035123147, -0.0028806855, 0.012828437, 0.00018646932, 0.0066133365, 0.025539361, -0.00055736775, -0.025356563, -0.0045...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-17
0.0069789304, -0.010993936, -0.0009066408, 0.0002619547, 0.01727432, -0.008082241, -0.018645298, 0.024507863, 0.0030895968, -0.0014656406, 0.011137563, -0.025513247, -0.022967143, -0.002033617, 0.006887532, 0.016621474, -0.019337315, -0.0030618508, 0.0014697209, -0.011679426, -0.003597185, -0.0049844836, -0.012332273, ...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-18
-0.005412098, -0.013076518, 0.027080078, 0.012900249, -0.0073379963, -0.015119928, -0.019781252, 0.0062346854, -0.03266844, 0.025278222, -0.022797402, -0.0028415148, 0.021452539, -0.023162996, 0.005170545, -0.022314297, 0.011215905, -0.009838398, -0.00033233972, 0.0019650683, 0.0026326037, 0.009753528, -0.0029639236, 0...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-19
0.022914914, -0.0018981516, 0.031545546, -0.01051083, 0.013801178, -0.006296706, -0.00025052988, -0.01795328, -0.026296662, 0.0017659501, 0.021883417, 0.0028937424, 0.00495837, -0.011888337, -0.008950527, -0.012058077, 0.020316586, 0.00804307, -0.0068483613, -0.0038387382, 0.019715967, -0.025069311, -0.000797697, -0.04...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-20
-0.033843566, 0.00020187242, 0.002650557, -0.0015113399, 0.021570051, -0.008284623, -0.003793039, -0.013422526, -0.009655601, -0.0016614947, -0.02388113, 0.00114901, 0.0034405016, 0.02796795, -0.039118566, 0.0023975791, -0.010608757, 0.00093438674, 0.0017382042, -0.02047327, 0.026283605, -0.020799693, 0.005947433, -0.0...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-21
0.016621474, -0.01340947, 0.03219839, 0.032955695, -0.021517823, 0.00372449, -0.045124754, 0.015589978, -0.033582427, -0.01642562, -0.009609901, -0.031179955, 0.0012591778, -0.011176733, -0.018658355, -0.015224383, 0.014884903, 0.013083046, 0.0063587264, -0.008238924, -0.008917884, -0.003877909, 0.022836573, -0.0043740...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-22
-0.008310737, -0.020786636, -0.022484036, 0.011411758, 0.005826656, 0.012188647, -0.020394927, -0.0013024289, -0.027315103, -0.017000126, -0.0010600596, -0.0019014158, 0.016712872, 0.0012673384, 0.02966535, 0.02911696, -0.03081436, 0.025552418, 0.0014215735, -0.02510848, 0.020277414, -0.02672754, 0.01829276, 0.03381745...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-23
0.02442952, 0.012802322, -0.032276735, 0.0029802448, 0.014179829, 0.010321504, 0.0053337566, -0.017156808, -0.010439017, 0.034444187, -0.010393318, -0.006042096, -0.018566957, 0.004517698, -0.011228961, -0.009015812, -0.02089109, 0.022484036, 0.0029867734, -0.029064732, -0.010236635, -0.0006761042, -0.029038617, 0.0043...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-24
-0.034783665, -0.015028529, 0.0097469995, 0.016281994, 0.0047135525, -0.011294246, 0.011477043, 0.015485522, 0.03426139, 0.014323455, 0.011052692, -0.008362965, -0.037969556, -0.00252162, -0.013709779, -0.0030292084, -0.016569246, -0.013879519, 0.0011849166, -0.0016925049, 0.009753528, 0.008349908, -0.008245452, 0.0330...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-25
-0.00459604, -0.011999321, -0.028202975, -0.018593071, 0.029743692, 0.021857304, 0.01438874, 0.00014128008, -0.006156344, -0.006691678, 0.01672593, -0.012821908, -0.0024367499, -0.03219839, 0.0058233915, -0.0056405943, -0.009381405, 0.0064044255, 0.013905633, -0.011228961, -0.0013481282, -0.014023146, 0.00016239559, -0...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-26
0.0011522742, -0.020773578, -0.011777353, 0.008173639, -0.012325744, -0.021348083, 0.0036461484, 0.0063228197, 0.00028970066, -0.0036200345, -0.021596165, -0.003949722, -0.0006034751, 0.007305354, -0.023424136, 0.004834329, -0.008833014, -0.013435584, 0.0026097542, -0.0012240873, -0.0028349862, -0.01706541, 0.027863493...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-27
0.017417947, -0.034835894, -0.009159437, -0.0018573486, -0.0024840813, -0.022444865, 0.0055687814, 0.0037767177, 0.0033915383, 0.0301354, -0.012227817, 0.0021854038, -0.042878963, 0.021517823, -0.010419431, -0.0051183174, 0.01659536, 0.0017333078, -0.00727924, -0.0020026069, -0.0012493852, 0.031441092, 0.0017431005, 0....
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-28
0.004971427, -0.017835768, 0.025017083, -0.021792019, 0.013657551, -0.01872364, 0.009100681, -0.0079582, -0.011640254, -0.01093518, -0.0147543335, -0.005000805, 0.02345025, -0.028908048, 0.0104912445, -0.00753385, 0.017561574, -0.012025435, 0.042670052, -0.0041978033, 0.0013056932, -0.009263893, -0.010941708, -0.004471...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-29
-0.0068940604, -0.0014990991, 0.013305014, -0.007690533, 0.058808424, -0.0016859764, -0.0044622063, -0.0037734534, 0.01578583, -0.0018459238, -0.1196015, -0.0007075225, 0.0030341048, 0.012306159, -0.0068483613, 0.01851473, 0.015315781, 0.031388864, -0.015563863, 0.04776226, -0.008199753, -0.02591801, 0.00546759, -0.004...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-30
0.015433294, -0.0056144805, -0.0034927295, -0.00043455104, 0.008611047, 0.025748271, 0.022353467, -0.020747464, -0.015759716, 0.029038617, -0.000377631, -0.028725252, 0.018109964, -0.0016125311, -0.022719061, -0.009133324, -0.033060152, 0.011248547, -0.0019797573, -0.007181313, 0.0018867267, 0.0070899143, 0.004077027, ...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-31
0.011170205, -0.005412098, -0.016321165, 0.009929797, 0.004609097, -0.03047488, 0.002688096, -0.07264877, 0.024455635, -0.020930262, -0.015381066, -0.0033148287, 0.027236762, 0.0014501355, -0.014101488, -0.024076983, 0.026218321, -0.009009283, 0.019624569, 0.0020646274, -0.009081096, -0.01565526, -0.003358896, 0.048571...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-32
0.0075534354, -0.00061612396, -0.002018928, -0.004432828, -0.032746784, 0.025513247, -0.0025852725, 0.014467081, -0.008617575, -0.019755138, 0.003966043, -0.0033915383, 0.0004088452, -0.025173767, 0.02796795, 0.0023763615, 0.0052358294, 0.017796598, 0.014806561, 0.0150024155, -0.005859298, 0.01259994, 0.021726735, -0.0...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-33
-0.0019797573, -0.013383356, -0.002706049, 0.0037734534, 0.020394927, -0.00021931567, 0.0041814824, 0.025121538, -0.036246043, -0.019428715, -0.023802789, 0.014845733, 0.015420238, 0.019650683, 0.008186696, 0.025304336, -0.03204171, 0.01774437, 0.0021233836, -0.008434778, -0.0059441687, 0.038335152, 0.022653777, -0.006...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-34
-0.0038322096, -0.012462842, -0.03655941, 0.0013946436, 0.00025726235, 0.008016956, -0.0042565595, 0.008447835, 0.0038191527, -0.014702106, 0.02196176, 0.0052097156, -0.010869896, 0.0051640165, 0.030840475, -0.041468814, 0.009250836, -0.018997835, 0.020107675, 0.008421721, -0.016373392, 0.004602568, 0.0327729, -0.00812...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-35
to using similarity search in the retriever object, you can also use mmr.retriever = db.as_retriever(search_type="mmr")retriever.get_relevant_documents(query)[0] Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pas...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
638b192b4582-36
= Weaviate.from_texts( texts, embeddings, weaviate_url=WEAVIATE_URL, by_text=False, metadatas=[{"source": f"{i}-pl"} for i in range(len(texts))],)chain = RetrievalQAWithSourcesChain.from_chain_type( OpenAI(temperature=0), chain_type="stuff", retriever=docsearch.as_retriever())chain( {"question": "W...
https://python.langchain.com/docs/integrations/vectorstores/weaviate
e4fa732f8a3d-0
Annoy | 🦜�🔗 Langchain
https://python.langchain.com/docs/integrations/vectorstores/annoy
e4fa732f8a3d-1
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesAlibaba Cloud OpenSearchAnalyticDBAnnoyAtlasAwaDBAzure Cognitive SearchCassandraChrom...
https://python.langchain.com/docs/integrations/vectorstores/annoy
e4fa732f8a3d-2
metric is angularvector_store = Annoy.from_texts(texts, embeddings_func)# allows for custom annoy parameters, defaults are n_trees=100, n_jobs=-1, metric="angular"vector_store_v2 = Annoy.from_texts( texts, embeddings_func, metric="dot", n_trees=100, n_jobs=1)vector_store.similarity_search("food", k=3) [Document(p...
https://python.langchain.com/docs/integrations/vectorstores/annoy
e4fa732f8a3d-3
meet as Democrats Republicans and Independents. But most importantly as Americans. \n\nWith a duty to one another to the American people to the Constitution. \n\nAnd with an unwavering resolve that freedom will always triumph over tyranny. \n\nSix days ago, Russia’s Vladimir Putin sought to shake the foundations of t...
https://python.langchain.com/docs/integrations/vectorstores/annoy
e4fa732f8a3d-4
United States is a member along with 29 other nations. \n\nIt matters. American diplomacy matters. American resolve matters.', metadata={'source': '../../../state_of_the_union.txt'}), Document(page_content='Putin’s latest attack on Ukraine was premeditated and unprovoked. \n\nHe rejected repeated efforts at diplo...
https://python.langchain.com/docs/integrations/vectorstores/annoy