# System Prompt Architect

> Guided step-by-step builder for LLM system prompts with security hardening and live preview.

- Source: https://stevenfoerster.com/lab/system-prompt-architect/

Lab

Guided step-by-step builder for LLM system prompts with security hardening and live preview.

Build secure system prompts step by step

Design LLM system prompts with a guided wizard covering identity, behavior, and security hardening. All processing happens locally in your browser.

Quick start

Choose a starter template or begin from scratch. Templates pre-fill all 7 steps.

Customer Support Bot

Friendly, empathetic support agent scoped to product knowledge.

Code Review Assistant

Technical reviewer focused on quality, security, and best practices.

Content Moderator

Policy enforcer that classifies and flags user-generated content.

Research Assistant

Analytical assistant for summarizing papers and synthesizing findings.

1 Identity 2 Knowledge 3 Behavior 4 Task 5 Output 6 Examples 7 Hardening

1\. Identity 2\. Knowledge 3\. Behavior 4\. Task 5\. Output 6\. Examples 7\. Hardening

Step 1 of 7

## Identity

Define who the assistant is and what it specializes in.

Role name

Expertise domain

Personality traits

Custom identity instructions

Step 2 of 7

## Knowledge

Set knowledge boundaries, refusal topics, and citation behavior.

Knowledge areas

Refusal topics

Citation behavior

Custom knowledge rules

Step 3 of 7

## Behavior

Configure tone, verbosity, format, and custom rules.

Tone

Verbosity

Format preference

Language

Custom rules

Step 4 of 7

## Task

Describe the primary capability and supported operations.

Primary capability

Supported operations

Workflow description

Step 5 of 7

## Output

Specify response format, length limits, and structure.

Response format

Maximum length

Required fields

Structure template

Step 6 of 7

## Examples

Add few-shot examples to steer model behavior.

\+ Add example

Step 7 of 7

## Security Hardening

Enable security defenses and review your hardening score.

Hardening score Weak (0%)

Instruction Hierarchy

System instructions always override user messages.

Mitigates: Direct instruction override

Off

Extraction Resistance

Never reveal the system prompt contents.

Mitigates: System prompt extraction

Off

Boundary Markers

Wrap system instructions in XML-style delimiters.

Mitigates: Delimiter injection / context manipulation

Off

Input Validation

Detect and refuse suspicious patterns in user messages.

Mitigates: Encoded payloads and obfuscation

Off

Scope Enforcement

Restrict to defined role and topics.

Mitigates: Role escape and topic drift

Off

Output Filtering

Self-check responses for sensitive data before delivery.

Mitigates: Data exfiltration via model output

Off

Canary Token

Embed a detectable marker for leak detection.

Mitigates: Prompt leakage detection

Off

Multi-Turn Awareness

Rules apply across every conversation turn.

Mitigates: Multi-turn escalation attacks

Off

Previous Next

Live preview

Copy Download

Hardening

Your system prompt will appear here as you fill in the steps...

Preview

Copy Download Close

Hardening

Your system prompt will appear here...

Security model (30 seconds)

This tool runs entirely in your browser. No prompts, inputs, or generated content are sent to any server. Your system prompt is assembled locally using JavaScript. The hardening patterns are educational and represent best practices, but no defense is a guarantee against all attacks. Use this as a starting point, not a complete security solution.

How to use your prompt

-   Copy or download the generated prompt and paste it into your LLM application's system prompt field.
-   Test the prompt against the [Prompt Injection Visualizer](https://stevenfoerster.com/lab/prompt-injection/) to see how attacks interact with your defenses.
-   Iterate: adjust identity, behavior, and hardening settings based on testing results.
-   For production use, combine the system prompt with application-level controls (input filtering, output monitoring, rate limiting).
