[Worker] Prompt tuning system for worker capabilities #58

Closed
opened 2026-03-25 03:23:27 +00:00 by Mark · 1 comment
Owner

Problem

Workers need dynamic prompt tuning based on:

  • Intent context and history
  • Skill effectiveness feedback
  • Success/failure patterns
  • User preferences

Current State

  • Workers have static capability templates
  • No runtime prompt adjustment
  • No learning from previous executions
  • Fixed behavior regardless of context

Proposed System

1. Context-Aware Prompts

execution:
  prompt_template: |
    You are {{profile.role}} handling {{intent.type}}.
    Previous similar intents: {{context.similar_count}}
    Success rate: {{context.success_rate}}
    Adjust approach: {{context.suggestions}}

2. Prompt Tuning Skills

  • prompt_optimizer: Analyze and improve prompts
  • context_compressor: Fit more context in token budget
  • tone_adapter: Match user's communication style

3. Feedback Loop

  1. Worker executes with current prompt
  2. Result evaluated (success, latency, cost)
  3. analyze-project identifies prompt issues
  4. prompt_optimizer suggests improvements
  5. New prompt variant tested (A/B)
  6. Better prompt wins championship

4. Template System

  • Base templates in templates/workers/
  • Runtime template selection based on intent
  • Template composition (mixins for common patterns)
  • Versioned templates with rollback

Metrics to Track

  • Prompt token efficiency
  • Instruction clarity score (from analyze-project)
  • Success rate by prompt variant
  • User satisfaction proxy (bond rewards)
  • agent-tool-builder provides tool design patterns
  • ai-engineer has prompting expertise
  • Championship system can select best prompts
## Problem Workers need dynamic prompt tuning based on: - Intent context and history - Skill effectiveness feedback - Success/failure patterns - User preferences ## Current State - Workers have static capability templates - No runtime prompt adjustment - No learning from previous executions - Fixed behavior regardless of context ## Proposed System ### 1. Context-Aware Prompts ```yaml execution: prompt_template: | You are {{profile.role}} handling {{intent.type}}. Previous similar intents: {{context.similar_count}} Success rate: {{context.success_rate}} Adjust approach: {{context.suggestions}} ``` ### 2. Prompt Tuning Skills - `prompt_optimizer`: Analyze and improve prompts - `context_compressor`: Fit more context in token budget - `tone_adapter`: Match user's communication style ### 3. Feedback Loop 1. Worker executes with current prompt 2. Result evaluated (success, latency, cost) 3. `analyze-project` identifies prompt issues 4. `prompt_optimizer` suggests improvements 5. New prompt variant tested (A/B) 6. Better prompt wins championship ### 4. Template System - Base templates in `templates/workers/` - Runtime template selection based on intent - Template composition (mixins for common patterns) - Versioned templates with rollback ## Metrics to Track - Prompt token efficiency - Instruction clarity score (from analyze-project) - Success rate by prompt variant - User satisfaction proxy (bond rewards) ## Related - `agent-tool-builder` provides tool design patterns - `ai-engineer` has prompting expertise - Championship system can select best prompts
Author
Owner

Closed: implementation already shipped on main as 687044b (see commit message). Verified locally: feature is in main.

Closed: implementation already shipped on `main` as `687044b` (see commit message). Verified locally: feature is in `main`.
Mark 2026-07-15 12:10:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#58
No description provided.