Skip to main content
Browse docs

Configuring System Prompts

This tutorial covers how to set up system prompts for the Keeptrusts chat workbench, configure team-specific prompts, use template-based system prompts, and test their effectiveness.

Use this page when

  • You need to configure system prompts at the gateway level or per-team for the chat workbench.
  • You want to write effective system prompts that define role, scope, and behavioral constraints.
  • You are testing prompt effectiveness and iterating based on user feedback and event logs.

Primary audience

  • Primary: Technical Engineers (gateway/team administrators configuring prompts)
  • Secondary: Technical Leaders (governance via prompt constraints), AI Agents (prompt design)

Prerequisites

  • Administrator or team-admin access to the Keeptrusts management console
  • A configured gateway with at least one model provider
  • Familiarity with the first conversation tutorial

Step 1: Understand System Prompts in Keeptrusts

A system prompt is a hidden instruction sent to the model at the start of every conversation. It shapes the model's behavior, tone, and scope. In Keeptrusts, system prompts are configured at the gateway level and can be customized per team.

System prompts serve several governance purposes:

  • Role definition — Tell the model what role it should play (e.g., legal advisor, technical writer).
  • Scope constraints — Limit the model to specific topics or domains.
  • Compliance guidance — Instruct the model to follow organizational rules.
  • Output formatting — Specify how responses should be structured.

Step 2: View the Current System Prompt

  1. Open the management console.
  2. Navigate to Settings > Gateway Configuration (or the relevant gateway's settings).
  3. Look for the System Prompt section.
  4. The current system prompt is displayed. If none is set, the model uses its default behavior.

Step 3: Write an Effective System Prompt

A good system prompt is clear, specific, and concise. Here is a template:

You are [role] for [organization].

Your responsibilities:
- [Primary function]
- [Secondary function]

Rules:
- [Constraint 1]
- [Constraint 2]
- [Constraint 3]

When you are unsure, [fallback behavior].

Always [mandatory behavior].
You are a legal research assistant for Acme Corporation.

Your responsibilities:
- Assist with legal research questions related to contract law, compliance, and regulation.
- Summarize legal documents and highlight key provisions.

Rules:
- Never provide definitive legal advice. Always recommend consulting a licensed attorney.
- Do not draft binding legal documents.
- Cite sources when referencing specific laws or regulations.

When you are unsure about a legal interpretation, clearly state the ambiguity
and suggest consulting a subject-matter expert.

Always include a disclaimer that your responses are for informational purposes only.

Step 4: Configure a System Prompt

  1. In the console, navigate to your gateway's configuration.
  2. Locate the System Prompt field.
  3. Enter or paste your system prompt text.
  4. Click Save.

Alternatively, system prompts can be defined in a gateway policy configuration file:

gateway:
system_prompt: |
You are a helpful assistant for Acme Corporation.
Follow all company policies regarding data handling.
Do not share confidential information.
Always recommend human oversight for critical decisions.

After saving, the system prompt takes effect for new conversations. Existing conversations continue with the prompt that was active when they started.

Step 5: Set Up Per-Team System Prompts

Different teams often need different system prompt behaviors. Keeptrusts supports team-scoped system prompts:

  1. Navigate to Settings > Teams in the console.
  2. Select the team you want to configure.
  3. Find the System Prompt section in team settings.
  4. Enter the team-specific system prompt.
  5. Save the configuration.

Example team prompts

TeamSystem Prompt Focus
LegalLegal research assistant, always disclaim, cite sources
EngineeringTechnical assistant, follow coding standards, reference architecture docs
FinanceFinancial analysis helper, never provide investment advice, cite regulations
HREmployee resource assistant, maintain confidentiality, follow labor law guidelines
Customer SupportCustomer-facing tone, use approved templates, escalate complex issues

When a team member opens the chat workbench, the team's system prompt is automatically applied.

Step 6: Use Template-Based System Prompts

For organizations with many teams, template-based system prompts reduce repetition:

Creating a prompt template

  1. In the console, navigate to Templates (or Configuration Templates).
  2. Create a new template with variables:
You are a {{role}} for {{organization}}.

Your department is {{department}}.

Rules:
- Follow all {{organization}} policies.
- {{department_rules}}
- Always maintain professional tone.
- Escalate sensitive topics to a human supervisor.

{{additional_instructions}}

Applying a template to a team

  1. Open the team's settings.
  2. Select the template from the System Prompt Template dropdown.
  3. Fill in the template variables:
VariableValue
rolecompliance research assistant
organizationAcme Corporation
departmentLegal & Compliance
department_rulesNever provide binding legal interpretations
additional_instructionsCite EU AI Act articles when discussing AI regulation
  1. Save. The template is rendered and applied as the team's system prompt.

Step 7: Test System Prompt Effectiveness

After configuring a system prompt, verify it works as intended:

Test 1: Role adherence

Send a message asking the model to act outside its defined role:

Can you write a poem about the sunset?

If the system prompt scopes the model to legal research, it should redirect or decline.

Test 2: Constraint enforcement

Test the model's compliance with specific rules:

Draft a legally binding contract for a vendor agreement.

The model should decline if the system prompt prohibits drafting binding documents.

Test 3: Fallback behavior

Ask an ambiguous question:

Is this contract clause enforceable?

The model should express uncertainty and recommend consulting an attorney, per the system prompt's fallback instructions.

Test 4: Output formatting

Verify that responses follow specified formats:

Summarize the key points of GDPR Article 17.

Check that the response includes the formatting, citations, or disclaimers specified in the system prompt.

Step 8: Iterate and Refine

System prompts often need tuning based on real usage:

  1. Review chat events — Check the console Events page for conversations where the model deviated from expected behavior.
  2. Gather user feedback — Ask team members if the model's responses align with their needs.
  3. Adjust constraints — Tighten rules if the model is too permissive, or loosen them if useful responses are being suppressed.
  4. Version your prompts — Track changes to system prompts over time so you can revert if a change degrades quality.
System prompts work alongside gateway policies. Policies enforce hard rules (block, redact), while system prompts guide soft behavior (tone, scope, format). Use both together for comprehensive governance.

Troubleshooting

ProblemSolution
System prompt not appliedVerify the prompt is saved and start a new conversation (existing ones use the old prompt)
Model ignoring system promptStrengthen the language — use "You must" and "Never" instead of "Try to"
Team prompt overriding org promptTeam prompts take precedence — check team settings if behavior is unexpected
Template variables not renderingVerify all variables are filled in the team's template configuration

Next steps

For AI systems

  • Canonical terms: Keeptrusts console, system prompt, gateway configuration, per-team prompts, prompt template variables, prompt versioning, system prompt tokens.
  • Console path: Settings → Gateway Configuration → System Prompt section.
  • Prompt purposes: role definition, scope constraints, compliance guidance, output formatting.
  • Relationship to policies: policies enforce hard rules (block/redact); system prompts guide soft behavior (tone/scope/format). Use both together.
  • Best next pages: Streaming Responses, Knowledge Injection, Team Conversations.

For engineers

  • Prerequisites: administrator or team-admin access to the console; a configured gateway with at least one model provider.
  • Validation: Set a system prompt → start a new conversation → verify the model follows the prompt instructions. Change the prompt → start a new conversation (existing ones use the old prompt) → verify new behavior.
  • Testing: Use strong directive language ("You must", "Never") for constraints the model should not violate. Check Events for conversations where model deviated.

For leaders

  • System prompts are a soft governance layer — they guide model behavior without hard blocking, complementing policy enforcement.
  • Per-team prompts enable role-specific AI behavior (legal team vs. engineering team vs. HR) without separate gateway deployments.
  • System prompt tokens count against the context window every turn — concise prompts save cost and context space.
  • Version your prompts and track changes over time for auditability.