REACT
BigHub is teaching LLMs to ReAct
Reacting to the Future: Unveiling Langchain ReAct at BigHub
LLMs are powerful tools and we keep on getting fascinated by their abilities, still uncovering new potential via new methods and tools. Until recently, LLMs, despite their strengh in generating contextually accurate responses, lacked the ability to reason or act based on those responses. That changed rapidly in the last months with new tools and connectors, such as WebGPT. Because of that, one of approaches that is becoming a new standard is ReAct (Reason + Act).
What is ReAct?
ReAct, originally a paper by joint team of Princeton and Google, proposes key methodology to enhance LLMs decision-making prowess. It proposes a method how to connect two previously separated topics of LLMs abilities - reasoning (typically chain-of-thought prompting techniques) and acting (such as generating action plans) and to reach much better results in handling user requests and queries.
In a nutshell, ReAct is a mechanism organize different operations needed to fullfill the task. It uses reasoning power of LLM to induce, track, and update action plans as well as handle exceptions, while actions allow it to interface with external sources, such as knowledge bases or environments, to gather additional information. The process is iterative, traversing through a diagram of logic, step by step until the endpoint - a coherent, actionable answer - is reached.
Let's go deeper
That's the theory. To implement such a system, we (and most of the other data scientist/AI professionals) use LangChain, namely Langchain ReAct, an implementation of this concept, which takes the method a notch higher by packaging the entire process into agents. Here’s a simplistic illustration:
Take insurance for instance; a bot powered by Langchain ReAct can autonomously fetch the formula for calculating monthly deposits, ask the client for necessary additional information, and crunch the numbers to provide precise figures. That unlocks new level of automation because it provides model with deductive reasoning which resembles human thought processes.
As we continue to explore new possibilities of LLMs, we invite you to explore how Langchain ReAct technology could be the catalyst in your journey towards smarter, efficient business operations. Because with BigHub, you're not just adapting to the digital era; you're evolving with it.And here how it looks in LangChain:
> Entering new AgentExecutor chain...
Query: "Find Leo DiCaprio's girlfriend and calculate her age raised to 0.43 power."
Action: Search
Action Input: "Leo DiCaprio girlfriend"
Observation: Camila Morrone
Thought: "Need to find Camila Morrone's age"
Action: Search
Action Input: "Camila Morrone's age"
Observation: 25 years
Thought: "Need to calculate 25 raised to the 0.43 power"
Action: Calculator
Action Input: 25^0.43
Observation: Answer: 3.991298452658078
Thought: "I now have the final answer"
Final Answer: Camila Morrone is Leo DiCaprio's girlfriend and her current age raised to the 0.43 power is 3.991298452658078.
> Finished chain.
This is just the beginning, applications are boundless
From a business perspective, the applications of this concept are boundless. At BigHub we are already testing these new technologies and principles, looking on how can our clients benefit from them. And we see that it is an amazing tool in fields requiring cross-industry data retrieval and processing.