From 7106b01f909585cc3f55489b37c5c9125159562b Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 12 Dec 2025 10:06:27 +0800 Subject: [PATCH] Refactor DESIGN.md to clarify configuration options for search processing tools - Updated comments and structure in the configuration section to better distinguish between keyword extraction, QueryDSL generation, and rerank options. - Removed redundant comments and streamlined the configuration keys for improved clarity and consistency. - Enhanced documentation to reflect the new organization of configuration settings, aiding in understanding the search module's functionality. --- agent/search/DESIGN.md | 56 ++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/agent/search/DESIGN.md b/agent/search/DESIGN.md index e3ae144b..f68bbbbb 100644 --- a/agent/search/DESIGN.md +++ b/agent/search/DESIGN.md @@ -676,19 +676,18 @@ These are the hardcoded defaults when no configuration is provided: ```go // search/config/defaults.go var SystemDefaults = Config{ - // Query processing options - Query: QueryConfig{ - Keyword: KeywordConfig{ - MaxKeywords: 10, - Language: "auto", - }, - DSL: DSLConfig{ - Strict: false, - }, - // Note: Entity & Embedding config follow KB collection settings + // Keyword extraction options (uses.keyword) + Keyword: KeywordConfig{ + MaxKeywords: 10, + Language: "auto", }, - // Rerank options + // QueryDSL generation options (uses.query) + Query: QueryConfig{ + Strict: false, + }, + + // Rerank options (uses.rerank) Rerank: RerankConfig{ TopN: 10, }, @@ -737,19 +736,18 @@ var SystemDefaults = Config{ "max_results": 20 }, - // Query processing options - "query": { - "keyword": { - "max_keywords": 10, - "language": "auto" // "auto", "en", "zh", etc. - }, - "dsl": { - "strict": false // Strict mode: fail if DSL generation fails - } - // Note: entity & embedding follow KB collection config + // Keyword extraction options (uses.keyword) + "keyword": { + "max_keywords": 10, + "language": "auto" // "auto", "en", "zh", etc. }, - // Rerank options + // QueryDSL generation options (uses.query) + "query": { + "strict": false // Strict mode: fail if generation fails + }, + + // Rerank options (uses.rerank) "rerank": { "top_n": 10 // Return top N results after reranking }, @@ -808,14 +806,14 @@ var SystemDefaults = Config{ "max_results": 20 }, - // Overrides global query processing options + // Overrides global keyword options + "keyword": { + "max_keywords": 5 + }, + + // Overrides global query options "query": { - "keyword": { - "max_keywords": 5 - }, - "dsl": { - "strict": true - } + "strict": true }, // Overrides global rerank options