Skip to content

Commit

Permalink
Prompt the LLM to retry/fix actions when using native tools
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed Oct 14, 2024
1 parent 45f1519 commit 6559985
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `BaseTask.add_parent`/`BaseTask.add_child` now only add the parent/child task to the structure if it is not already present.
- `BaseEventListener.flush_events()` to flush events from an Event Listener.
- `BaseEventListener` no longer requires a thread lock for batching events.
- Updated `TookitTask` system prompt to retry/fix actions when using native tool calling.

### Fixed

Expand Down
5 changes: 3 additions & 2 deletions griptape/templates/tasks/toolkit_task/system.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ You must use the following format when executing actions:
Thought: <your step-by-step thought process describing what actions you need to use>
Actions: <JSON array of actions that MUST follow this schema: {{ actions_schema }}>
{{ stop_sequence }}: <action outputs>
...repeat Thought/Actions/{{ stop_sequence }} as many times as you need
"Thought", "Actions", "{{ stop_sequence }}" must always start on a new line. If {{ stop_sequence }} contains an error, you MUST ALWAYS try to fix the error with another Thought/Actions/{{ stop_sequence }}.
"Thought", "Actions", "{{ stop_sequence }}" must always start on a new line.

{% endif %}
Repeat executing actions as many times as you need.
If an action's output contains an error, you MUST ALWAYS try to fix the error by executing another action.
You must use the following format when providing your final answer:
Answer: <final answer>

Expand Down

0 comments on commit 6559985

Please sign in to comment.