that is meant to be the schema used for timescaledb internal functions to allow separation of code and chunks or other user objects. "}    --------------------------------------------------------------------------------    --------------------------------------------------------------------------------    Score:  0.17488396167755127    Date:  2023-08-29 18:13:24+0320    {"commit": " e4facda540286b0affba47ccc63959fefe2a7b26", "author": "Sven Klemm<sven@timescale.com>", "date": "Tue Aug 29 18:13:24 2023 +0200", "change summary": "Add compatibility layer for _timescaledb_internal functions", "change details": "With timescaledb 2.12 all the functions present in _timescaledb_internal were moved into the _timescaledb_functions schema to improve schema security. This patch adds a compatibility layer so external callers of these internal functions will not break and allow for more flexibility when migrating. "}    --------------------------------------------------------------------------------The main takeaway is that in each result above, only vectors within the specified time range are returned. These queries are very efficient as they only need to search the relevant partitions.We can also use this functionality for question answering, where we want to find the most relevant vectors within a specified time range to use as context for answering a question. Let's take a look at an example below, using Timescale Vector as a retriever:# Set timescale vector as a retriever and specify start and end dates via kwargsretriever = db.as_retriever(search_kwargs={"start_date": start_dt, "end_date": end_dt})from langchain.chat_models import ChatOpenAIllm = ChatOpenAI(temperature = 0.1, model = 'gpt-3.5-turbo-16k')from langchain.chains import RetrievalQAqa_stuff = RetrievalQA.from_chain_type(    llm=llm,     chain_type="stuff",     retriever=retriever,    verbose=True,)query = "What's new with the timescaledb functions? Tell me when these changes were made."response =
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. ->: that is meant to be the schema used for timescaledb internal functions to allow separation of code and chunks or other user objects. "}    --------------------------------------------------------------------------------    --------------------------------------------------------------------------------    Score:  0.17488396167755127    Date:  2023-08-29 18:13:24+0320    {"commit": " e4facda540286b0affba47ccc63959fefe2a7b26", "author": "Sven Klemm<sven@timescale.com>", "date": "Tue Aug 29 18:13:24 2023 +0200", "change summary": "Add compatibility layer for _timescaledb_internal functions", "change details": "With timescaledb 2.12 all the functions present in _timescaledb_internal were moved into the _timescaledb_functions schema to improve schema security. This patch adds a compatibility layer so external callers of these internal functions will not break and allow for more flexibility when migrating. "}    --------------------------------------------------------------------------------The main takeaway is that in each result above, only vectors within the specified time range are returned. These queries are very efficient as they only need to search the relevant partitions.We can also use this functionality for question answering, where we want to find the most relevant vectors within a specified time range to use as context for answering a question. Let's take a look at an example below, using Timescale Vector as a retriever:# Set timescale vector as a retriever and specify start and end dates via kwargsretriever = db.as_retriever(search_kwargs={"start_date": start_dt, "end_date": end_dt})from langchain.chat_models import ChatOpenAIllm = ChatOpenAI(temperature = 0.1, model = 'gpt-3.5-turbo-16k')from langchain.chains import RetrievalQAqa_stuff = RetrievalQA.from_chain_type(    llm=llm,     chain_type="stuff",     retriever=retriever,    verbose=True,)query = "What's new with the timescaledb functions? Tell me when these changes were made."response =