From 53bc662f3e3aef6949dfd1c4be9907eb5c0278d9 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 12 Dec 2025 09:30:19 +0800 Subject: [PATCH] Enhance DESIGN.md with user data source handling details - Updated the section on user message processing to clarify that users only specify data source IDs, with filters generated by the Search module from natural language input. - Added a detailed example illustrating the extraction of queries and the generation of QueryDSL for data sources, improving understanding of the Search module's functionality. --- agent/search/DESIGN.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/agent/search/DESIGN.md b/agent/search/DESIGN.md index f4521ccb..fd5a825f 100644 --- a/agent/search/DESIGN.md +++ b/agent/search/DESIGN.md @@ -938,6 +938,8 @@ const ( ### Message with Data Reference +User only specifies data source IDs. Filters are generated by Search module from natural language. + ```json { "role": "user", @@ -947,11 +949,7 @@ const ( "type": "data", "data": { "sources": [ - { - "type": "model", - "name": "product", - "filters": { "price": { "<": 100 } } - }, + { "type": "model", "name": "product" }, { "type": "kb_collection", "name": "product-docs" } ] } @@ -960,6 +958,12 @@ const ( } ``` +The Search module will: + +1. Extract query from text: "products under $100" +2. For `model:product` → Generate QueryDSL: `{ "wheres": [{ "field": "price", "op": "<", "value": 100 }] }` +3. For `kb_collection:product-docs` → Vector search with query embedding + ### Processing Flow in content.Vision() ```