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.
This commit is contained in:
Max 2025-12-12 10:15:47 +08:00
parent f54be0d909
commit 2d917d6cd8

View file

@ -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/<assistant-id>/package.yao`
2. **Global Configuration** - `agent/agent.yml` (uses) + `agent/search.yao` (search options)
3. **Assistant Configuration** - `assistants/<assistant-id>/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