id
stringlengths
14
16
text
stringlengths
36
2.73k
source
stringlengths
49
117
ad94a4cb454e-2
We cannot let this happen. 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: Justi...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/elasticsearch.html
d944bd2543ae-0
.ipynb .pdf LanceDB LanceDB# LanceDB is an open-source database for vector-search built with persistent storage, which greatly simplifies retrevial, filtering and management of embeddings. Fully open source. This notebook shows how to use functionality related to the LanceDB vector database based on the Lance data form...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/lanecdb.html
d944bd2543ae-1
I spoke with their families and told them that we are forever in debt for their sacrifice, and we will carry on their mission to restore the trust and safety every community deserves. I’ve worked on these issues a long time. I know what works: Investing in crime preventionand community police officers who’ll walk the...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/lanecdb.html
d944bd2543ae-2
These laws don’t infringe on the Second Amendment. They save lives. 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. ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/lanecdb.html
d944bd2543ae-3
We’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. We’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. previous FAISS next Milvus By Harrison Chase © Copyright 2023, Harrison Chase. L...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/lanecdb.html
bff769df3e49-0
.ipynb .pdf Chroma Contents Similarity search with score Persistance Initialize PeristedChromaDB Persist the Database Load the Database from disk, and create the chain Retriever options MMR Chroma# Chroma is a database for building AI applications with embeddings. This notebook shows how to use functionality related ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/chroma.html
bff769df3e49-1
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 States Supreme Court. Justice Breyer, thank you for your service. One of the most serious constitutional responsibilities a President h...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/chroma.html
bff769df3e49-2
The below steps cover how to persist a ChromaDB instance Initialize PeristedChromaDB# Create embeddings for each chunk and insert into the Chroma vector database. The persist_directory argument tells ChromaDB where to store the database when it’s persisted. # Embed and store the texts # Supplying a persist_directory wi...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/chroma.html
bff769df3e49-3
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, pass the Disclose Act so Americans can know who is funding our elections. \n\nTonight, I’d like to honor someone who has dedica...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/chroma.html
d91c2e832e66-0
.ipynb .pdf Qdrant Contents Connecting to Qdrant from LangChain Local mode In-memory On-disk storage On-premise server deployment Qdrant Cloud Reusing the same collection Similarity search Similarity search with score Maximum marginal relevance search (MMR) Qdrant as a Retriever Customizing Qdrant Qdrant# Qdrant (rea...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/qdrant.html
d91c2e832e66-1
docs = text_splitter.split_documents(documents) embeddings = OpenAIEmbeddings() Connecting to Qdrant from LangChain# Local mode# Python client allows you to run the same code in local mode without running the Qdrant server. That’s great for testing things out and debugging or if you plan to store just a small amount of...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/qdrant.html
d91c2e832e66-2
collection_name="my_documents", ) Qdrant Cloud# If you prefer not to keep yourself busy with managing the infrastructure, you can choose to set up a fully-managed Qdrant cluster on Qdrant Cloud. There is a free forever 1GB cluster included for trying out. The main difference with using a managed version of Qdrant is th...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/qdrant.html
d91c2e832e66-3
found_docs = qdrant.similarity_search(query) print(found_docs[0].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 Disclose Act so Americans can know who is funding our elections. Tonight, I’d like to honor someone who ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/qdrant.html
d91c2e832e66-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 legacy of ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/qdrant.html
d91c2e832e66-5
2. We can’t change how divided we’ve been. But we can change how we move forward—on COVID-19 and other issues we must face together. I recently visited the New York City Police Department days after the funerals of Officer Wilbert Mora and his partner, Officer Jason Rivera. They were responding to a 9-1-1 call when a...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/qdrant.html
d91c2e832e66-6
query = "What did the president say about Ketanji Brown Jackson" 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, pass the Disclose Act so Americans can know who is funding our...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/qdrant.html
d91c2e832e66-7
location=":memory:", collection_name="my_documents_2", content_payload_key="my_page_content_key", metadata_payload_key="my_meta", ) <langchain.vectorstores.qdrant.Qdrant at 0x7fc4e2baa230> previous Pinecone next Redis Contents Connecting to Qdrant from LangChain Local mode In-memory On-disk storage On-p...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/qdrant.html
dda5b16c6113-0
.ipynb .pdf Supabase (Postgres) Contents Similarity search with score Retriever options Maximal Marginal Relevance Searches Supabase (Postgres)# Supabase is an open source Firebase alternative. Supabase is built on top of PostgreSQL, which offers strong SQL querying capabilities and enables a simple interface with al...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/supabase.html
dda5b16c6113-1
SELECT id, content, metadata, embedding, 1 -(documents.embedding <=> query_embedding) AS similarity FROM documents ORDER BY documents.embedding <=> query_embedding LIMIT match_count;...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/supabase.html
dda5b16c6113-2
docs = text_splitter.split_documents(documents) embeddings = OpenAIEmbeddings() # We're using the default `documents` table here. You can modify this by passing in a `table_name` argument to the `from_documents` method. vector_store = SupabaseVectorStore.from_documents( docs, embeddings, client=supabase ) query = "...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/supabase.html
dda5b16c6113-3
matched_docs = vector_store.similarity_search_with_relevance_scores(query) matched_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 Disclose Act so Americans can know who is funding our elections. \n\n...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/supabase.html
dda5b16c6113-4
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 States Supreme Court. Justice Breyer, thank you for your service. One of the most serious constitutional responsibilities a President h...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/supabase.html
dda5b16c6113-5
## Document 2 And I’m taking robust action to make sure the pain of our sanctions is targeted at Russia’s economy. And I will use every tool at our disposal to protect American businesses and consumers. Tonight, I can announce that the United States has worked with 30 other countries to release 60 Million barrels of ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/supabase.html
dda5b16c6113-6
I’ve worked on these issues a long time. I know what works: Investing in crime preventionand community police officers who’ll walk the beat, who’ll know the neighborhood, and who can restore trust and safety. previous Redis next Tair Contents Similarity search with score Retriever options Maximal Marginal Relevanc...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/supabase.html
c5173d4a7ae7-0
.ipynb .pdf Vectara Contents Connecting to Vectara from LangChain Similarity search Similarity search with score Vectara as a Retriever Vectara# Vectara is a API platform for building LLM-powered applications. It provides a simple to use API for document indexing and query that is managed by Vectara and is optimized ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/vectara.html
c5173d4a7ae7-1
found_docs = vectara.similarity_search(query) print(found_docs[0].page_content) 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 States Supreme Court. Justice Breyer, thank you for your...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/vectara.html
c5173d4a7ae7-2
Score: 1.0046461 Vectara as a Retriever# Vectara, as all the other vector stores, is a LangChain Retriever, by using cosine similarity. retriever = vectara.as_retriever() retriever VectorStoreRetriever(vectorstore=<langchain.vectorstores.vectara.Vectara object at 0x156d3e830>, search_type='similarity', search_kwargs={}...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/vectara.html
74a776cf1847-0
.ipynb .pdf FAISS Contents Similarity Search with score Saving and loading Merging FAISS# Facebook AI Similarity Search (Faiss) is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. I...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/faiss.html
74a776cf1847-1
docs = db.similarity_search(query) print(docs[0].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 Disclose Act so Americans can know who is funding our elections. Tonight, I’d like to honor someone who has dedicated hi...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/faiss.html
74a776cf1847-2
docs_and_scores = db.similarity_search_with_score(query) docs_and_scores[0] (Document(page_content='In state after state, new laws have been passed, not only to suppress the vote, but to subvert entire elections. \n\nWe cannot let this happen. \n\nTonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/faiss.html
74a776cf1847-3
docs = new_db.similarity_search(query) docs[0] Document(page_content='In state after state, new laws have been passed, not only to suppress the vote, but to subvert entire elections. \n\nWe cannot let this happen. \n\nTonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act....
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/faiss.html
74a776cf1847-4
db1.merge_from(db2) db1.docstore._dict {'e0b74348-6c93-4893-8764-943139ec1d17': Document(page_content='foo', lookup_str='', metadata={}, lookup_index=0), 'd5211050-c777-493d-8825-4800e74cfdb6': Document(page_content='bar', lookup_str='', metadata={}, lookup_index=0)} previous ElasticSearch next LanceDB Contents Si...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/faiss.html
e5564f864a6f-0
.ipynb .pdf Typesense Contents Similarity Search Typesense as a Retriever Typesense# Typesense is an open source, in-memory search engine, that you can either self-host or run on Typesense Cloud. Typesense focuses on performance by storing the entire index in RAM (with a backup on disk) and also focuses on providing ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/typesense.html
e5564f864a6f-1
'typesense_api_key': 'xyz', 'typesense_collection_name': 'lang-chain' }) Similarity Search# query = "What did the president say about Ketanji Brown Jackson" found_docs = docsearch.similarity_search(query) print(found_docs[0].page_content) Typ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/typesense.html
804cf71f8022-0
.ipynb .pdf Tair Tair# Tair is a cloud native in-memory database service developed by Alibaba Cloud. It provides rich data models and enterprise-grade capabilities to support your real-time online scenarios while maintaining full compatibility with open source Redis. Tair also introduces persistent memory-optimized ins...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/tair.html
804cf71f8022-1
docs = vector_store.similarity_search(query) docs[0] Document(page_content='We’re going after the criminals who stole billions in relief money meant for small businesses and millions of Americans. \n\nAnd tonight, I’m announcing that the Justice Department will name a chief prosecutor for pandemic fraud. \n\nBy the en...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/tair.html
e3526b55a3c0-0
.ipynb .pdf DocArrayHnswSearch Contents Setup Using DocArrayHnswSearch Similarity search Similarity search with score DocArrayHnswSearch# DocArrayHnswSearch is a lightweight Document Index implementation provided by Docarray that runs fully locally and is best suited for small- to medium-sized datasets. It stores vec...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/docarray_hnsw.html
e3526b55a3c0-1
docs = db.similarity_search(query) print(docs[0].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 Disclose Act so Americans can know who is funding our elections. Tonight, I’d like to honor someone who has dedicated hi...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/docarray_hnsw.html
e3526b55a3c0-2
0.36962226) import shutil # delete the dir shutil.rmtree('hnswlib_store') previous Deep Lake next DocArrayInMemorySearch Contents Setup Using DocArrayHnswSearch Similarity search Similarity search with score By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023.
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/docarray_hnsw.html
3f792c3e29cc-0
.ipynb .pdf Weaviate Contents Weaviate Similarity search with score Persistance Retriever options Retriever options MMR Question Answering with Sources Weaviate# Weaviate is an open-source vector database. It allows you to store data objects and vector embeddings from your favorite ML-models, and scale seamlessly int...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-1
Requirement already satisfied: charset-normalizer<4,>=2 in /workspaces/langchain/.venv/lib/python3.9/site-packages (from requests<2.29.0,>=2.28.0->weaviate-client) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in /workspaces/langchain/.venv/lib/python3.9/site-packages (from requests<2.29.0,>=2.28.0->weaviate-clie...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-2
Requirement already satisfied: pycparser in /workspaces/langchain/.venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.2->authlib>=1.1.0->weaviate-client) (2.21) We want to use OpenAIEmbeddings so we have to get the OpenAI API Key. import os import getpass os.environ["OPENAI_API_KEY"] = getpass.getpass("...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-3
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 States Supreme Court. Justice Breyer, thank you for your service. One of the most serious constitutional responsibilities a President h...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-4
(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 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: Justic...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-5
0.0080104275, -0.0010217049, -0.022327352, -0.0055002323, 0.018958665, 0.0020548347, -0.0044393567, -0.021609223, -0.013709779, -0.004543812, 0.025722157, 0.01821442, 0.031728342, -0.031388864, -0.01051083, -0.029978717, 0.011555385, 0.0009751897, 0.014675993, -0.02102166, 0.0301354, -0.031754456, 0.013526983, -0.03392...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-6
-0.0063293483, -0.01081114, -0.0084282495, 0.003025944, -0.010210521, 0.008780787, 0.014793505, -0.006486031, 0.011966679, 0.01774437, -0.006985459, -0.015459408, 0.01625588, -0.016007798, 0.01706541, 0.035567082, 0.0029900377, 0.021543937, -0.0068483613, 0.040868197, -0.010909067, -0.03339963, 0.010954766, -0.01468904...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-7
-0.0318328, -0.0094989175, -0.00897664, 0.004736402, 0.0046482678, 0.0023241339, -0.005826656, 0.0072531262, 0.015498579, -0.0077819317, -0.011953622, -0.028934162, -0.033974137, -0.01574666, 0.0086306315, -0.029299757, 0.030213742, -0.0033148287, 0.013448641, -0.013474754, 0.015851116, 0.0076578907, -0.037421167, -0.0...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-8
-0.007559964, -0.01991182, -0.005268472, -0.008650217, -0.008702445, 0.027550127, 0.0018296026, 0.0018589807, -0.033295177, 0.0036265631, -0.0060290387, 0.014349569, 0.019898765, 0.00023339267, 0.0034568228, -0.018958665, 0.012031963, 0.005186866, 0.020747464, -0.03817847, 0.028202975, -0.01340947, 0.00091643346, 0.014...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-9
0.013892576, -0.019977106, 0.029952602, 0.0012004217, -0.015211326, -0.008708973, -0.017809656, 0.008578404, -0.01612531, 0.022614606, -0.022327352, -0.032616217, 0.0050693536, -0.020629952, -0.01357921, 0.011477043, 0.0013938275, -0.0052390937, 0.0142581705, -0.013200559, 0.013252786, -0.033582427, 0.030579336, -0.011...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-10
0.016020855, -0.00067284, 0.013461698, -0.0065904865, -0.017809656, -0.014741276, 0.016582303, -0.0088526, 0.0046482678, 0.037473395, -0.02237958, 0.010112594, 0.022549322, 9.680491e-05, -0.0059082615, 0.020747464, -0.026923396, 0.01162067, -0.0074816225, 0.00024277734, 0.011842638, 0.016921783, -0.019285088, 0.0055655...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-11
0.02318911, -0.031754456, -0.018188305, -0.031441092, -0.030579336, 0.0011832844, 0.0065023527, -0.027053965, 0.009198609, 0.022079272, -0.027785152, 0.005846241, 0.013500868, 0.016699815, 0.010445545, -0.025265165, -0.004396922, 0.0076774764, 0.014597651, -0.009851455, -0.03637661, 0.0004745379, -0.010112594, -0.00920...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-12
0.0027974476, -0.009577259, -0.023815846, 0.024847344, 0.014675993, -0.019454828, -0.013670608, 0.011059221, -0.005438212, 0.0406854, 0.0006218364, -0.024494806, -0.041259903, 0.022013986, -0.0040019494, -0.0052097156, 0.015798887, 0.016190596, 0.0003794671, -0.017444061, 0.012325744, 0.024769, 0.029482553, -0.00465479...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-13
-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, 0.014675993, 0.0055851024, 0.015616091, -0.012306159, 0.007670948, 0.038439605, -0.015759716, 0.00016178355, 0.01076544, -0.008232395, -0.00994...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-14
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.02055161, 0.000504324, 0.03157166, 0.010112594, -0.009009283, 0.026557801, -0.013997031, -0.0071878415, 0.009414048,...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-15
-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.15835446, 0.033765227, 0.00893747, 0.015119928, -0.019128405, 0....
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-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/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-17
0.011333417, -0.011548856, -0.0059049972, -0.025186824, 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, -...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-18
0.005947433, 0.020799693, 0.014702106, 0.03272067, 0.026701428, -0.015550806, -0.036193814, -0.021126116, -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.02231...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-19
-0.01357921, -0.01110492, -0.014845733, -0.035384286, -0.02550019, 0.008154054, -0.0058331843, -0.008702445, -0.007311882, -0.006525202, 0.03817847, 0.00372449, 0.022914914, -0.0018981516, 0.031545546, -0.01051083, 0.013801178, -0.006296706, -0.00025052988, -0.01795328, -0.026296662, 0.0017659501, 0.021883417, 0.002893...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-20
0.02277129, -0.006972402, -0.029769806, 0.034862008, 0.01217559, -0.0037179615, 0.0008666539, 0.008924413, -0.026296662, -0.012678281, 0.014480138, 0.020734407, -0.012103776, -0.037499506, 0.022131499, 0.015028529, -0.033843566, 0.00020187242, 0.002650557, -0.0015113399, 0.021570051, -0.008284623, -0.003793039, -0.0134...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-21
-0.002678303, -0.0047984226, -0.012182118, -0.001512972, 0.013931747, -0.009642544, 0.012652168, -0.012932892, -0.027759038, -0.01085031, 0.0050236546, -0.009675186, -0.00893747, -0.0051770736, 0.036011018, 0.003528636, -0.001008648, -0.015811944, -0.008865656, 0.012364916, 0.016621474, -0.01340947, 0.03219839, 0.03295...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-22
-0.025095424, -0.010621814, 0.013207087, 0.013944804, -0.0070899143, -0.022183727, -0.0028088724, -0.011424815, 0.026087752, -0.0058625625, -0.020186016, -0.010217049, 0.015315781, -0.012580355, 0.01374895, 0.004948577, -0.0021854038, 0.023215225, 0.00207442, 0.029639237, 0.01391869, -0.015811944, -0.005356606, -0.0223...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-23
-0.013957861, 0.0049094064, 0.033556316, 0.005167281, 0.0176138, 0.014140658, -0.0043708077, -0.0095446175, 0.012952477, 0.007853745, -0.01034109, 0.01804468, 0.0038322096, -0.04959023, 0.0023078127, 0.0053794556, -0.015106871, -0.03225062, -0.010073422, 0.007285768, 0.0056079524, -0.009002754, -0.014362626, 0.01090906...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-24
-0.0006761042, -0.029038617, 0.004367544, -0.012293102, 0.0017528932, -0.023358852, 0.02217067, 0.012606468, -0.008160583, -0.0104912445, -0.0034894652, 0.011078807, 0.00050922035, 0.015759716, 0.23774062, -0.0019291617, 0.006218364, 0.013762007, -0.029900376, 0.018188305, 0.0092965355, 0.0040574414, -0.014976301, -0.0...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-25
-0.013879519, 0.0011849166, -0.0016925049, 0.009753528, 0.008349908, -0.008245452, 0.033007924, -0.0035873922, -0.025461018, 0.016791213, 0.05410793, -0.005950697, -0.011672897, -0.0072335405, 0.013814235, -0.0593307, -0.008624103, 0.021400312, 0.034235276, 0.015642203, -0.020068504, 0.03136275, 0.012567298, -0.0104194...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-26
-0.03219839, 0.0058233915, -0.0056405943, -0.009381405, 0.0064044255, 0.013905633, -0.011228961, -0.0013481282, -0.014023146, 0.00016239559, -0.0051901303, 0.0025265163, 0.023619989, -0.021517823, 0.024703717, -0.025643816, 0.040189236, 0.016295051, -0.0040411204, -0.0113595305, 0.0029981981, -0.015589978, 0.026479458,...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-27
-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, -0.026414175, -0.011783881, 0.014075373, -0.005634066, -0.006313027, -0.004638475, -0.012495484, 0.022836573, -0.022719061, ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-28
-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.008702445, -0.0072335405, -0.020081561, -0.012423672, -0...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-29
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/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-30
0.027706811, 0.03047488, 0.02047327, 0.0019258976, -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.0477...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-31
-0.013814235, -0.0004365912, -0.023606932, -0.020186016, 0.025330449, -0.00991674, -0.0048278007, -0.019350372, 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,...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-32
-0.03230285, 0.023646105, 0.0111114485, -0.015172156, 0.0257091, 0.0045699263, -0.00919208, 0.021517823, 0.037838988, 0.00787333, -0.007755818, -0.028281316, 0.011170205, -0.005412098, -0.016321165, 0.009929797, 0.004609097, -0.03047488, 0.002688096, -0.07264877, 0.024455635, -0.020930262, -0.015381066, -0.0033148287, ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-33
-0.002087477, 0.010791554, 0.022288183, 0.0048604426, -0.032590102, 0.013709779, 0.004922463, 0.020055447, -0.0150677, -0.0057222005, -0.036246043, 0.0021364405, 0.021387255, -0.013435584, 0.010732798, 0.0075534354, -0.00061612396, -0.002018928, -0.004432828, -0.032746784, 0.025513247, -0.0025852725, 0.014467081, -0.00...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-34
-0.018540842, 0.0025722156, 0.0110331075, -0.003992157, 0.020930262, 0.008487006, 0.0016557822, -0.0009882465, 0.0062640635, -0.016242823, -0.0007785196, -0.0007213955, 0.018971723, 0.021687564, 0.0039464575, -0.01574666, 0.011783881, -0.0019797573, -0.013383356, -0.002706049, 0.0037734534, 0.020394927, -0.00021931567,...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-35
0.007135614, -0.0113595305, -0.04387129, 0.016308108, -0.008186696, -0.013370299, -0.014297341, 0.017431004, -0.022666834, 0.039458048, 0.0032005806, -0.02081275, 0.008526176, -0.0019307939, 0.024024757, 0.009068039, 0.00953156, 0.010608757, 0.013801178, 0.035932675, -0.015185213, -0.0038322096, -0.012462842, -0.036559...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-36
-0.01472822, -0.025735214, -0.03313849, 0.0033817457, 0.028855821, -0.016033912, 0.0050791465, -0.01808385]}, 'source': '../../../state_of_the_union.txt'}),
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-37
0.8154189703772676) Persistance# Anything uploaded to weaviate is automatically persistent into the database. You do not need to call any specific method or pass any param for this to happen. Retriever options# Retriever options# This section goes over different options for how to use Weaviate as a retriever. MMR# In a...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
3f792c3e29cc-38
from langchain.chains import RetrievalQAWithSourcesChain from langchain import OpenAI with open("../../../state_of_the_union.txt") as f: state_of_the_union = f.read() text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0) texts = text_splitter.split_text(state_of_the_union) docsearch = Weaviate.fro...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/weaviate.html
446960627dcb-0
.ipynb .pdf Pinecone Pinecone# Pinecone is a vector database with broad functionality. This notebook shows how to use functionality related to the Pinecone vector database. To use Pinecone, you must have an API key. Here are the installation instructions. !pip install pinecone-client import os import getpass PINECONE_A...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/pinecone.html
446960627dcb-1
docs = docsearch.similarity_search(query) print(docs[0].page_content) previous PGVector next Qdrant By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023.
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/pinecone.html
18954d3798be-0
.ipynb .pdf PGVector Contents Similarity search with score Similarity Search with Euclidean Distance (Default) Working with vectorstore in PG Uploading a vectorstore in PG Retrieving a vectorstore in PG PGVector# PGVector is an open-source vector similarity search for Postgres It supports: exact and approximate neare...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/pgvector.html
18954d3798be-1
port=int(os.environ.get("PGVECTOR_PORT", "5432")), database=os.environ.get("PGVECTOR_DATABASE", "postgres"), user=os.environ.get("PGVECTOR_USER", "postgres"), password=os.environ.get("PGVECTOR_PASSWORD", "postgres"), ) ## Example # postgresql+psycopg2://username:password@localhost:5432/database_name Similar...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/pgvector.html
18954d3798be-2
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 legacy of ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/pgvector.html
18954d3798be-3
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. -------------------------------------------------------------------------------- -----------------------------------------------...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/pgvector.html
18954d3798be-4
previous OpenSearch next Pinecone Contents Similarity search with score Similarity Search with Euclidean Distance (Default) Working with vectorstore in PG Uploading a vectorstore in PG Retrieving a vectorstore in PG By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/pgvector.html
540d3bc3097a-0
.ipynb .pdf MyScale Contents Setting up envrionments Get connection info and data schema Filtering Deleting your data MyScale# MyScale is a cloud-based database optimized for AI applications and solutions, built on the open-source ClickHouse. This notebook shows how to use functionality related to the MyScale vector ...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/myscale.html
540d3bc3097a-1
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0) docs = text_splitter.split_documents(documents) embeddings = OpenAIEmbeddings() for d in docs: d.metadata = {'some': 'metadata'} docsearch = MyScale.from_documents(docs, embeddings) query = "What did the president say about Ketanji Brown Jackso...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/myscale.html
540d3bc3097a-2
NOTE: Please be aware of SQL injection, this interface must not be directly called by end-user. If you custimized your column_map under your setting, you search with filter like this: from langchain.vectorstores import MyScale, MyScaleSettings from langchain.document_loaders import TextLoader loader = TextLoader('../.....
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/myscale.html
540d3bc3097a-3
docsearch.drop() previous Milvus next OpenSearch Contents Setting up envrionments Get connection info and data schema Filtering Deleting your data By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023.
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/myscale.html
fcffe5c90465-0
.ipynb .pdf OpenSearch Contents Installation similarity_search using Approximate k-NN similarity_search using Script Scoring similarity_search using Painless Scripting Using a preexisting OpenSearch instance OpenSearch# OpenSearch is a scalable, flexible, and extensible open-source software suite for search, analytic...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/opensearch.html
fcffe5c90465-1
embeddings = OpenAIEmbeddings() similarity_search using Approximate k-NN# similarity_search using Approximate k-NN Search with Custom Parameters docsearch = OpenSearchVectorSearch.from_documents( docs, embeddings, opensearch_url="http://localhost:9200" ) # If using the default Docker installation, use thi...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/opensearch.html
fcffe5c90465-2
print(docs[0].page_content) similarity_search using Painless Scripting# similarity_search using Painless Scripting with Custom Parameters docsearch = OpenSearchVectorSearch.from_documents(docs, embeddings, opensearch_url="http://localhost:9200", is_appx_search=False) filter = {"bool": {"filter": {"term": {"text": "smug...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/opensearch.html
d87293930eeb-0
.ipynb .pdf Deep Lake Contents Retrieval Question/Answering Attribute based filtering in metadata Choosing distance function Maximal Marginal relevance Delete dataset Deep Lake datasets on cloud (Activeloop, AWS, GCS, etc.) or in memory Creating dataset on AWS S3 Deep Lake API Transfer local dataset to cloud Deep Lak...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/deeplake.html
d87293930eeb-1
docs = text_splitter.split_documents(documents) embeddings = OpenAIEmbeddings() Create a dataset locally at ./deeplake/, then run similiarity search. The Deeplake+LangChain integration uses Deep Lake datasets under the hood, so dataset and vector store are used interchangeably. To create a dataset in your own cloud, or...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/deeplake.html
d87293930eeb-2
text text (42, 1) str None print(docs[0].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 Disclose Act so Americans can know who is funding our elections. Tonight, I’d like to honor someone who has...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/deeplake.html
d87293930eeb-3
text text (42, 1) str None Deep Lake, for now, is single writer and multiple reader. Setting read_only=True helps to avoid acquring the writer lock. Retrieval Question/Answering# from langchain.chains import RetrievalQA from langchain.llms import OpenAIChat qa = RetrievalQA.from_chain_type(llm=Open...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/deeplake.html
d87293930eeb-4
tensor htype shape dtype compression ------- ------- ------- ------- ------- embedding generic (4, 1536) float32 None ids text (4, 1) str None metadata json (4, 1) str None text text (4, 1) str None db.similarity_search...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/deeplake.html
d87293930eeb-5
Document(page_content='And for our LGBTQ+ Americans, let’s finally get the bipartisan Equality Act to my desk. The onslaught of state laws targeting transgender Americans and their families is wrong. \n\nAs I said last year, especially to our younger transgender Americans, I will always have your back as your President...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/deeplake.html
d87293930eeb-6
[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 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: Justic...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/deeplake.html
d87293930eeb-7
Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by...
https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/deeplake.html