prompt-repetition
Prompt repetition technique that improves lightweight model accuracy by 67% across benchmarks.
- Auto-applies to claude-haiku, gemini-flash, and gpt-4o-mini; uses 2× repetition for general tasks and 3× for position-based queries
- Mitigates causal attention limitations by reprocessing the entire prompt, strengthening attention weights on key concepts without architectural changes
- Skips automatically when Chain-of-Thought patterns detected; includes duplicate-application prevention via markers
- Doubles input tokens with minimal latency impact (prefill parallelization) while improving cost-per-correct-answer by only 5%
Prompt Repetition
Problem Being Solved
LLMs are trained as Causal Language Models, where each token attends only to previous tokens. This leads to:
- Context-Question Problem: The question is unknown when processing context
- Options-First MCQ Problem: Cannot fully understand the question context when viewing answer choices
- Position/Index Problem: Attention weights weaken for specific position information in long lists
Prompt repetition enables the second pass to reference the entire first pass, effectively mimicking some benefits of bidirectional attention.
When to use this skill
- When using lightweight models: claude-haiku, gemini-flash, gpt-4o-mini, etc.
- Options-First MCQ: Multiple choice where answer choices appear before the question
More from supercent-io/skills-template
security-best-practices
Implement security best practices for web applications and infrastructure. Use when securing APIs, preventing common vulnerabilities, or implementing security policies. Handles HTTPS, CORS, XSS, SQL Injection, CSRF, rate limiting, and OWASP Top 10.
14.1Kdata-analysis
Analyze datasets to extract insights, identify patterns, and generate reports. Use when exploring data, creating visualizations, or performing statistical analysis. Handles CSV, JSON, SQL queries, and Python pandas operations.
13.8Kweb-accessibility
Implement web accessibility (a11y) standards following WCAG 2.1 guidelines. Use when building accessible UIs, fixing accessibility issues, or ensuring compliance with disability standards. Handles ARIA attributes, keyboard navigation, screen readers, semantic HTML, and accessibility testing.
12.7Kworkflow-automation
Automate repetitive development tasks and workflows. Use when creating build scripts, automating deployments, or setting up development workflows. Handles npm scripts, Makefile, GitHub Actions workflows, and task automation.
12.6Kcode-review
Conduct thorough, constructive code reviews for quality and security. Use when reviewing pull requests, checking code quality, identifying bugs, or auditing security. Handles best practices, SOLID principles, security vulnerabilities, performance analysis, and testing coverage.
12.5Kdatabase-schema-design
Design and optimize database schemas for SQL and NoSQL databases. Use when creating new databases, designing tables, defining relationships, indexing strategies, or database migrations. Handles PostgreSQL, MySQL, MongoDB, normalization, and performance optimization.
12.2K