Skip to content

Customize Instructions and Prompts

Use Settings → Instructions to change how Numi responds to you. Editing the server's base prompt is only needed when you want to change behavior for the whole instance.

Set your instructions

  1. Open your profile menu at the bottom of the sidebar and select Settings.
  2. Select Instructions and enter your preferences. For example:
Keep answers concise. Use metric units. For code changes, explain how to verify the result.
  1. Select Save Changes, which appears after you edit the text.
  2. Start a new chat and try a representative request to check the result.

Preferences are stored for your account. The runtime reloads them when preparing model requests, including requests in existing chats. Starting a new chat makes it easier to assess the change without earlier conversation instructions.

Keep instructions specific to how you want the assistant to work. Use Memory Profile and Saved Preferences to inspect stored facts instead of repeating them in this field.

For a custom client, save the same field through the settings API:

curl -X POST http://localhost:4567/api/v1/me/settings \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"personal_preferences": "Keep answers concise. Use metric units."}'

Developer: change the base prompt

The shared instructions are defined as constants in src/numi_chat/agent/prompt_builder.py. _base_system_sections() selects their order, and build_system_prompt() joins them into the system message.

  1. Edit the section responsible for the behavior you want to change, such as TONE_AND_STYLE for response style.
  2. Keep the citation and tool-result rules intact. The UI uses markers such as [web:1] and [file:2] to connect claims to returned sources.
  3. Restart or rebuild the server, depending on how it is deployed.
  4. Start a new chat and test the affected behavior. Include a tool-using request if you changed tool or citation instructions.

Existing chats retain their stored system message. A base-prompt edit therefore needs a new chat to take effect; it does not rewrite earlier conversations.

How the prompt is assembled

Component Contents Where it is built
Stored system message Shared behavior, safety, formatting, and tool rules prompt_builder.py
Context at the first user message Current UTC date/time, account instructions, selected memory, and optional-tool availability context_layers.py and Agent._first_user_context()
Context attached to a user turn Uploaded-file metadata and bounded PDF text build_additional_data_section() in prompt_builder.py

The runtime wraps account context in <user_context> and adds it to the outgoing message array without inserting a visible chat message. Date/time is part of that context, not appended to the newest question. Tool schemas are sent separately by the model adapter.

Keeping the system prefix stable can help provider prompt caching. It does not guarantee cache hits: those depend on the provider, model, and request contents.

When instructions do not have the expected effect

Check for conflicting preferences or instructions in the current conversation. Try the same request in a new chat, then compare models if the behavior still varies. A prompt expresses the desired behavior; it cannot add tools or model capabilities the instance does not have.

The default preference budget is 2,500 characters. Longer saved instructions are clipped when included in a request. See Prompt settings for limits on preferences, explicit memories, history, and PDF context. Avoid logging complete outgoing prompts on a live instance: they contain users' messages, instructions, and stored facts.