From 2d917d6cd8efbb0925ff491adb52a19f0c98c84d Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 12 Dec 2025 10:15:47 +0800 Subject: [PATCH] Update DESIGN.md to clarify configuration hierarchy and usage of processing tools - Refined the description of Global Configuration to specify the roles of `agent/agent.yml` and `agent/search.yao` in search options. - Added detailed information on the `uses` configuration, including keyword extraction, QueryDSL generation, and reranking methods. - Enhanced documentation to improve understanding of how configuration layers interact and override each other, aiding in the customization of the search module. --- agent/search/DESIGN.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/agent/search/DESIGN.md b/agent/search/DESIGN.md index 7bf62480..49f38794 100644 --- a/agent/search/DESIGN.md +++ b/agent/search/DESIGN.md @@ -633,8 +633,8 @@ function Create(ctx, messages, options) { Configuration follows a three-layer hierarchy (later overrides earlier): 1. **System Built-in Defaults** - Hardcoded sensible defaults -2. **Global Configuration** - `agent/agent.yml` + `agent/search.yao` -3. **Assistant Configuration** - `assistants//package.yao` +2. **Global Configuration** - `agent/agent.yml` (uses) + `agent/search.yao` (search options) +3. **Assistant Configuration** - `assistants//package.yao` (uses + search options) ### Uses Configuration @@ -769,6 +769,13 @@ var SystemDefaults = Config{ "name": "My Assistant", "connector": "openai", + // Overrides global uses (agent/agent.yml) + "uses": { + "keyword": "workers.nlp.keyword", // Use LLM for keyword extraction + "query": "workers.nlp.query", // Use LLM for QueryDSL generation + "rerank": "mcp:rerank-server" // Use MCP for reranking + }, + // Search configuration (overrides agent/search.yao) "search": { "web": true, // Enable web search