AI Dictionary of Terms

ReAct Paradigm (Reasoning and Acting)

A prompting and architectural framework that combines logical reasoning (Chain of Thought) with actionable tool use, allowing AI agents to think through a problem, take an action, observe the result, and repeat.

The Simple Version

A thinking style for AI where it talks to itself to figure out a plan, takes an action (like searching the web or running code), looks at the result, and then decides what to do next. It’s the difference between an AI that just guesses an answer, and an AI that actually does research to find it.

Detailed Explanation

Standard LLMs generate text in a single, linear pass. If they don’t know the answer, they hallucinate. The ReAct (Reasoning and Acting) paradigm, introduced by Yao et al., interleaves Thought traces (the model’s internal reasoning) with Action steps (executing a tool like a search engine, calculator, or database) and Observation (the result of that action). This creates a feedback loop. The model can correct its own mistakes, gather missing information, and break down complex, multi-step tasks that are impossible to solve in a single generation.

Key Characteristics

Business Context

Real-World Analogy

A detective solving a case. They don’t just sit in their office and guess who the killer is. They form a hypothesis (Thought), go to the crime scene to look for clues (Action), examine the fingerprints (Observation), and then form a new hypothesis based on what they found.

Code Example

# Conceptual: The ReAct Loop
def react_agent(user_query, tools):
    context = user_query
    
    for step in range(max_steps):
        # 1. THOUGHT: The model reasons about what to do next
        thought = llm.generate(f"{context}\nThought: What should I do next?")
        
        # 2. ACTION: The model selects a tool and arguments
        action, args = llm.generate(f"{thought}\nAction: [Tool Name]({args})")
        
        # 3. OBSERVATION: Execute the tool and get the result
        if action in tools:
            observation = tools[action](args)
        else:
            observation = "Tool not found."
            
        # 4. Update context and loop
        context += f"\nThought: {thought}\nAction: {action}\nObservation: {observation}"
        
        if "Final Answer:" in thought:
            return thought.split("Final Answer:")[-1]

Common Misconceptions

Sources & Further Reading