Skip to content

Commit 3e39af0

Browse files
committed
Mention prompt templates in system prompts docs, closes #131
1 parent f5ec484 commit 3e39af0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/usage.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,23 @@ This is useful for piping content to standard input, for example:
6969
curl -s 'https://simonwillison.net/2023/May/15/per-interpreter-gils/' | \
7070
llm -s 'Suggest topics for this post as a JSON array'
7171
```
72+
Different models support system prompts in different ways.
73+
74+
The OpenAI models are particularly good at using system prompts as instructions for how they should process additional input sent as part of the regular prompt.
75+
76+
Other models might use system prompts change the default voice and attitude of the model.
77+
78+
System prompts can be saved as {ref}`templates <prompt-templates>` to create reusable tools. For example, you can create a template called `pytest` like this:
79+
80+
```bash
81+
llm -s 'write pytest tests for this code' --save pytest
82+
```
83+
And then use the new template like this:
84+
```bash
85+
cat llm/utils.py | llm -t pytest
86+
```
87+
See {ref}`prompt templates <prompt-templates>` for more.
88+
7289
## Listing available models
7390

7491
The `llm models` command lists every model that can be used with LLM, along with any aliases:

0 commit comments

Comments
 (0)