Voxta docs

Prompt formatting

How Voxta builds the final prompt sent to the LLM, and how to pick the right format for the model you're running.

Prompt formatting is the wrapper Voxta puts around character data, scenario state, and chat history before sending it to the LLM. Different LLMs expect different formats. Llama 3, Mistral and ChatML each want a different prompt shape.

Voxta ships prompt formatting templates for the common formats and auto-detects the right one when you load a model. You can also override the template manually per-service if auto-detect picks wrong.

When the default works

For most LLMs Voxta picks the right format automatically. Cloud services (OpenAI, Anthropic, Voxta Cloud, etc.) use their providers' native formats and don't need configuration. Local GGUF/EXL2 models usually come with metadata that tells Voxta which format to use.

You only need to think about prompt formatting when:

  • Auto-detect picks wrong: you see weird repetitions, formatting noise, or "stop" tokens leaking into output.
  • You're using a model with an unusual template: fine-tunes sometimes diverge from their base model's format.
  • You want a custom template for a specific use case.

Where to find it

Open Settings › AI Setup › Manage Modules, open your LLM module and switch to Presets. Look for Prompt Formatting Templates. It appears for local backends such as llama.cpp, ExLlamaV3 and OpenAI-compatible servers. The dropdown shows:

  • Auto (detect from the model): reads the model's own chat template and architecture. Recommended default.
  • Specific templates: pick one manually if auto-detect is wrong (Llama 3, ChatML, Mistral Instruct, Alpaca, Vicuna, etc.).

How the conversation is laid out

Separate from the template, the preset's Formatting Style decides how the chat's messages are arranged in the prompt for Companion and Roleplay chats. Assistant chats always use multi-turn.

StyleWhat it does
Multi-Turn with Name PrefixEach message is its own turn, with the speaker's name in front. The default.
Multi-TurnEach message is its own turn, without names.
InstructThe whole conversation sent as one user message.

Every built-in preset uses Multi-Turn with Name Prefix, and Voxta moved existing presets off Instruct when it upgraded. Instruct lost the default for two reasons:

  • It has nowhere to put a tool call. A call rides an assistant turn and its result a tool turn, and a single user message has neither.
  • It can't be cached. The clock and memories sit above the whole conversation inside the one message, so the prompt changes a few hundred tokens in every turn. Backends that reuse a prompt prefix (Voxta Cloud, OpenRouter, the OpenAI and Anthropic APIs, llama.cpp) then re-read all of it. The multi-turn styles put what changes after the history.

Instruct is still there for weaker models that do better with it. Computer vision presets keep it, since they describe one picture rather than a conversation.

In a group chat on the multi-turn styles, only the replying character's own lines go on the assistant role. Another character's lines go on the user role, with their name, so the model doesn't drift into that character's voice.

Symptoms of wrong formatting

If you suspect the wrong template is active, look for:

  • Character output that includes literal tokens like <|im_start|>, [INST], or ### Response:.
  • Replies that repeat the system prompt back at you.
  • Replies that cut off mid-sentence at unusual stop tokens.
  • Characters that speak as a different role (the LLM thinks it's still in user turn).

Switch to a specific template that matches your model's documentation, save and retry.

What's next

On this page