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.
This commit is contained in:
parent
3a181354ff
commit
53bc662f3e
1 changed files with 9 additions and 5 deletions
|
|
@ -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()
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue