President discusses several important issues and initiatives, including the nomination of a Supreme Court Justice, border security and immigration reform, protecting women's rights, advancing LGBTQ+ equality, bipartisan legislation, addressing the opioid epidemic and mental health, supporting veterans, investigating the health effects of burn pits on military personnel, ending cancer, and the strength and resilience of the American people.", metadata={'doc_id': '79fa2e9f-28d9-4372-8af3-2caf4f1de312'})retrieved_docs = retriever.get_relevant_documents("justice breyer")len(retrieved_docs[0].page_content)    9194Hypothetical Queries‚ÄãAn LLM can also be used to generate a list of hypothetical questions that could be asked of a particular document. These questions can then be embeddedfunctions = [    {      "name": "hypothetical_questions",      "description": "Generate hypothetical questions",      "parameters": {        "type": "object",        "properties": {          "questions": {            "type": "array",            "items": {                "type": "string"              },          },        },        "required": ["questions"]      }    }  ]from langchain.output_parsers.openai_functions import JsonKeyOutputFunctionsParserchain = (    {"doc": lambda x: x.page_content}    # Only asking for 3 hypothetical questions, but this could be adjusted    | ChatPromptTemplate.from_template("Generate a list of 3 hypothetical questions that the below document could be used to answer:\n\n{doc}")    | ChatOpenAI(max_retries=0, model="gpt-4").bind(functions=functions, function_call={"name": "hypothetical_questions"})    | JsonKeyOutputFunctionsParser(key_name="questions"))chain.invoke(docs[0])    ["What was the author's initial impression of philosophy as a field of study, and how did it change when they got to college?",     'Why did the author decide to switch their focus to Artificial Intelligence (AI)?',     "What led to the author's disillusionment with the field of AI as
It can often be beneficial to store multiple vectors per document. There are multiple use cases where this is beneficial. LangChain has a base MultiVectorRetriever which makes querying this type of setup easy. A lot of the complexity lies in how to create the multiple vectors per document. This notebook covers some of the common ways to create those vectors and use the MultiVectorRetriever.
It can often be beneficial to store multiple vectors per document. There are multiple use cases where this is beneficial. LangChain has a base MultiVectorRetriever which makes querying this type of setup easy. A lot of the complexity lies in how to create the multiple vectors per document. This notebook covers some of the common ways to create those vectors and use the MultiVectorRetriever. ->: President discusses several important issues and initiatives, including the nomination of a Supreme Court Justice, border security and immigration reform, protecting women's rights, advancing LGBTQ+ equality, bipartisan legislation, addressing the opioid epidemic and mental health, supporting veterans, investigating the health effects of burn pits on military personnel, ending cancer, and the strength and resilience of the American people.", metadata={'doc_id': '79fa2e9f-28d9-4372-8af3-2caf4f1de312'})retrieved_docs = retriever.get_relevant_documents("justice breyer")len(retrieved_docs[0].page_content)    9194Hypothetical Queries‚ÄãAn LLM can also be used to generate a list of hypothetical questions that could be asked of a particular document. These questions can then be embeddedfunctions = [    {      "name": "hypothetical_questions",      "description": "Generate hypothetical questions",      "parameters": {        "type": "object",        "properties": {          "questions": {            "type": "array",            "items": {                "type": "string"              },          },        },        "required": ["questions"]      }    }  ]from langchain.output_parsers.openai_functions import JsonKeyOutputFunctionsParserchain = (    {"doc": lambda x: x.page_content}    # Only asking for 3 hypothetical questions, but this could be adjusted    | ChatPromptTemplate.from_template("Generate a list of 3 hypothetical questions that the below document could be used to answer:\n\n{doc}")    | ChatOpenAI(max_retries=0, model="gpt-4").bind(functions=functions, function_call={"name": "hypothetical_questions"})    | JsonKeyOutputFunctionsParser(key_name="questions"))chain.invoke(docs[0])    ["What was the author's initial impression of philosophy as a field of study, and how did it change when they got to college?",     'Why did the author decide to switch their focus to Artificial Intelligence (AI)?',     "What led to the author's disillusionment with the field of AI as