legal minds, who will continue Justice Breyer‚Äôs legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt'})Question Answering with Sources‚ÄãThis section goes over how to do question-answering with sources over an Index. It does this by using the RetrievalQAWithSourcesChain, which does the lookup of the documents from an Index. from langchain.chains import RetrievalQAWithSourcesChainfrom langchain.chat_models import ChatOpenAIchain = RetrievalQAWithSourcesChain.from_chain_type(    ChatOpenAI(temperature=0), chain_type="stuff", retriever=retriever)chain(    {"question": "What did the president say about Justice Breyer"},    return_only_outputs=True,)    {'answer': "The president honored Justice Stephen Breyer, who is retiring from the United States Supreme Court. He thanked him for his service and mentioned that he nominated Circuit Court of Appeals Judge Ketanji Brown Jackson to continue Justice Breyer's legacy of excellence. \n",     'sources': '../../modules/state_of_the_union.txt'}PreviousMyScaleNextNucliaDBSimilarity Search with Cosine Distance (Default)Working with vectorstoreAdd documentsHybrid search (vector + keyword)Retriever optionsQuestion Answering with SourcesCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Neo4j is an open-source graph database with integrated support for vector similarity search
Neo4j is an open-source graph database with integrated support for vector similarity search ->: legal minds, who will continue Justice Breyer‚Äôs legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt'})Question Answering with Sources‚ÄãThis section goes over how to do question-answering with sources over an Index. It does this by using the RetrievalQAWithSourcesChain, which does the lookup of the documents from an Index. from langchain.chains import RetrievalQAWithSourcesChainfrom langchain.chat_models import ChatOpenAIchain = RetrievalQAWithSourcesChain.from_chain_type(    ChatOpenAI(temperature=0), chain_type="stuff", retriever=retriever)chain(    {"question": "What did the president say about Justice Breyer"},    return_only_outputs=True,)    {'answer': "The president honored Justice Stephen Breyer, who is retiring from the United States Supreme Court. He thanked him for his service and mentioned that he nominated Circuit Court of Appeals Judge Ketanji Brown Jackson to continue Justice Breyer's legacy of excellence. \n",     'sources': '../../modules/state_of_the_union.txt'}PreviousMyScaleNextNucliaDBSimilarity Search with Cosine Distance (Default)Working with vectorstoreAdd documentsHybrid search (vector + keyword)Retriever optionsQuestion Answering with SourcesCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.