Skip to main content

Internal prompt catalog

This module documents every fixed model-facing prompt and prompt wrapper shipped in Aivory 2.4.6. It covers the main chat system prompt, internal task-model calls, retrieval and memory jobs, image and research flows, Verify, tool-loop instructions, and the built-in document-generation skill.

The source code is canonical. The files covered here are unchanged between the v2.4.6 tag and the current application main branch at the time this catalog was completed.

Publication boundary

The catalog publishes fixed source strings and exact assembly rules. It does not publish instance or user data:

  • administrator-configured model system prompts, moderation categories, or custom compaction instructions;
  • personas, nicknames, custom instructions, project instructions, administrator/user skill bodies, or memories;
  • document names, uploaded file contents, excerpts, user messages, assistant answers, search results, or tool output;
  • API keys, channel configuration, database content, or provider payloads from a real request.

For those values the documentation shows placeholders, boundary tags, insertion order, and trust level. A placeholder such as <USER_MESSAGE> describes a runtime value; it is not literal prompt text.

Complete coverage matrix

AreaFixed prompt or wrapperDocumented in
Main chatidentity, default style, date grounding, persona headers, trust boundaryMain chat system prompt
Main chatnative/prompt tool guidance, sandbox paths, skills, project, memory, documentsMain chat system prompt
Message layerRAG block, selected user skills, spreadsheet preview, selected excerpt, continuation summaryMain chat system prompt
Metadataconversation title system prompt and locale directiveTask prompts
Automationautomatic tool route and request envelopeTask prompts
Automationforced-search query generation and fallbackTask prompts
Contextcompaction system prompt, request template, merge labels, reinjection wrapperTask prompts
Compatibilitycross-vendor downgrade promptTask prompts
Retrievaluploaded-document router and request rulesRetrieval, memory, and safety
Retrievaliterative evidence judge and JSON payloadRetrieval, memory, and safety
Retrievaloversized-document map-reduce extractorRetrieval, memory, and safety
Memoryextraction, conflict adjudication, semantic deduplicationRetrieval, memory, and safety
Safetygeneric and administrator-category moderation promptsRetrieval, memory, and safety
Imagesdirect image intent planner and prompt optimizerImage, Deep Research, and Verify
Imagesfaithful edit wrapper applied before the image providerImage, Deep Research, and Verify
Deep Researchplanner, coverage verifier, cross-validatorImage, Deep Research, and Verify
Deep Researchcommon writer rules, three report structures, no-evidence writerImage, Deep Research, and Verify
Verifyauditor system prompt and question/answer envelopeImage, Deep Research, and Verify
Toolsprompt-mode preamble, stop sequence, result/error wrappers, malformed-call retryTool protocol and built-in skills
Toolsbudget/no-progress finalization instructions and public tool errorsTool protocol and built-in skills
Documentsbuilt-in document-generation skill and self-check recipesTool protocol and built-in skills

How to read the templates

Each page distinguishes four model-facing layers:

  1. System prompt: highest-priority authored instruction sent by the application.
  2. Request template: a user-layer body constructed by the server for an internal task.
  3. Dynamic data: runtime content inserted into a template. Its trust boundary is stated explicitly.
  4. Output contract and fallback: accepted output shape, normalization, and what the server does when the model fails.

Some prompts are assembled conditionally rather than stored as one constant. In those cases the page lists the exact fixed fragments and the exact order used by composeSystemPrompt. Authored main-chat fragments are localized for English, Simplified Chinese, Traditional Chinese, Japanese, and French in prompt_l10n.go; the English page shows the canonical English strings and the Chinese page shows the actual Simplified Chinese strings.

Change policy

Prompt changes are behavior changes. A release that changes a fixed contract should update this module, its coverage matrix, and the linked source version together. Private runtime values must never be copied into documentation, issues, screenshots, or release notes.