output-variety
Techniques for getting varied, non-repetitive outputs from repeated LLM calls. Use when building systems that call LLMs in loops, generating personality lines, commentary, names, or any repeated creative text where outputs feel samey or cliche.
What this skill does
# Output Variety in Repeated LLM Calls When you call an LLM repeatedly with structurally similar prompts, outputs converge. The model finds an attractor — a comfortable pattern of phrasing, structure, and word choice — and stays there. This is especially pronounced with smaller models (Haiku, Sonnet) and short outputs (1-2 sentences). This skill covers practical techniques to break that convergence, ranked by impact. All techniques operate at the prompt level — no fine-tuning or custom sampling required. For implementation patterns and examples, see [reference.md](reference.md). ## Techniques (Ranked by Impact) ### 1. Inject Recent Outputs as Negative Examples **Highest impact. Zero cost. Do this first.** Show the model its last N outputs with an explicit instruction not to repeat them. This is the single strongest lever for small models because it directly removes recent patterns from the output distribution. ```xml <previous_outputs> Do NOT repeat, rephrase, or echo the structure of any of these: - "The boulder doesn't care about your deadline." - "Three agents down. I've seen worse." - "Past midnight and still pushing. Typical." </previous_outputs> ``` **How many to show:** 5-10 recent outputs hits the sweet spot. Fewer than 5 allows the model to find gaps. More than 15 wastes context and can cause the model to over-focus on avoidance rather than generation. **Storage:** Keep a ring buffer of the last 20-30 outputs in your application state. Inject the most recent 10 into each prompt. ### 2. Rotate Structural Constraints **High impact. Forces variety in sentence shape, not just word choice.** Maintain a pool of micro-constraints that change the *structure* of the output. Randomly select one per call. ``` Structural constraint for this call: Start with a verb. ``` ``` Structural constraint for this call: Use exactly one question. ``` ``` Structural constraint for this call: Reference a physical sensation. ``` Small models are highly sensitive to micro-constraints — a single sentence addition changes the output distribution more than any sampling parameter. This works because it forces the model to approach the same content from different angles. **Pool size:** 12-20 constraints. Fewer risks noticeable cycling; more risks contradictions with other prompt instructions. **Constraint design:** Target sentence structure, opening words, rhetorical devices, and sensory registers — not content. "Start with a number" is good. "Talk about the weather" is too content-specific and fights the actual task. ### 3. Rotate Few-Shot Examples **High impact. Changes what the model anchors on.** Instead of static examples in the prompt, maintain a larger pool and randomly sample a subset per call. The model's output distribution shifts dramatically based on which examples it sees. This is well-documented in few-shot prompting research — example selection is one of the strongest levers on output distribution, especially for small models. **Pool size:** 15-25 examples. Sample 3-5 per call. Ensure the pool covers diverse sentence structures, tones, and approaches — not just diverse topics. ### 4. Inject Random Seed Elements **Moderate impact. Shifts the attention distribution at prefill.** Add a random micro-scenario or ambient detail that the model can optionally riff on: ``` Ambient thought (use or ignore): The scroll buffer has thousands of lines nobody reads. ``` This works by shifting which attention heads activate during prefill. Even if the model ignores the seed entirely, its presence changes the probability landscape for the actual output. **Pool size:** 15-30 seeds. They should be concrete and sensory, not abstract. "The terminal cursor is blinking" beats "creativity is important." ### 5. Expand Explicit Phrase Bans **Moderate impact. Easy to maintain.** LLMs (especially smaller ones) have strong attractors toward certain phrases. Track which phrases appear most often in your generated outputs and ban them explicitly. ``` Banned words/phrases: "testament", "journey", "embrace", "landscape", "navigate", "delve", "tapestry", "realm", "crucible" ``` Explicit phrase banning is more effective than general "be creative" instructions. The model responds better to "don't say X" than "say something original" because the former is a concrete constraint and the latter is a vague aspiration. **Maintenance:** Review generated outputs periodically. When a phrase appears 3+ times in your last 20 outputs, add it to the ban list. ### 6. Post-Generation Similarity Filter **Safety net. Catches what the prompt-level techniques miss.** After generation, compare the output against the last N outputs using a simple similarity metric (Jaccard on word sets, or even substring matching). If similarity exceeds a threshold, regenerate with the failed output added to the negative examples. This costs an extra API call occasionally but guarantees variety. Use it as a backstop, not a primary mechanism — if you're regenerating frequently, your prompt-level techniques need tuning. ## When to Apply This These techniques matter when: - The same prompt template is called 10+ times per day - Outputs are short (under 200 tokens) — long-form generation has more internal variance - Users see multiple outputs in sequence (status bars, notifications, commentary) - The model is small (Haiku, Sonnet) — Opus has more internal diversity They matter less when: - Each call has substantially different input context - Outputs are long-form (500+ tokens) - Users rarely see more than one output per session
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.