Text Generation WebUI’s Chat tab has three modes, and picking the wrong one is the most common reason an instruction-tuned model gives flat or wandering replies. The Mode field defines how the chat prompt is formatted, and there are 3 options: chat, chat-instruct, and instruct. Chat-instruct is the middle one: it lets you talk to a character while the model still uses the instruction format it was trained on.
Pick the right model and its instruction template
There are two kinds of models: base models, like Llama and GPT-J, and fine-tuned models, like Alpaca and Vicuna. Fine-tuned models are trained to understand and respond to instructions, and each one was trained on a specific prompt format — you have to use that exact prompt format if you want the model to follow your instructions as accurately as it can. Instruct mode is the plain version of this: it talks to an instruction-following model using the prompt format defined under “Parameters” > “Instruction template”, which the docs describe as an offline ChatGPT. When you load a model in the Model tab, the web UI tries to automatically detect its instruction template from the model metadata, such as tokenizer_config.json or GGUF metadata, and updates the values under “Parameters” > “Instruction template” accordingly. Check the model card on Hugging Face to confirm you are using the correct prompt format. By contrast, the plain chat mode uses a simple Name: Message format with the character’s persona, and the docs say it should typically be used only for base models or non-instruct fine tunes, and should not be used for instruction-following models.
Set the mode and read the command
Open the Chat tab, show the sidebar controls with “Show controls” (shortcut Ctrl+S), and set Mode to chat-instruct. The chat-instruct mode allows you to use the instruction templates to generate a chat reply, thus mixing Chat and Instruct modes. It works by creating a single instruction-following turn where a command is given followed by the regular chat prompt. The sidebar also shows the “Command for chat-instruct mode”: the command used in chat-instruct mode to query the model to generate a reply on behalf of the character. Inside this string, <|character|> is a placeholder that gets replaced with the bot name, and <|prompt|> is a placeholder that gets replaced with the full chat prompt. The docs’ default command is:
Continue the chat dialogue below. Write a single reply for the character "Chiharu Yamada".
In the Alpaca format, that command becomes one instruction turn, with the persona and the chat history inside it, and the reply starts after ### Response: with the character’s name:
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Continue the chat dialogue below. Write a single reply for the character "Chiharu Yamada".
Chiharu Yamada's Persona: Chiharu Yamada is a young, computer engineer-nerd with a knack for problem solving and a passion for technology.
You: Hi there!
Chiharu Yamada: Hello! It's nice to meet you. What can I help with?
You: How are you?
### Response:
Chiharu Yamada:
Try it, then try a creative command
Load an instruction-tuned model, pick the docs’ example character Chiharu Yamada, set the mode to chat-instruct, and send “Hi there!” followed by “How are you?” The model should answer as Chiharu Yamada in a single reply. Then try the docs’ own creative use of the command field: instead of writing something trivial like “Write a single reply for the character”, you can write a more complex instruction, such as:
This is an adventure game, and your task is to write a reply in name of "<|character|>" where 3 options are given for the user to then choose from.
That turns one chat turn into a small game menu, with the character offering three options for you to pick from.
| Check | What you should see | If you do not see it |
|---|---|---|
| Mode | The Mode dropdown in the Chat tab sidebar reads chat-instruct |
Show the sidebar controls first — “Show controls”, shortcut Ctrl+S |
| Template | The instruction template under “Parameters” > “Instruction template” matches the model, for example Alpaca | Check the model card on Hugging Face — the template must be the one the model was trained on |
| Command | The “Command for chat-instruct mode” field holds the instruction, with <|character|> as the bot name placeholder |
You are in plain chat mode, where there is no command field |
| Reply | One reply written as the character, in the character’s voice | The model answers as a generic assistant — the mode or the template is wrong |
Expected result. We checked Text Generation WebUI’s own Chat Tab docs for the three modes, the Alpaca and Llama-2-chat formats, the chat-instruct command and its placeholders, the default command, and the adventure-game example. We did not run Text Generation WebUI.
Limits
Instruction-following models have to be used with the exact prompt format they were trained on; using any other format is undefined behaviour, and the model will still generate replies, but they will be less accurate. Chat-instruct produces a single reply for the character per turn — it is not a free-form continuation. Plain chat mode should not be used for instruction-following models, and pure instruct mode has no character persona at all, so neither is a substitute when you want both. The character Chiharu Yamada and the persona above are the docs’ own example, not a real person. We did not run Text Generation WebUI, so no reply here is a recorded result.
