Skip to content

Commit

Permalink
Update the docs with mode examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
klntsky committed Nov 20, 2024
1 parent 75a1634 commit 24751c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Chat history can be preserved by assigning an ID to a prompt: `[some_chat_id$ ..

Subsequent invocations with the same chat ID *within the same module* will have a memory of the preceding conversation.

Chat IDs are actually variables that contain an entire chat history.
Chat IDs are actually variables that contain an entire chat history [(example usage)](../examples/roles.metaprompt).

# Escaping

Expand Down Expand Up @@ -134,9 +134,7 @@ The `hello` module can be used from [another module](../examples/module-demo.met

### `MODEL` switching

`MODEL` variable is used to switch LLM models on the fly.

[(example)](../examples/model-selection-demo.metaprompt)
`MODEL` variable is used to switch LLM models on the fly [(example)](../examples/model-change.metaprompt).

`MODEL` switching only works before an `[:if ...` or a `[$ ... ]` block:

Expand All @@ -148,6 +146,8 @@ The `hello` module can be used from [another module](../examples/module-demo.met
]
```

Dynamic model selection based on a given task description allows to save costs by avoiding calls to costly models when possible [(example)](../examples/model-selection-demo.metaprompt).

### `ROLE` switching

`ROLE` is a special variable used to control LLM input "role".
Expand Down

0 comments on commit 24751c1

Please sign in to comment.