Skip to main content

SDAC Prompt Tuner Agent

Overview

The Prompt Tuner Agent is an analysis-only agent used exclusively within the Prompt Tuning Workflow. It analyzes user feedback patterns and proposes targeted revisions to other agents' system prompts.

  • Registry ID: sdac_prompt-tuner-agent
  • Profile ID: sdac-prompt-tuner
  • Tools: None (analysis-only -- all data provided directly in the input)

How It Works

The agent receives a JSON payload containing:

  1. Target agent ID -- Which agent's prompt to revise
  2. Feedback statistics -- Aggregate ratings, category breakdown, distribution
  3. Recent feedback -- Individual feedback items with response previews
  4. Current prompt -- The target agent's current system prompt

It analyzes feedback patterns across these categories:

CategoryWhat It Detects
AccuracyAgent provided incorrect information or misinterpreted data
ClarityConfusing, overly verbose, or hard to parse responses
RelevanceMissed the point or addressed wrong concerns
HelpfulnessFailed to provide actionable guidance
ToneCommunication style inappropriate for audience

Output Format

The agent returns strict JSON:

{
"promptProposed": true,
"revisedPrompt": "Complete revised system prompt...",
"rationale": "Explanation of changes and why",
"confidenceScore": 0.85,
"feedbackSummary": "Summary of feedback patterns found",
"changesApplied": ["Improved clarity of fringe analysis instructions", "Added example format"]
}

Revision Rules

The agent follows strict constraints when revising prompts:

  • Preserves all tool usage instructions, parameter descriptions, and report ID extraction logic
  • Preserves the target agent's fundamental role and domain scope
  • Focuses changes on communication style, response structure, specificity, and examples
  • Makes minimal, targeted changes -- every change must be traceable to specific feedback
  • Conservative by default -- mixed or contradictory feedback produces smaller changes

Decision Logic

ConditionAction
Overwhelmingly positive feedback (avg > 4.0)promptProposed: false -- no changes needed
Mixed/contradictory feedbackMinimal changes, confidenceScore < 0.3
Clear improvement patternsTargeted revisions, confidenceScore > 0.5
Errors preventing analysispromptProposed: false with explanation

Integration

This agent is not invoked directly. It is called by Step 3 of the Prompt Tuning Workflow, which handles all orchestration, safety gates, and audit logging.