LangChain & LLM Based Autonomous Agents
Autonomous Agents in the context of Large Language Models
As the implementations of Large Language Models (LLMs) expand in depth and width, a few requirements arise:
The ability to program LLMs and create reusable prompts & seamlessly incorporate prompts into larger applications.
Creating chains to sequence LLM interactions for larger applications.
Automate impromptu chain-of-thought prompting via an agent which can act autonomous given the ambit of tools.
Create scaleable prompt pipelines which can collect relevant data from various sourced, all based on user input and constitute a prompt; and submit the prompt the a LLM.
“Civilisation advances by extending the number of operations we can perform without thinking about them” — Alfred North Whitehead.
With LLM related operations there is an obvious need for automation. Currently this automation is in the form of what is called agents.
Prompt Chaining is the execution of a predetermined and set sequence of actions.
The attractions of Agents is that Agents do not follow a predetermined sequence of events. Agents can maintain a high level of autonomy.
Considering the image below, Agents have access to a set of tools and any request which falls within the ambit of these tools can be addressed by the agent. The Execution pipeline lends autonomy to the Agent and a number of iterations might be required until the Agent reaches the Final Answer.
The diagram below shows how different action types are accessed and cycled through. There is an an observation, thought and eventually a final answer. The diagram shows how another action type might be invoked in cases where the final answer is not reached.
The output snipped below the diagram shows the how the agent executes and how the chain is created in an autonomous fashion.