Skip to content

Latest commit

 

History

History
121 lines (94 loc) · 4.47 KB

File metadata and controls

121 lines (94 loc) · 4.47 KB

🤔 Prompting Patterns & Tracking Strategy

Your Questions Answered

1. Different Prompting Behaviors Detected & Handled:

Pattern A: Copy-Paste-Edit ✂️

  • Behavior: User copies previous prompt, makes edits
  • Detection: High similarity (80%+) but significant length changes
  • Tracking: Even small edits are saved (low threshold)
  • UI: Shows "Copy+Edit" label with scissors icon

Pattern B: Conversational Refinement 💬

  • Behavior: "No, that's wrong, try adding this..."
  • Detection: User types additional instructions/corrections
  • Tracking: Context from conversation is preserved
  • UI: Shows "Refined" label with sparkle icon

Pattern C: Major Rewrite 🔄

  • Behavior: Complete prompt overhaul
  • Detection: Low similarity (<30%) to previous version
  • Tracking: Always saved as significant change
  • UI: Shows "Rewrite" label with refresh icon

Pattern D: Detail Addition

  • Behavior: User adds more specificity/examples
  • Detection: High similarity but 30%+ length increase
  • Tracking: Captures the enhancement process
  • UI: Shows "Added Detail" label with plus icon

2. Hybrid Tracking Strategy Implemented:

🔄 Auto-Versioning (Background)

// Smart thresholds based on change type:
'copy_paste_edit': 5%    // Even small edits matter
'major_rewrite': 0%      // Always save big changes  
'detail_addition': 10%   // Save when adding content
'refinement': 15%        // Medium threshold
'minor_edit': 30%        // High threshold (rarely saved)

📌 Manual Checkpoints (User Control)

  • Ctrl+S: Quick checkpoint creation
  • Submit: Auto-creates checkpoint when sending prompt
  • Pin Button: Promote any auto-save to checkpoint
  • Named Checkpoints: User can name important versions

3. Smart Detection Algorithm:

// The extension analyzes each change:
detectChangePattern(oldText, newText) {
  const similarity = calculateSimilarity(oldText, newText);
  const lengthDiff = Math.abs(newText.length - oldText.length);
  const lengthRatio = newText.length / oldText.length;
  
  // Returns: 'copy_paste_edit', 'major_rewrite', 
  //          'detail_addition', 'refinement', etc.
}

4. UI Shows Change Context:

  • Icons & Labels: Each version shows what type of change it was
  • Checkpoints Prominent: User-created checkpoints are highlighted
  • Promote Feature: Convert any auto-save to a checkpoint
  • Smart Filtering: Checkpoints appear first, auto-saves grouped

5. Contextual Prompting Support:

The extension handles both:

  • Direct prompt editing (in the text box)
  • Conversational prompting (chat messages that modify intent)

Both patterns are captured because:

  • Text changes in the input = auto-versioning
  • Submit button clicks = checkpoint creation
  • Response associations = context preservation

6. Real-World Usage Examples:

Scenario 1: Iterative Refinement

Version 1: "Write a blog post about AI"           [Auto-save]
Version 2: "Write a technical blog post about AI" [Copy+Edit] 
Version 3: [User saves manually]                  [📌 CHECKPOINT: "Good base"]
Version 4: "Write a technical blog post about AI with code examples and real-world applications" [Detail Addition]

Scenario 2: Conversational Building

Version 1: "Create a marketing email"             [Auto-save]
[AI responds with draft]
Version 2: "Make it more professional"            [Refinement]
[AI responds with update] 
Version 3: "Add a call-to-action button"          [Detail Addition]
[User likes this - saves checkpoint]              [📌 CHECKPOINT: "Final version"]

7. Why This Approach Works:

Captures all meaningful changes without spam
Respects different user workflows
Makes important versions easy to find
Provides branching from any point
Shows the evolution context visually

8. User Controls Available:

  • Ctrl+S: Manual checkpoint anytime
  • Auto-save: Runs in background intelligently
  • Pin Button: Promote auto-saves to checkpoints
  • Smart Thresholds: Different rules for different change types
  • Visual Indicators: Know exactly what type of change each version represents

This hybrid approach means users get both automatic protection (never lose work) and manual control (mark what's important) without being overwhelmed by noise!


The extension is now smart enough to understand how you actually work with prompts! 🧠✨