Skip to content

Commit c60bcf6

Browse files
committed
Add template workflow diagram
1 parent c178bd4 commit c60bcf6

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

assets/template_workflow.png

273 KB
Loading

config/README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ history_processor: Reference to functionality for controlling agent's message hi
6060
parse_function: Parser run on agent output
6161
```
6262
63-
We recommend looking at...
63+
In this directory, we recommend looking at...
6464
* `configs/` for examples of properly formatted configuration files. Each configuration differs in its set of commands, input/output format, demonstrations, etc.
6565
* `commands/` for the bash implementations of the custom commands that SWE-agent uses to navigate + edit the codebase.
6666

@@ -75,4 +75,18 @@ Possible variables that can be used in templates are:
7575
- any variable given in `env_variables` (same spelling), e.g., `{WINDOW_SIZE}`
7676
- any variable extracted as json as part of the `state_command` function
7777
- the last observation `{observation}`
78-
- ... this list will grow as we implement more features!
78+
- ... this list will grow as we implement more features!
79+
80+
## Template Workflow
81+
The following diagram illustrates where each template is shown within a single episode of solving one task instance.
82+
83+
<p align="center">
84+
<img src="../assets/template_workflow.png" alt="Template Workflow">
85+
</p>
86+
87+
One of three templates can be shown per turn:
88+
* "Next Step" (`next_step_template`): Displayed if the model's action successfully runs. The output and a prompt for the next action is shown
89+
* "Next Step (No Output)" (`next_step_no_output_template`): Displayed if the model's action successfully runs, but does not produce any standard output (e.g. `rm`, `cd`)
90+
* "Format Error" (`format_error_template`): Displayed if the model's response is malformed. Over the next two turns...
91+
* If one of the model's next response is correct, the message history is updated such that the "Format Error" turn is not kept. The episode continues.
92+
* If the model's next two responses are both malformed, the episode terminates.

0 commit comments

Comments
 (0)