0.21724902288621384    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 Democrats and Republicans.         And if we are to advance liberty and justice, we need to 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 dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster.         We‚Äôre securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.    --------------------------------------------------------------------------------Using a Timescale Vector as a Retriever‚ÄãAfter initializing a TimescaleVector store, you can use it as a retriever.# Use TimescaleVector as a retrieverretriever = db.as_retriever()print(retriever)    tags=['TimescaleVector', 'OpenAIEmbeddings'] metadata=None vectorstore=<langchain.vectorstores.timescalevector.TimescaleVector object at 0x10fc8d070> search_type='similarity' search_kwargs={}Let's look at an example of using Timescale Vector as a retriever with the RetrievalQA chain and the stuff chain.In this example, we'll ask the same query as above, but this time we'll pass the relevant documents returned from Timescale Vector to an LLM to use as context to answer our question.First we'll create our stuff chain:# Initialize GPT3.5 modelfrom langchain.chat_models import ChatOpenAIllm = ChatOpenAI(temperature = 0.1, model = 'gpt-3.5-turbo-16k')# Initialize a RetrievalQA class from a stuff chainfrom langchain.chains
This notebook shows how to use the Postgres vector database Timescale Vector. You'll learn how to use TimescaleVector for (1) semantic search, (2) time-based vector search, (3) self-querying, and (4) how to create indexes to speed up queries.
This notebook shows how to use the Postgres vector database Timescale Vector. You'll learn how to use TimescaleVector for (1) semantic search, (2) time-based vector search, (3) self-querying, and (4) how to create indexes to speed up queries. ->: 0.21724902288621384    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 Democrats and Republicans.         And if we are to advance liberty and justice, we need to 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 dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster.         We‚Äôre securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.    --------------------------------------------------------------------------------Using a Timescale Vector as a Retriever‚ÄãAfter initializing a TimescaleVector store, you can use it as a retriever.# Use TimescaleVector as a retrieverretriever = db.as_retriever()print(retriever)    tags=['TimescaleVector', 'OpenAIEmbeddings'] metadata=None vectorstore=<langchain.vectorstores.timescalevector.TimescaleVector object at 0x10fc8d070> search_type='similarity' search_kwargs={}Let's look at an example of using Timescale Vector as a retriever with the RetrievalQA chain and the stuff chain.In this example, we'll ask the same query as above, but this time we'll pass the relevant documents returned from Timescale Vector to an LLM to use as context to answer our question.First we'll create our stuff chain:# Initialize GPT3.5 modelfrom langchain.chat_models import ChatOpenAIllm = ChatOpenAI(temperature = 0.1, model = 'gpt-3.5-turbo-16k')# Initialize a RetrievalQA class from a stuff chainfrom langchain.chains