#15839·chatwoot

[Feature Request] Make Captain System Prompt Core Rules configurable instead of hardcoded in source files

Author: md-riazCreated Sep 16, 2026Updated Sep 17, 2026
LabelsCaptainFeature

Summary

Currently, Captain's AI Assistant system prompts rely on static, hardcoded base rules defined in source files (such as \enterprise/lib/captain/prompts/snippets/core_rules.liquid\ and \enterprise/app/services/captain/llm/system_prompts_service.rb). For instance, rules like:

- Do not use lists, markdown, bullet points, numbered steps, or other formatting that is not typically spoken.

Problem Description

  1. Contradiction with Custom UI Guidelines: When administrators configure custom Response Guidelines or Guardrails in the Chatwoot UI (e.g. requesting markdown lists or structured formatting for web/messaging channels), both the hardcoded restrictions and custom guidelines are injected into the payload. This creates direct prompt contradictions that confuse LLMs, resulting in repetition loops or output generation failures.
  2. Model Variation & Sensitivity: Prompt requirements vary significantly across different LLMs (OpenAI, Anthropic, local models, etc.) and model sizes. Static prompts in code files hinder optimization for specific models.
  3. Agent Persona & Channel Diversity: Different AI agents have distinct use-cases and communication channels (e.g. voice vs. WhatsApp/web chat). Global hardcoded formatting rules are not suitable for all agents.

Proposed Solution

  • Make Captain base system prompt rules configurable via Super Admin settings, Account Settings, or per-AI Agent settings in the UI.
  • Allow toggling or customizing base formatting rules so they do not contradict custom Response Guidelines and Guardrails.