any questions.Source 1: a SQL database about employee data<source1>{source1}</source1>Source 2: a text database of random information<source2>{source2}</source2>"""prompt = ChatPromptTemplate.from_messages([("system", system_message), ("human", "{question}")])full_chain = {    "source1": {"question": lambda x: x["question"]} | query_chain | db.run,    "source2": (lambda x: x['question']) | retriever,    "question": lambda x: x['question'],} | prompt | ChatOpenAI()response = full_chain.invoke({"question":"How many Employees are there"})print(response)    Number of requested results 4 is greater than number of elements in index 1, updating n_results = 1    content='There are 8 employees.' additional_kwargs={} example=FalsePreviousDynamically select from multiple retrieversNextCiting retrieval sourcesSet up SQL querySet up vectorstoreCombineCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Often times you may want to do retrieval over multiple sources. These can be different vectorstores (where one contains information about topic X and the other contains info about topic Y). They could also be completely different databases altogether!
Often times you may want to do retrieval over multiple sources. These can be different vectorstores (where one contains information about topic X and the other contains info about topic Y). They could also be completely different databases altogether! ->: any questions.Source 1: a SQL database about employee data<source1>{source1}</source1>Source 2: a text database of random information<source2>{source2}</source2>"""prompt = ChatPromptTemplate.from_messages([("system", system_message), ("human", "{question}")])full_chain = {    "source1": {"question": lambda x: x["question"]} | query_chain | db.run,    "source2": (lambda x: x['question']) | retriever,    "question": lambda x: x['question'],} | prompt | ChatOpenAI()response = full_chain.invoke({"question":"How many Employees are there"})print(response)    Number of requested results 4 is greater than number of elements in index 1, updating n_results = 1    content='There are 8 employees.' additional_kwargs={} example=FalsePreviousDynamically select from multiple retrieversNextCiting retrieval sourcesSet up SQL querySet up vectorstoreCombineCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.