Skip to content

Commit

Permalink
Mention prompt templates in system prompts docs, closes #131
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Aug 20, 2023
1 parent f5ec484 commit 3e39af0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,23 @@ This is useful for piping content to standard input, for example:
curl -s 'https://simonwillison.net/2023/May/15/per-interpreter-gils/' | \
llm -s 'Suggest topics for this post as a JSON array'
```
Different models support system prompts in different ways.

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.

Other models might use system prompts change the default voice and attitude of the model.

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:

```bash
llm -s 'write pytest tests for this code' --save pytest
```
And then use the new template like this:
```bash
cat llm/utils.py | llm -t pytest
```
See {ref}`prompt templates <prompt-templates>` for more.

## Listing available models

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

0 comments on commit 3e39af0

Please sign in to comment.