Skip to content

Commit ddcc6e5

Browse files
committedSep 5, 2024·
docs: add information on loading scenarios from external files
1 parent abc15a3 commit ddcc6e5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎site/docs/configuration/scenarios.md

+9
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ Here is the structure of a `Scenario`:
8282
| config | `Partial<TestCase>[]` | Yes | An array of variable sets. Each set will be run through the tests. |
8383
| tests | `TestCase[]` | Yes | The tests to be run on each set of variables. |
8484

85+
Scenarios can also be loaded from external files. To reference an external file, use the `file://` prefix:
86+
87+
```yaml
88+
scenarios:
89+
- file://path/to/your/scenario.yaml
90+
```
91+
92+
The external file should follow the same structure as inline scenarios.
93+
8594
This functionality allows you to easily run a wide range of tests without having to manually create each one. It also keeps your configuration file cleaner and easier to read.
8695

8796
[1]: https://github.com/promptfoo/promptfoo/tree/main/examples/multiple-translations-scenarios

0 commit comments

Comments
 (0)
Please sign in to comment.