An article explains in detail how Agent works

Deepen your understanding of how agents interact with the environment intelligently.
Core content:
1. The definition and core features of agents
2. The key role of prompts in agent workflows
3. The application and impact of LLM large models and memory knowledge bases
Agent, also called "agent" or "intelligent body", is a computer program or entity that can perceive the environment, plan autonomously, make decisions, act independently, and interact with other agents or humans in a specific environment. They often have characteristics such as autonomy, responsiveness, sociability, and adaptability, and can adjust their behavior according to changes in the environment to achieve preset goals.
Typical Agent Workflow
Key step 1: Prompt words [define the role scope, explain the task background, and habit characteristics]
The prompt word is the initial input received by the agent, which describes the task that the agent needs to complete or the problem that it needs to solve. The prompt word can be in various forms such as text, image, voice, etc. The agent needs to parse and understand the prompt word in order to provide guidance for subsequent task planning and action execution.
The prompt words of the intelligent agent should be unified: the dialogue involves the ecological supply side of the development platform, including industry norms, background knowledge and prompt words of the intelligent agent. The prompt words include context and instructions, and attention should be paid to clearly expressing requirements, unifying pronouns and avoiding industry jargon.
(1) General instruction composition
Context: Describes the context in which you want the large model to perform a task
Instruction: Instructions on what task you want the model to perform
Input Data: describes what the user wants to enter.
Outpt Indicator Output prompt: Specify the output result content (state clearly what you want + what you don’t want)
(2) Tips
Be less vague and clearly state your needs
The pronouns used in the instructions should be consistent and should not be switched repeatedly, which may cause confusion in the understanding of the large AI model.
Try not to include industry jargon in instructions, as it may cause difficulties in understanding large AI models.
The LLM (Large Language Model) is an important tool for Agents to perform task planning and knowledge reasoning. By learning from a large amount of text data, it has powerful language processing and knowledge reasoning capabilities. Agents can use the LLM model to conduct in-depth analysis of prompt words, generate possible solutions, and select and optimize them.
Key step 3: Memory knowledge base [call, match, current input content, context content, vector database]
Key Step 4: Planning Task Planning [Analysis Method, Analytical Thinking, Reasoning Traces]
Task planning is the process of making decisions and planning based on prompts, LLM models, and knowledge bases. It involves character decomposition, goal setting, path planning, and other aspects. The agent needs to consider various factors and develop the most appropriate task execution plan.
Key step 5: Use the Action tool [Execute, Return, Execute]
Action execution is the process by which the agent performs specific operations based on the results of task planning. It may involve multiple links such as interaction with the environment, data collection and processing, and decision adjustment. The agent needs to accurately perform each step to ensure that the task can be successfully completed.
The orchestration of agents really needs to be constantly debugged. On Wednesday, I went to our group company to discuss intelligent agents. A department leader said that the orchestration of intelligent agents is to continuously improve those scenarios. For example, at the beginning, only natural language was supported. Later, the scenarios needed to add multi-modality, and multi-modality needed to consider various types of file processing. This process is a process of filling in the gaps, and slowly the intelligent agents will become more and more "intelligent".