- Home
- Skills
- Supercent Io
- Skills Template
- Prompt Repetition
prompt-repetition_skill
- Shell
24
GitHub Stars
3
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill supercent-io/skills-template --skill prompt-repetition- prompt_repetition_transformer.py8.2 KB
- SKILL.md15.5 KB
- SKILL.toon652 B
Overview
This skill implements prompt repetition to improve accuracy of causal LLMs by repeating the entire prompt one or more times before the model call. It is designed for lightweight models (haiku, flash, mini) and automatically applies safe repetition patterns to tasks that benefit from re-reading context. In tests across 70 benchmarks, repetition produced statistically significant gains on 67% of tasks with no observed degradations.
How this skill works
The transformer repeats the full prompt (context + question or instructions) for a second or third pass so the model can attend to earlier tokens when producing the answer. This does not change model architecture; it leverages the causal model by providing a second pass that references the first pass in full. The transformer auto-detects task patterns (options-first MCQ, position/index queries) and adjusts repetition counts while enforcing context-window limits and CoT exclusions.
When to use it
- Lightweight LLMs (claude-haiku, gemini-flash, gpt-4o-mini and similar)
- Options-first multiple-choice questions where choices appear before the question
- Long context + question retrieval where key facts are buried early
- Index/position tasks (inventory slot, list index queries)
- Tool-invocation prompts where the whole prompt is repeated for consistency
Best practices
- Default to 2 repeats; use 3 repeats for explicit position/index patterns
- Detect and skip when chain-of-thought or explicit stepwise reasoning is requested
- Check model context window and reduce repeats if token budget would be exceeded
- Insert a small applied marker to avoid double-applying in multi-agent pipelines
- Measure token cost, latency, and accuracy in A/B tests before enabling globally
Example use cases
- Improve accuracy on options-first MCQ (choices listed first) by repeating the prompt twice
- Recover correct list position answers (e.g., slot 25) by repeating the inventory prompt three times
- Reduce ambiguity in tool-call prompts by repeating the full tool instruction and query
- Auto-apply repetition in an agent stack for flash/haiku models while skipping orchestration agents
- Run A/B experiments comparing baseline vs repeated prompts to quantify gains and cost
FAQ
No. Repetition is a prompt-engineering technique that re-exposes the entire prompt so a causal model can reweight attention; it does not alter the model's architecture or internal reasoning rules.
When should I not use prompt repetition?
Avoid it when the task uses chain-of-thought prompting, when using inference-optimized models (opus/sonnet), or when prompt length would exceed the model's safe context window.