This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
start [2024/11/26 22:51] – brad | start [2024/12/13 18:26] (current) – brad | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Large Language Model (LLM) Agents | + | ===== AgentWiki |
- | Welcome to the LLM Agents Wiki, a comprehensive resource for understanding and leveraging Large Language | + | Welcome to the **AgentWiki**, a comprehensive resource for understanding and leveraging Large Language |
+ | Catch up on the latest developments, | ||
==== Introduction ==== | ==== Introduction ==== | ||
- | Large Language Model (LLM) Agents are sophisticated AI systems that utilize large-scale neural language models to perform tasks autonomously. By comprehending natural language, reasoning through complex problems, and interacting with external tools and environments, | + | 🤖 Large Language Model (LLM) Agents are sophisticated AI systems that utilize large-scale neural language models to perform tasks autonomously. |
+ | By comprehending natural language, reasoning through complex problems, and interacting with external tools and environments, | ||
+ | They are capable of planning, executing, and adapting their actions based on given objectives and feedback from their environment. | ||
==== Agent System Overview ==== | ==== Agent System Overview ==== | ||
- | In an LLM-powered autonomous agent system, the LLM functions as the agent' | + | 🧠 In an LLM-powered autonomous agent system, the LLM functions as the agent' |
- | * **Planning** | + | * **[[planning|Planning]]** |
- | * Task Decomposition | + | * Task Decomposition |
- | * Self-Reflection | + | * Self-Reflection |
- | * **Memory** | + | |
- | * Hierarchical Memory Systems | + | |
- | * Efficient Retrieval Mechanisms | + | |
- | * **Tool Use** | + | |
- | * External API Integration | + | |
- | * Dynamic Tool Selection | + | |
- | These components enable the agent to: | + | * **[[memory|Memory]]** |
+ | * Hierarchical Memory Systems | ||
+ | * Efficient Retrieval Mechanisms | ||
- | * **Plan** complex tasks through decomposition and strategic reasoning. | + | * **[[tool_use|Tool Use]]** |
- | * **Remember** past interactions using advanced memory architectures. | + | * External API Integration |
- | * **Utilize Tools** to extend capabilities beyond text generation. | + | |
- | ==== Key Features of LLM Agents ==== | + | * **[[structured_outputs|Structured Outputs]]** |
+ | * Grammars | ||
+ | * Constrained Outputs | ||
- | * **Advanced Reasoning and Planning**: Employ sophisticated reasoning strategies | + | 🚀 These components enable the agent to: |
- | * **Tool Utilization and API Interaction**: Interface with external tools, APIs, databases, and services to perform actions such as web searches, code execution, and data manipulation. | + | |
- | * **Hierarchical Memory and Context Management**: | + | |
- | * **Natural Language Understanding and Generation**: | + | |
- | * **Autonomy and Adaptive Behavior**: Operate independently, | + | |
- | ==== Components of LLM Agents ==== | + | * **Plan** complex tasks through decomposition and strategic reasoning. |
+ | * **Remember** past interactions using advanced memory architectures. | ||
+ | * **Utilize Tools** to extend capabilities beyond text generation. | ||
- | === Planning | + | ==== Key Features of LLM Agents ==== |
- | Planning | + | 🌀 **[[advanced_reasoning_planning|Advanced Reasoning and Planning]]**: |
+ | Employ sophisticated reasoning strategies to analyze | ||
- | | + | 🔧 **[[tool_utilization|Tool Utilization and API Interaction]]**: |
- | * **Chain-of-Thought (CoT) Reasoning**: Encourages the LLM to generate step-by-step reasoning processes, enhancing problem-solving by making intermediate steps explicit. | + | Interface with external tools, APIs, databases, and services |
- | * **Tree of Thoughts**: Extends CoT by exploring multiple reasoning pathways at each decision point, forming a tree structure of possible thought processes | + | |
- | * **LLM+P (LLM with Classical Planning)**: | + | |
- | | + | 📚 **[[hierarchical_memory|Hierarchical Memory |
- | * **ReAct (Reasoning | + | Use multi-level |
- | * **Reflexion Framework**: | + | |
- | * **Chain of Hindsight (CoH)**: Facilitates iterative improvement by presenting the model with sequences of past outputs annotated with feedback, promoting learning from previous attempts. | + | |
- | * **Algorithm Distillation (AD)**: Trains policies to perform in-context | + | |
- | === Memory === | + | 💡 **[[natural_language_understanding|Natural Language Understanding and Generation]]**: |
+ | Interpret and generate human-like text, facilitating effective communication and instruction following. | ||
- | Memory mechanisms allow agents to retain, retrieve, and utilize | + | 🔄 **[[autonomy|Autonomy and Adaptive Behavior]]**: |
+ | Operate independently, making informed decisions | ||
- | * **Hierarchical Memory Systems** | + | ==== Workflows ==== |
- | * **Sensory Memory**: Encodes immediate inputs into initial representations, | + | |
- | * **Short-Term Memory (Working Memory)**: Stores information currently being processed, constrained by the LLM's context window, and crucial for immediate reasoning tasks. | + | |
- | * **Long-Term Memory (Persistent Memory)**: External memory stores that retain information indefinitely, | + | |
- | * **Explicit/ | + | |
- | * **Implicit/ | + | |
- | * **Efficient Retrieval Mechanisms** | + | Workflows |
- | * **Maximum Inner Product Search (MIPS)**: Algorithms designed for fast retrieval of relevant information from large-scale memory stores based on similarity measures. | + | |
- | * **Locality-Sensitive Hashing (LSH)**: Hashing technique that maps similar inputs to the same buckets with high probability, | + | |
- | * **Approximate Nearest Neighbors (ANNOY)**: Utilizes random projection trees to efficiently search for approximate nearest neighbors | + | |
- | * **Hierarchical Navigable Small World (HNSW) Graphs**: Constructs hierarchical graphs to navigate efficiently through | + | |
- | * **Facebook AI Similarity Search (FAISS)**: Implements optimized clustering | + | |
- | * **Scalable Nearest Neighbors (ScaNN)**: Combines anisotropic vector quantization with efficient search algorithms | + | |
- | === Tool Use === | + | 🌊 **Key Workflow Tools** |
+ | * **[[flowise|Flowise]]**: | ||
+ | * **[[promptflow|PromptFlow]]**: | ||
- | Tool use extends | + | These tools enhance |
- | * **MRKL Systems (Modular Reasoning, Knowledge, and Language)**: | + | ==== Components |
- | * **Tool-Augmented Language Models (TALM)**: Fine-tunes LLMs to incorporate external tool usage by integrating API calls within the language modeling process, enhancing the agent' | + | |
- | * **Toolformer**: | + | |
- | * **API Integration** | + | |
- | * **OpenAI Function Calling and ChatGPT Plugins**: Allows LLMs to interact with defined APIs and plugins dynamically, | + | |
- | * **HuggingGPT**: | + | |
- | * **API-Bank Benchmark**: | + | |
- | ==== Types of LLM Agents ==== | + | === Planning |
- | * **Chain-of-Thought Agents**: Utilize chain-of-thought prompting to enhance reasoning, allowing the agent to handle | + | 🧩 Planning involves the strategic breakdown |
- | * **ReAct Agents**: Integrate reasoning and acting by interleaving thought processes with actions, enabling dynamic interaction with environments and tools. | + | |
- | * **Autonomous Agents** | + | |
- | * **AutoGPT**: | + | |
- | * **BabyAGI**: | + | |
- | * **AgentGPT**: | + | |
- | * **Plan-and-Execute Agents**: First plan a sequence of actions | + | |
- | * **Conversational Agents**: Specialized in dialogue, understanding, | + | |
- | * **Tool-Using Agents**: Capable of utilizing external tools or APIs to augment their capabilities, | + | |
- | ==== Design Patterns for LLM Agents ==== | + | == Task Decomposition |
- | | + | 🌳 **[[chain_of_thought|Chain-of-Thought |
- | * **Reinforcement Learning from Human Feedback | + | 🌲 **[[tree_of_thoughts|Tree of Thoughts]]** |
- | * **Agent Loop (Perception-Thought-Action Cycle)**: An iterative cycle where the agent perceives inputs, processes them through reasoning, and performs actions, enabling continuous adaptation. | + | ⚙️ |
- | * **Context Window Management**: | + | |
- | * **Tool Integration Patterns**: Designing robust interfaces and protocols for seamless interaction between the LLM and external tools or APIs, including error handling and response parsing. | + | |
- | * **Memory Augmentation Strategies**: | + | |
- | | + | |
- | ==== Libraries and Frameworks ==== | + | == Self-Reflection |
- | | + | 🔍 **[[react_framework|ReAct (Reasoning |
- | * **LlamaIndex (GPT Index)**: A toolkit for connecting LLMs with external data sources and knowledge bases, facilitating advanced information retrieval and integration. | + | 🔄 **[[reflexion_framework|Reflexion Framework]]** |
- | * **Hugging Face Transformers**: A library providing a wide array of pre-trained models and tools for implementing and fine-tuning LLMs in various applications. | + | 🪞 **[[chain_of_hindsight|Chain of Hindsight (CoH)]]** |
- | * **OpenAI API**: Provides access to advanced language models like GPT-4, along with features for function calling, enabling integration with external tools and services. | + | 📉 **[[algorithm_distillation|Algorithm Distillation (AD)]]** |
- | * **Microsoft Guidance**: A library for controlling LLM generation with programmable interfaces, allowing developers to specify desired behaviors and constraints. | + | |
- | * **AutoGPT and BabyAGI Implementations**: | + | |
- | * **Haystack**: An open-source framework for building search and question-answering systems that combine LLMs with traditional search methods, useful for agents requiring information retrieval capabilities. | + | |
- | ==== Applications of LLM Agents ==== | + | === Memory |
- | * **Autonomous Task Execution**: | + | 📦 Memory mechanisms allow agents to retain, retrieve, and utilize information over extended periods, significantly enhancing their ability |
- | * **Customer Support and Virtual Assistants**: | + | |
- | * **Research Assistance**: | + | |
- | * **Educational Tools and Tutoring Systems**: Offering personalized learning | + | |
- | * **Content Creation and Curation**: Generating articles, reports, creative writing, and marketing materials based on user input or autonomous exploration, | + | |
- | * **Software Development Support**: Aiding in code generation, debugging, documentation, | + | |
- | * **Data Retrieval and Knowledge Management**: | + | |
- | ==== Case Studies ==== | + | == Hierarchical Memory Systems |
- | === Scientific Discovery Agents === | + | 🕒 **[[sensory_memory|Sensory Memory]]** |
+ | ⏳ **[[short_term_memory|Short-Term Memory (Working Memory)]]** | ||
+ | 📜 **[[long_term_memory|Long-Term Memory (Persistent Memory)]]** | ||
+ | * 📂 **[[explicit_memory|Explicit/ | ||
+ | * 🤫 **[[implicit_memory|Implicit/ | ||
- | * **ChemCrow**: | + | == Efficient Retrieval Mechanisms == |
- | * **Autonomous Scientific Research Agents**: Agents capable of designing, planning, and executing complex scientific experiments autonomously, | + | |
- | === Generative Agents Simulation === | + | 🔎 **[[maximum_inner_product_search|Maximum Inner Product Search (MIPS)]]** |
+ | * 🧮 **[[locality_sensitive_hashing|Locality-Sensitive Hashing (LSH)]]** | ||
+ | * 📊 **[[approximate_nearest_neighbors|Approximate Nearest Neighbors (ANNOY)]]** | ||
+ | * 🗺️ **[[hnsw_graphs|Hierarchical Navigable Small World (HNSW) Graphs]]** | ||
+ | * 🔍 **[[faiss|Facebook AI Similarity Search (FAISS)]]** | ||
+ | * 📈 **[[scann|Scalable Nearest Neighbors (ScaNN)]]** | ||
- | * **Generative Agents**: Simulation of virtual characters controlled by LLM-powered agents, demonstrating emergent behaviors, social interactions, | + | === Tool Use === |
- | === Proof-of-Concept Implementations === | + | 🔧 Tool use extends the agent' |
- | * **AutoGPT**: An experimental open-source application that illustrates how LLMs can autonomously achieve user-defined goals through iterative planning and execution, highlighting the potential of LLMs in automation. | + | * 🧰 **[[mrkl_systems|MRKL Systems (Modular Reasoning, Knowledge, and Language)]]** |
- | * **GPT-Engineer**: A project that generates entire codebases based on high-level natural language specifications, | + | * 🛠️ |
+ | * 🤖 **[[toolformer|Toolformer]]** | ||
- | ==== Challenges ==== | + | == API Integration |
- | | + | 🔗 **[[openai_function_calling|OpenAI Function Calling and ChatGPT Plugins]]** |
- | * **Long-Term Planning and Complex Task Decomposition**: | + | 🔗 **[[hugginggpt|HuggingGPT]]** |
- | * **Reliability and Consistency of Natural Language Interfaces**: Ensuring that LLMs produce consistent, well-formatted outputs and can handle unexpected inputs or errors gracefully remains a significant challenge. | + | 🗂️ |
- | * **Alignment and Ethical Considerations**: | + | |
- | * **Scalability and Performance**: Balancing computational efficiency with the complexity of tasks and the agent' | + | |
- | ==== Recent Developments | + | ==== Types of LLM Agents |
- | The field of LLM Agents | + | 🧠 **[[chain_of_thought_agents|Chain-of-Thought |
+ | 🔄 **[[react_agents|ReAct Agents]]** | ||
+ | 🤖 **[[autonomous_agents|Autonomous Agents]]** | ||
+ | * 🤖 **[[autogpt|AutoGPT]]** | ||
+ | * 🤖 **[[babyagi|BabyAGI]]** | ||
+ | * 🤖 **[[agentgpt|AgentGPT]]** | ||
+ | 📋 **[[plan_and_execute_agents|Plan-and-Execute Agents]]** | ||
+ | 💬 **[[conversational_agents|Conversational Agents]]** | ||
+ | 🔧 **[[tool_using_agents|Tool-Using Agents]]** | ||
- | * **Enhanced Reasoning Algorithms**: | + | ==== Design Patterns |
- | * **Integrated Tool Use and API Interaction**: | + | |
- | * **Advanced Memory and Retrieval Systems**: Innovations in memory augmentation and retrieval mechanisms, such as vector databases and efficient MIPS algorithms, to overcome context length limitations. | + | |
- | * **Ethical Frameworks and Safety Protocols**: | + | |
- | * **Open-Source Frameworks and Collaborative Platforms**: | + | |
- | ==== Getting Started ==== | + | 🔗 **[[prompt_chaining|Prompt Chaining and Orchestration]]** |
+ | 📈 **[[rlhf|Reinforcement Learning from Human Feedback (RLHF)]]** | ||
+ | 🔄 **[[agent_loop|Agent Loop (Perception-Thought-Action Cycle)]]** | ||
+ | 🗂️ **[[context_window_management|Context Window Management]]** | ||
+ | 🔧 **[[tool_integration_patterns|Tool Integration Patterns]]** | ||
+ | 📂 **[[memory_augmentation_strategies|Memory Augmentation Strategies]]** | ||
+ | 🏗️ **[[modular_architectures|Modular and Layered Architectures]]** | ||
- | Embark on your journey with LLM Agents by exploring the following resources: | + | ==== Libraries |
- | + | ||
- | * **Introduction to LLM Agents**: Understand the foundational concepts, architectures, | + | |
- | * **LangChain Documentation**: | + | |
- | * **OpenAI API Reference**: | + | |
- | * **AutoGPT GitHub Repository**: | + | |
- | * **ReAct Framework**: | + | |
- | * **Hugging Face Transformers**: | + | |
- | Explore, learn, and innovate to unlock the transformative potential | + | Explore |
- | ==== Tags ==== | + | **Frameworks & Platforms** |
- | {{tag> | + | ⚙️ **[[agent_protocol|Agent Protocol]]** |
+ | 🤖 **[[anthropic_context_protocol|Anthropic Model Context Protocol]]** | ||
+ | 💻 **[[chatdev|ChatDev]]** | ||
+ | ⚡ **[[bolt_new|Bolt.new]]** | ||
+ | 🔗 **[[flowise|Flowise]]** | ||
+ | 📋 **[[instructor_framework|Instructor]]** | ||
+ | 🔎 **[[llamaindex|LlamaIndex]]** | ||
+ | 🧠 **[[autogpt|AutoGPT]]** | ||
+ | 🤖 **[[babyagi|BabyAGI]]** | ||
+ | 🔗 **[[langroid|Langroid]]** | ||
+ | 📊 **[[microsoft_graphrag|Microsoft GraphRAG]]** | ||
+ | 🌟 **[[lite_llm|LiteLLM]]** | ||