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() ```