increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill‚Äîour First Lady who teaches full-time‚Äîcalls America‚Äôs best-kept secret: community colleges.', lookup_str='', metadata={'source': '../../state_of_the_union.txt'}, lookup_index=0)]Alternatively, if our document have a "source" metadata key, we can use the RetrievalQAWithSourcesChain to cite our sources:docsearch = Chroma.from_texts(texts, embeddings, metadatas=[{"source": f"{i}-pl"} for i in range(len(texts))])from langchain.chains import RetrievalQAWithSourcesChainfrom langchain.llms import OpenAIchain = RetrievalQAWithSourcesChain.from_chain_type(OpenAI(temperature=0), chain_type="stuff", retriever=docsearch.as_retriever())chain({"question": "What did the president say about Justice Breyer"}, return_only_outputs=True)    {'answer': ' The president honored Justice Breyer for his service and mentioned his legacy of excellence.\n',     'sources': '31-pl'}PreviousRAG over codeNextRemembering chat historyChain TypeCustom PromptsVectorstore Retriever OptionsReturn Source DocumentsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This example showcases question answering over an index.
This example showcases question answering over an index. ->: increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill‚Äîour First Lady who teaches full-time‚Äîcalls America‚Äôs best-kept secret: community colleges.', lookup_str='', metadata={'source': '../../state_of_the_union.txt'}, lookup_index=0)]Alternatively, if our document have a "source" metadata key, we can use the RetrievalQAWithSourcesChain to cite our sources:docsearch = Chroma.from_texts(texts, embeddings, metadatas=[{"source": f"{i}-pl"} for i in range(len(texts))])from langchain.chains import RetrievalQAWithSourcesChainfrom langchain.llms import OpenAIchain = RetrievalQAWithSourcesChain.from_chain_type(OpenAI(temperature=0), chain_type="stuff", retriever=docsearch.as_retriever())chain({"question": "What did the president say about Justice Breyer"}, return_only_outputs=True)    {'answer': ' The president honored Justice Breyer for his service and mentioned his legacy of excellence.\n',     'sources': '31-pl'}PreviousRAG over codeNextRemembering chat historyChain TypeCustom PromptsVectorstore Retriever OptionsReturn Source DocumentsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.