From fa1811ad505e65c73e0cd07ffa9e73df2149c29a Mon Sep 17 00:00:00 2001 From: zachary62 Date: Sun, 16 Mar 2025 18:55:22 -0400 Subject: [PATCH] update agent guide --- docs/design_pattern/agent.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/design_pattern/agent.md b/docs/design_pattern/agent.md index 620a860..8f1e774 100644 --- a/docs/design_pattern/agent.md +++ b/docs/design_pattern/agent.md @@ -54,7 +54,7 @@ The core of building **high-performance** and **reliable** agents boils down to: 1. **Context Management:** Provide *relevant, minimal context.* For example, rather than including an entire chat history, retrieve the most relevant via [RAG](./rag.md). Even with larger context windows, LLMs still fall victim to ["lost in the middle"](https://arxiv.org/abs/2307.03172), overlooking mid-prompt content. -2. **Action Space:** Provide *a well-structured and unambiguous* set of actions—avoiding overlap like separate `read_databases` or `read_csvs`. Instead, import CSVs into the database and then use one parameterized (e.g., table name) or programmable action (e.g., via SQL) to query data. +2. **Action Space:** Provide *a well-structured and unambiguous* set of actions—avoiding overlap like separate `read_databases` or `read_csvs`. Instead, import CSVs into the database. ## Example Good Action Design @@ -62,6 +62,10 @@ The core of building **high-performance** and **reliable** agents boils down to: **Overview-zoom-in:** First provide high-level structure (table of contents, summary), then allow drilling into details (raw texts). +**Parameterized/Programmable:** Instead of fixed actions, enable parameterized (columns to select) or programmable (SQL queries) actions, for example, to read CSV files. + +**Backtracking:** Let the agent undo the last step instead of restarting entirely, preserving progress when encountering errors or dead ends. + ## Example: Search Agent This agent: