diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-22 11:48:05 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-23 09:36:05 +0000 |
| commit | 778c365cd9979cc5ab5eb7df8e7ec5d1ab834495 (patch) | |
| tree | e65d67a8e17d231f97b9bead6a5fe24625674cfb /pkg/aflow/testdata/TestLLMTool.llm.json | |
| parent | 105fca7bca1cf22d126f02ee395e0cd7c8d7469a (diff) | |
pkg/aflow: add LLMTool
LLMTool acts like a tool for the parent LLM, but is itself implemented as an LLM agent.
It can have own tools, different from the parent LLM agent.
It can do complex multi-step research, and provide a concise answer to the parent LLM
without polluting its context window.
Diffstat (limited to 'pkg/aflow/testdata/TestLLMTool.llm.json')
| -rw-r--r-- | pkg/aflow/testdata/TestLLMTool.llm.json | 541 |
1 files changed, 541 insertions, 0 deletions
diff --git a/pkg/aflow/testdata/TestLLMTool.llm.json b/pkg/aflow/testdata/TestLLMTool.llm.json new file mode 100644 index 000000000..7579aa970 --- /dev/null +++ b/pkg/aflow/testdata/TestLLMTool.llm.json @@ -0,0 +1,541 @@ +[ + { + "Model": "model", + "Config": { + "systemInstruction": { + "parts": [ + { + "text": "Do something!\nPrefer calling several tools at the same time to save round-trips.\n" + } + ], + "role": "user" + }, + "temperature": 1, + "tools": [ + { + "functionDeclarations": [ + { + "description": "researcher description", + "name": "researcher", + "parametersJsonSchema": { + "additionalProperties": false, + "properties": { + "Question": { + "description": "Question you have.", + "type": "string" + } + }, + "required": [ + "Question" + ], + "type": "object" + }, + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "Answer": { + "description": "Answer to your question.", + "type": "string" + } + }, + "required": [ + "Answer" + ], + "type": "object" + } + } + ] + } + ], + "responseModalities": [ + "TEXT" + ] + }, + "Request": [ + { + "parts": [ + { + "text": "Prompt" + } + ], + "role": "user" + } + ] + }, + { + "Model": "sub-agent-model", + "Config": { + "systemInstruction": { + "parts": [ + { + "text": "researcher instruction\nPrefer calling several tools at the same time to save round-trips.\n" + } + ], + "role": "user" + }, + "temperature": 2, + "tools": [ + { + "functionDeclarations": [ + { + "description": "researcher-tool description", + "name": "researcher-tool", + "parametersJsonSchema": { + "additionalProperties": false, + "properties": { + "Something": { + "description": "something", + "type": "string" + } + }, + "required": [ + "Something" + ], + "type": "object" + }, + "responseJsonSchema": { + "additionalProperties": false, + "type": "object" + } + } + ] + } + ], + "responseModalities": [ + "TEXT" + ] + }, + "Request": [ + { + "parts": [ + { + "text": "What do you think?" + } + ], + "role": "user" + } + ] + }, + { + "Model": "sub-agent-model", + "Config": { + "systemInstruction": { + "parts": [ + { + "text": "researcher instruction\nPrefer calling several tools at the same time to save round-trips.\n" + } + ], + "role": "user" + }, + "temperature": 2, + "tools": [ + { + "functionDeclarations": [ + { + "description": "researcher-tool description", + "name": "researcher-tool", + "parametersJsonSchema": { + "additionalProperties": false, + "properties": { + "Something": { + "description": "something", + "type": "string" + } + }, + "required": [ + "Something" + ], + "type": "object" + }, + "responseJsonSchema": { + "additionalProperties": false, + "type": "object" + } + } + ] + } + ], + "responseModalities": [ + "TEXT" + ] + }, + "Request": [ + { + "parts": [ + { + "text": "What do you think?" + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionCall": { + "id": "id1", + "args": { + "Something": "subtool input 1" + }, + "name": "researcher-tool" + } + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionResponse": { + "id": "id1", + "name": "researcher-tool" + } + } + ], + "role": "user" + } + ] + }, + { + "Model": "model", + "Config": { + "systemInstruction": { + "parts": [ + { + "text": "Do something!\nPrefer calling several tools at the same time to save round-trips.\n" + } + ], + "role": "user" + }, + "temperature": 1, + "tools": [ + { + "functionDeclarations": [ + { + "description": "researcher description", + "name": "researcher", + "parametersJsonSchema": { + "additionalProperties": false, + "properties": { + "Question": { + "description": "Question you have.", + "type": "string" + } + }, + "required": [ + "Question" + ], + "type": "object" + }, + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "Answer": { + "description": "Answer to your question.", + "type": "string" + } + }, + "required": [ + "Answer" + ], + "type": "object" + } + } + ] + } + ], + "responseModalities": [ + "TEXT" + ] + }, + "Request": [ + { + "parts": [ + { + "text": "Prompt" + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionCall": { + "id": "id0", + "args": { + "Question": "What do you think?" + }, + "name": "researcher" + } + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionResponse": { + "id": "id0", + "name": "researcher", + "response": { + "Answer": "Nothing." + } + } + } + ], + "role": "user" + } + ] + }, + { + "Model": "sub-agent-model", + "Config": { + "systemInstruction": { + "parts": [ + { + "text": "researcher instruction\nPrefer calling several tools at the same time to save round-trips.\n" + } + ], + "role": "user" + }, + "temperature": 2, + "tools": [ + { + "functionDeclarations": [ + { + "description": "researcher-tool description", + "name": "researcher-tool", + "parametersJsonSchema": { + "additionalProperties": false, + "properties": { + "Something": { + "description": "something", + "type": "string" + } + }, + "required": [ + "Something" + ], + "type": "object" + }, + "responseJsonSchema": { + "additionalProperties": false, + "type": "object" + } + } + ] + } + ], + "responseModalities": [ + "TEXT" + ] + }, + "Request": [ + { + "parts": [ + { + "text": "But really?" + } + ], + "role": "user" + } + ] + }, + { + "Model": "sub-agent-model", + "Config": { + "systemInstruction": { + "parts": [ + { + "text": "researcher instruction\nPrefer calling several tools at the same time to save round-trips.\n" + } + ], + "role": "user" + }, + "temperature": 2, + "tools": [ + { + "functionDeclarations": [ + { + "description": "researcher-tool description", + "name": "researcher-tool", + "parametersJsonSchema": { + "additionalProperties": false, + "properties": { + "Something": { + "description": "something", + "type": "string" + } + }, + "required": [ + "Something" + ], + "type": "object" + }, + "responseJsonSchema": { + "additionalProperties": false, + "type": "object" + } + } + ] + } + ], + "responseModalities": [ + "TEXT" + ] + }, + "Request": [ + { + "parts": [ + { + "text": "But really?" + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionCall": { + "id": "id2", + "args": { + "Something": "subtool input 2" + }, + "name": "researcher-tool" + } + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionResponse": { + "id": "id2", + "name": "researcher-tool" + } + } + ], + "role": "user" + } + ] + }, + { + "Model": "model", + "Config": { + "systemInstruction": { + "parts": [ + { + "text": "Do something!\nPrefer calling several tools at the same time to save round-trips.\n" + } + ], + "role": "user" + }, + "temperature": 1, + "tools": [ + { + "functionDeclarations": [ + { + "description": "researcher description", + "name": "researcher", + "parametersJsonSchema": { + "additionalProperties": false, + "properties": { + "Question": { + "description": "Question you have.", + "type": "string" + } + }, + "required": [ + "Question" + ], + "type": "object" + }, + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "Answer": { + "description": "Answer to your question.", + "type": "string" + } + }, + "required": [ + "Answer" + ], + "type": "object" + } + } + ] + } + ], + "responseModalities": [ + "TEXT" + ] + }, + "Request": [ + { + "parts": [ + { + "text": "Prompt" + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionCall": { + "id": "id0", + "args": { + "Question": "What do you think?" + }, + "name": "researcher" + } + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionResponse": { + "id": "id0", + "name": "researcher", + "response": { + "Answer": "Nothing." + } + } + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionCall": { + "id": "id2", + "args": { + "Question": "But really?" + }, + "name": "researcher" + } + } + ], + "role": "user" + }, + { + "parts": [ + { + "functionResponse": { + "id": "id2", + "name": "researcher", + "response": { + "Answer": "Still nothing." + } + } + } + ], + "role": "user" + } + ] + } +]
\ No newline at end of file |
