You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/build-workflows/workflow-configuration.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,23 @@ From the above we see that it is divided into four sections: `functions`, `llms`
71
71
### `functions`
72
72
The `functions` section contains the tools used in the workflow, in our example we have two `webpage_query` and `current_datetime`. By convention, the key matches the `_type` value, however this is not a strict requirement, and can be used to include multiple instances of the same tool.
73
73
74
+
#### Thought process description
75
+
76
+
Agent responses in the NeMo Agent Toolkit UI include a thought process display which shows a step-by-step view of what the workflow is doing.
77
+
78
+
To customize the text shown for a function in the thought process display, set `thought_description` in that function's configuration. Unlike `description`, which provides the tool's help text that the agent uses to decide when and how to call the tool, `thought_description` only affects the label shown in the thought process display. For example:
description: "Search for information about LangSmith. For any questions about LangSmith, you must use this tool!"
87
+
embedder_name: nv-embedqa-e5-v5
88
+
chunk_size: 512
89
+
```
90
+
If `thought_description` is not set, NeMo Agent Toolkit uses a default thought description. For runtime customization of the thought process display from within your function code, refer to [Customizing Thought Process Display](../extend/custom-components/custom-functions/functions.md#customizing-thought-process-display).
74
91
75
92
### `llms`
76
93
This section contains the models used in the workflow. The `_type` value refers to the API hosting the model, in this case `nim` refers to an NIM model hosted on [`build.nvidia.com`](https://build.nvidia.com).
Every function has its own set of converters and are independent of the converters used by other functions. This allows for functions to convert between common types such as`str`->`dict`or`int`->`float` without breaking the type safety of other functions.
560
560
561
+
## Customizing Thought Process Display
562
+
563
+
Agent responses in the NeMo Agent Toolkit UI include a thought process display that shows a step-by-step view of what the workflow is doing. You can customize what appears in this display at two levels:
564
+
565
+
***Function-level customization**- Set a custom label for the entire function using `thought_description`in the configuration
566
+
***Runtime customization**- Emit custom thoughts from within your function code for fine-grained progress updates
567
+
568
+
### Function-Level Customization
569
+
570
+
The simplest way to customize the thought process display is by setting `thought_description`in your function's YAML configuration. Refer to the [Workflow Configuration](../../../build-workflows/workflow-configuration.md#thought-process-description) documentation for details.
571
+
572
+
### Runtime Customization with Custom Thoughts
573
+
574
+
For fine-grained control during function execution, you can emit custom thoughts that appear as steps in the thought process display. NeMo Agent Toolkit provides helper functions in {py:mod}`nat.builder.thought`for emitting thoughts:
575
+
576
+
* {py:func}`~nat.builder.thought.emit_thought`- Emit a complete thought (appears immediately)
577
+
* {py:func}`~nat.builder.thought.emit_thought_start`- Start a streaming thought
578
+
* {py:func}`~nat.builder.thought.emit_thought_chunk`- Update a streaming thought
579
+
* {py:func}`~nat.builder.thought.emit_thought_end`- Complete a streaming thought
580
+
581
+
#### Emitting Complete Thoughts
582
+
Each call to {py:func}`~nat.builder.thought.emit_thought`in the example below appears as a completed step in the thought process display.
- [Writing Custom Function Groups](./function-groups.md) - Learn how to bundle related functions that can share configuration, resources, and runtime context.
0 commit comments