大模型Agent

Agents are programs where LLM outputs control the workflow, they are useful when you need an LLM to determine the workflow of an app.

1. requirements

功能性

  • 编译型 (Dify) 固定工作流 or 解释型 (Manus) 自主规划决策

非功能

  • latency

  • throughput

2. ML task & Pipeline

Agent 选择

  • Predefined Agents

  • Dynamically Orchestrated Agents

Agent component

  • LLM (具备function call, long context 能力)

  • Router: LLM output determines an if/else switch

  • Tools: Plugins, Function Call, Code Interpreter

  • Planning: CoT, ToT, ReAct

  • Memory: 长期记忆 or 短期记忆

  • Self-Reflection / Self-Correction

  • Multistep Agent: LLM output controls iteration and program continuation

  • Multi-agent: One agentic workflow can start another agentic workflow

Service:

  • LLM Chat service (ray + VLLM)

  • Agent service

    • 会话管理和上下文管理

  • Tool service

3. Data

4. Model

5. evaluation

6. deploy & service

推理加速

  • KV cache

  • speculative decoding

  • Flash attention

  • 模型量化

7. monitor & maintain

QA

  • 如何训练function call?

    • 数据集SFT 或 强化学习

  • 如何解决幻觉?

  • 如何解决工具调用,调用失败或返回异常数据?

Reference

course

Last updated