An assistant's role and tone often need to stay consistent from one conversation to the next. AnythingLLM stores these instructions in a workspace system prompt so replies can follow a chosen style without repeating the instructions in each message.

The workspace prompt replaces the default instruction text for that workspace and is reused across its threads. The instance-wide Default System Prompt is a separate setting that applies to workspaces created later.

Compliance depends on the selected chat model. System instructions can shape response wording, but they do not enforce access controls or guarantee factual answers; a saved prompt still needs a reply that demonstrates the requested behavior.

Steps to set a system prompt in AnythingLLM:

  1. Click the gear beside your workspace's name in the sidebar.

    An existing workspace with a working chat provider is required. Lumen Desk is the pictured workspace; your own workspace can have any name.
    Related: How to set the Ollama provider in AnythingLLM

  2. Open the Chat Settings tab.
  3. Select Chat under Chat mode.

    New workspaces start in Agent mode, which can invoke tools automatically with a compatible model. Chat allows a plain question-and-answer check without entering an agent session; Query can refuse a question when no document context is found. The mode selection saves automatically.

  4. Click the existing instruction text under System Prompt.

    The text panel becomes an editable box. Changes here affect subsequent replies across the workspace's threads.

  5. Replace the text with the following system instructions.
    You are a helpful assistant. Begin every reply with the exact words "Lumen desk:". Answer the question in one short sentence.

    The opening phrase makes the instruction visible in a reply. Your own prompt can describe the assistant's role, tone and response format; replacing the text removes the previous instructions.

  6. Click the System Prompt heading outside the text box to save the change.

    The editor closes and a brief Saved indicator appears beside the heading. A separate Save button is not required.

  7. Reload the page with Ctrl+R or Command+R on macOS.
  8. Confirm that System Prompt still contains your saved instructions after the reload.

    A return to the old text means the change did not persist.

  9. Click New Thread beneath the workspace in the sidebar.

    A fresh thread keeps earlier messages from influencing the instruction check.

  10. Enter What is the capital of France? in Send a message.
  11. Submit the message with Enter.
  12. Check that the reply begins with Lumen desk:.

    Example output: Lumen desk: The capital of France is Paris. A reply without the opening phrase does not demonstrate compliance, even if the factual answer is right.

Share this guide