Skip to content

systemime/repetition-enhanced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Repetition Enhanced

Boost AI Agent Accuracy by Up to 76% with Research-Backed Techniques

License: MIT AI Agent Research

English | 中文


What is this?

A universal skill pack that applies research-backed repetition techniques to dramatically improve AI agent accuracy and reliability. Works with Claude Code, Cursor, Windsurf, Continue, Aider, and any LLM-based agent system.

The Science Behind It

Research Finding Impact
Google Research (2025) Repeating prompts twice +76% accuracy on non-reasoning tasks
Wang et al. (2022) Self-consistency with majority voting +30% on reasoning tasks
Brown et al. (2024) Repeated sampling scaling laws Small models beat large ones

Why It Works

Transformer models process text left-to-right only. They can't "look ahead" to see what's coming. When you repeat a prompt:

  1. First pass: Model processes context without knowing the question
  2. Second pass: Model now knows the question and can properly attend to relevant context

It's like giving the model a second chance to connect the dots.


Quick Start

Installation

Claude Code

git clone https://github.com/systemime/repetition-enhanced.git
cp -r repetition-enhanced/skills/* ~/.claude/commands/
cp -r repetition-enhanced/commands/* ~/.claude/commands/

Cursor / Windsurf / Continue

git clone https://github.com/systemime/repetition-enhanced.git
# Copy SKILL.md content to your tool's custom instructions/rules

Generic (Any AI Tool)

Simply apply the techniques manually when prompting, or import the skill definitions into your agent system.

Usage

Command Line (if supported by your tool)

# Double prompt for non-reasoning tasks
/boost double What is the 25th item in this list...

# Triple verification for math/logic
/boost triple Solve: If 3x + 7 = 22, what is x?

# Best-of-N for code generation
/boost verify Write a function to sort a linked list

# Full verification chain for critical tasks
/boost critical What are the security implications of...

Manual Application

Double Prompt: Copy your prompt twice

[Your prompt]

[Your prompt again]

Self-Consistency: Ask for multiple solutions

Solve this problem using 3 different approaches.
Compare all answers and provide the majority result.

Automatic Activation

The skill automatically activates when:

  • 🎯 Making important decisions (architecture, tech stack)
  • 💻 Writing critical code (production, database operations)
  • 🧮 Complex reasoning (math, logic, multi-step problems)
  • ⚠️ High-risk operations (deletions, config changes, deployments)

Techniques

1. Double Prompt (Prompt Repetition)

Best for: Lookups, extractions, direct Q&A

Original: "Find the 25th name in this list..."
Enhanced: "Find the 25th name in this list... [REPEAT]"

Accuracy boost: Up to 76% (21% → 97% in research tests)

2. Self-Consistency (Majority Voting)

Best for: Math, logic, reasoning

Generate 3 independent solutions → Extract answers → Majority vote

Accuracy boost: 10-30% on reasoning benchmarks

3. Best-of-N (Repeated Sampling)

Best for: Code generation, verifiable tasks

Generate N candidates → Verify each → Select best

Accuracy boost: 20-50% with sufficient samples

4. Critical Verification Chain

Best for: High-stakes decisions

Initial solution → Self-review → Alternative approach → Cross-validate → Synthesize

Decision Matrix

Task Type Technique Repetitions Cost
Simple lookup Double Prompt 2x Low
Math/Logic Self-Consistency 3-5x Medium
Code generation Best-of-N 10-100x Higher
Critical decisions Full Chain Variable Highest

Project Structure

repetition-enhanced/
├── README.md                              # This file
├── plugin.json                            # Plugin configuration
├── LICENSE                                # MIT License
├── CHANGELOG.md                           # Version history
├── skills/
│   └── repetition-enhanced/
│       ├── SKILL.md                       # Main skill definition
│       ├── references/
│       │   └── research-papers.md         # Academic references
│       └── examples/
│           └── patterns.md                # Usage patterns
└── commands/
    └── boost.md                           # /boost command

Compatibility

Tool Compatibility Installation
Claude Code ✅ Full Copy to ~/.claude/commands/
Cursor ✅ Full Copy SKILL.md to rules
Windsurf ✅ Full Import as custom skill
Continue ✅ Full Add to custom instructions
Aider ✅ Partial Manual application
Any LLM ✅ Universal Apply techniques manually

Research Sources

  1. Prompt Repetition: Google Research (2025)
  2. Self-Consistency: Wang et al. (2022) - ICLR 2023
  3. Repeated Sampling: Brown et al. (2024) - ICLR 2025

Contributing

Contributions welcome! Please read our contributing guidelines.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details.


⬆ Back to Top

Made with ❤️ by systemime


中文文档

基于学术研究,将AI Agent准确率提升高达76%

这是什么?

一个通用的技能包,应用学术研究支持的重复技术来大幅提升AI智能体的准确率和可靠性。适用于Claude Code、Cursor、Windsurf、Continue、Aider以及任何基于LLM的智能体系统。

科学原理

研究 发现 影响
Google研究 (2025) 重复提示词两次 非推理任务准确率提升76%
Wang等人 (2022) 自一致性+多数投票 推理任务提升30%
Brown等人 (2024) 重复采样扩展定律 小模型击败大模型

为什么有效

Transformer模型只能从左到右处理文本,无法"向前看"。当你重复提示词时:

  1. 第一遍:模型在不知道问题的情况下处理上下文
  2. 第二遍:模型现在知道问题了,可以正确关注相关上下文

就像给模型第二次机会来建立联系。


快速开始

安装

Claude Code

git clone https://github.com/systemime/repetition-enhanced.git
cp -r repetition-enhanced/skills/* ~/.claude/commands/
cp -r repetition-enhanced/commands/* ~/.claude/commands/

Cursor / Windsurf / Continue

git clone https://github.com/systemime/repetition-enhanced.git
# 将SKILL.md内容复制到工具的自定义指令/规则中

通用(任何AI工具)

手动应用这些技术,或将技能定义导入您的智能体系统。

使用方法

# 非推理任务:重复提示词
/boost double 在这个列表中找到第25个名字...

# 数学/逻辑:三次验证
/boost triple 解方程:如果3x + 7 = 22,x是多少?

# 代码生成:多样本验证
/boost verify 写一个排序链表的函数

# 关键任务:完整验证链
/boost critical 这个安全决策的影响是什么...

自动激活

遇到以下情况时自动激活

  • 🎯 重要决策(架构、技术栈)
  • 💻 关键代码(生产环境、数据库操作)
  • 🧮 复杂推理(数学、逻辑、多步骤问题)
  • ⚠️ 高风险操作(删除、配置修改、部署)

兼容性

工具 兼容性 安装方式
Claude Code ✅ 完全支持 复制到 ~/.claude/commands/
Cursor ✅ 完全支持 复制SKILL.md到规则
Windsurf ✅ 完全支持 导入为自定义技能
Continue ✅ 完全支持 添加到自定义指令
Aider ✅ 部分支持 手动应用
任何LLM ✅ 通用 手动应用技术

参考文献

  1. 提示词重复: Google研究 (2025)
  2. 自一致性: Wang等人 (2022) - ICLR 2023
  3. 重复采样: Brown等人 (2024) - ICLR 2025

许可证

MIT许可证 - 详见LICENSE文件。


Made with ❤️ by systemime

About

Universal skill pack to boost AI agent accuracy by up to 76% with research-backed repetition techniques. Works with Claude Code, Cursor, Windsurf, Continue, and any LLM-based agent.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors