Reflection Prompting Making LLM Think
Reflection Prompting Making LLM Think
● Projects - Next Wednesday is the deadline for picking your project topics and
teams
Recall
● We learned about ReAct framework and saw an example of how to make an
LLM reason - a bit unsuccessfully
● ReAct => Reason + Action
● Reasoning involves, LLM “thinking” through results of its actions
● Action involves calling tools that can take action on LLM’s direction with LLM
specified inputs and produce results
● We keep repeating until LLM “thinks” it has found the “answer” to user query
● This is one of the basic frameworks for building LLM Agent
Reflection
Like ReAct framework, we can also use Reflection framework.
Per the Paper Shinn et al. (2023) - "Reflexion is a new paradigm for ‘verbal‘
reinforcement that parameterizes a policy as an agent’s memory encoding paired
with a choice of LLM parameters."
Reflection Diagram
● At their core, these agents are systems that combine large language models
(LLMs) with additional capabilities to perform tasks or solve problems more
effectively than a standard LLM alone
● "agent" is a system that can perceive its environment, make decisions, and
take actions to achieve specific goals. It's like a digital entity with a degree of
autonomy.
Agent
Key Features:
● Task Planning: They can break down complex tasks into smaller,
manageable steps.
● Tool Use: They can utilize various digital tools or APIs to gather information
or perform actions.
● Memory and Context Management: They can maintain context over longer
interactions and "remember" important information.
● Reasoning: They can apply logical reasoning to solve problems or make
decisions.
● Learning and Adaptation: Some advanced agents can learn from their
interactions and improve over time.
References
ReAct Prompting: https://www.promptingguide.ai/techniques/react