- Run the reasoning system:
from langchain.tools import Tool
question = "What are the symptoms of COVID-19?"
docs = load_documents()
tool = Tool(name="Reason About COVID-19",
action=ReasoningChain().run,
description="Use the multi-stage reasoning system to analyze the symptoms of COVID-19 based on the provided documents.")
result = tool.run(question)
print("Results:", result)
In the example above, we're loading the documents using the load_documents() function, defining our question, and running the ReasoningChain() to produce a output based on the question and the loaded documents. The output is stored in the result variable.
Note that in the ReasoningChain() constructor, you can change the links and skills to adjust the multi-stage reasoning process according to your specific use case.