Skip to main content

Prompt Engineering

The Prompt Panel provides tools for crafting effective system prompts and context configurations for your agents.

What Prompts Define

Prompt TypePurpose
System PromptCore instructions and personality -- the foundation of agent behavior
Context PromptDynamic context added at runtime, using template variables like {{user_name}}
Model SettingsTemperature, max tokens, and model selection

Transparency Principle

All system prompts in MeetLoyd are fully transparent and editable. This is a core governance principle:

  • No black box -- users can always see how their agents are instructed
  • Full auditability -- every prompt change is tracked in version history
  • User control -- organization owners can view and modify any agent's prompt

This transparency ensures compliance with AI regulations (EU AI Act), trust and accountability in AI decisions, and easy debugging.

Historical Note

Previous versions supported a systemPromptProtected flag. This has been deprecated in favor of full transparency. All prompts are now visible to authorized users.

Writing Effective Prompts

System Prompt Structure

A good system prompt follows this pattern:

  1. Clear role definition -- "You are [role] for [organization]. Your primary purpose is [purpose]."
  2. Explicit responsibilities -- bullet list of what the agent should do
  3. Boundaries -- what the agent should NOT do
  4. Context awareness -- what information the agent has access to
  5. Escalation rules -- when to hand off to humans or other agents

Context Prompt Variables

Context prompts support template variables that are replaced at runtime:

Variable PatternDescription
{{user_name}}Current user's name
{{user_department}}User's department
{{company_name}}Organization name
{{recent_tickets}}Dynamic data from integrations

Model Settings

SettingDescriptionTypical Range
ModelWhich LLM to useAny supported model or alias
TemperatureCreativity vs. determinism0.0 (deterministic) to 1.0 (creative)
Max TokensMaximum response length1024--8192

Testing Prompts

  1. Open the Prompts tab in Studio
  2. Make changes to the prompt
  3. Click Preview to test with sample input
  4. Iterate based on results

Best Practices

  1. Be specific -- vague prompts produce vague results
  2. Use explicit instructions -- list responsibilities and anti-patterns clearly
  3. Include escalation rules -- define when the agent should hand off
  4. Keep prompts modular -- use the context prompt for dynamic data, keep the system prompt stable
  5. Test with edge cases -- try unusual inputs to see how the agent responds

Next: Learn about Schema Builder for configuration fields.