How to Fix Binary Contrast Structures in AI-Generated Text with Stop Slop
You can eliminate binary contrast structures from AI-generated text by applying the Stop Slop skill rules, which instruct the model to replace "not X, but Y" patterns with direct statements of Y.
Binary contrast structures like "not X, but Y" are a tell-tale sign of AI-generated prose that sounds mechanical and formulaic. The stop-slop repository by hardikpandya provides a declarative skill framework that targets these patterns specifically, allowing you to clean up machine-written text without writing complex code. By loading the skill rules into your LLM workflow, you can automatically transform binary contrasts into direct, assertive statements that read more naturally.
What Are Binary Contrast Structures?
Binary contrast structures are formulaic sentence constructions that artificially pit two ideas against each other to create rhetorical emphasis. The most common form follows the pattern "not X, but Y" (e.g., "This isn't a cost issue, it's a value problem").
These constructions appear frequently in AI-generated content because language models rely on statistical patterns that favor familiar rhetorical devices. While grammatically correct, they create repetitive, predictable rhythm that readers associate with machine-written text.
Where the Rules Live in the Repository
The stop-slop skill organizes its editorial rules across several reference files:
SKILL.md— Contains the high-level rule description at lines 40-41: "Any 'not X, it’s Y' contrasts? State Y directly."【https://github.com/hardikpandya/stop-slop/blob/main/SKILL.md#L40-L41】references/structures.md— Houses the complete library of binary-contrast templates and their recommended rewrites under the Binary Contrasts section (lines 3-21)【https://github.com/hardikpandya/stop-slop/blob/main/references/structures.md#L3-L21】references/phrases.md— Lists additional filler phrases to eliminatereferences/examples.md— Provides before/after demonstrations of successful transformations
When integrated into an LLM project, the engine loads SKILL.md as a system prompt and consults structures.md to recognize forbidden patterns during generation.
How the Detection and Rewrite Process Works
The skill applies a three-step declarative transformation that requires no custom code:
- Pattern Detection — The model checks text against regex-compatible templates defined in
structures.md(e.g.,not X, but Y,isn't the problem... is,the answer isn't... it's). - Negation Removal — The engine strips the negative clause ("not X") entirely.
- Direct Assertion — It rewrites the sentence to begin with the positive claim (Y) and removes the contrastive structure.
For example, the input "The answer isn't cost. It's actually value" becomes simply "Value drives the decision" or "The driver is value."
Three Methods to Implement the Fix
You can apply these rules through different integration approaches depending on your workflow.
Method 1: Loading as a Claude Project Skill
Add the skill folder to a Claude project to enable automatic enforcement during generation. The system instruction references the manifest file directly:
{
"model": "claude-2.1",
"messages": [
{
"role": "system",
"content": "You are using the Stop Slop skill. Load the rules from https://github.com/hardikpandya/stop-slop/blob/main/SKILL.md"
},
{
"role": "user",
"content": "Write a short paragraph about remote work, but avoid binary-contrast structures."
}
]
}
When Claude processes the system instruction, it pulls the binary-contrast rule from SKILL.md and references structures.md to automatically rewrite any matched constructions before returning output.
Method 2: Post-Processing with Python
For existing text or non-Claude workflows, implement a regex filter that mirrors the logic in references/structures.md:
import re
from pathlib import Path
# Load the binary-contrast patterns
patterns = [
r"(?i)not\s+[^.,;]+,\s+but\s+([^.,;]+)",
r"(?i)[^.,;]+\s+isn't the problem\.?\s+([^.,;]+) is\.",
r"(?i)the answer isn't\s+[^.,;]+\.?\s+it’s\s+([^.,;]+)",
# … add the rest from structures.md as needed …
]
def fix_binary_contrasts(text: str) -> str:
for pat in patterns:
text = re.sub(pat, r"\1", text)
return text
sample = "The answer isn't cost. It's actually value."
print(fix_binary_contrasts(sample))
# → "value."
This script implements the "State Y directly" guidance from structures.md and can be chained with other filters (such as adverb removal from phrases.md) to build a complete "stop-slop" pipeline.
Method 3: System Prompt Integration
Load the entire skill as a knowledge base by concatenating the manifest and reference files into your system prompt:
from pathlib import Path
skill_path = Path("stop-slop/SKILL.md")
structures_path = Path("stop-slop/references/structures.md")
system_prompt = (
skill_path.read_text()
+ "\n\n"
+ "Reference tables:\n"
+ structures_path.read_text()
)
# Use `system_prompt` as the system message for any LLM call
By feeding the full content of SKILL.md and structures.md into the context window, you give any LLM (including GPT-4, Llama, or local models) direct access to the binary-contrast patterns and the recommended rewrites, ensuring consistent enforcement across sessions.
Summary
- Binary contrast structures (e.g., "not X, but Y") signal AI-generated text and should be replaced with direct statements.
- The Stop Slop skill provides declarative rules in
SKILL.mdand pattern libraries inreferences/structures.mdthat automate this cleanup. - The fix works without code changes—simply load the skill as a system prompt or apply regex patterns post-generation.
- Three implementation paths exist: Claude project integration, Python regex filtering, or full system prompt concatenation.
- The transformation follows a consistent negation-removal and direct-assertion pattern defined in the repository's reference tables.
Frequently Asked Questions
What exactly constitutes a binary contrast structure?
Binary contrast structures are rhetorical patterns that explicitly negate one concept to affirm another, typically following templates like "not X, but Y," "isn't A, it's B," or "the answer isn't... it's." According to the stop-slop reference tables in references/structures.md, these constructions create mechanical-sounding prose because they force an artificial dichotomy rather than stating the positive claim directly.
Do I need to modify the Stop Slop source code to fix my text?
No. The stop-slop framework is purely declarative. The rules in SKILL.md function as instructions to the LLM, and the pattern library in references/structures.md provides ready-to-use templates. You simply point your model to these files or include their contents in your system prompt. The model handles the transformation internally without requiring you to write custom parsing logic.
Can I use Stop Slop with LLMs other than Claude?
Yes. While the repository structure follows Claude's "skill" format, the content is compatible with any LLM that accepts system prompts or instruction tuning. You can load SKILL.md and references/structures.md into GPT-4, local Llama models, or other APIs. The Python regex example also demonstrates how to apply the same rules as a post-processing filter on any generated text, regardless of the underlying model.
How does the pattern matching identify binary contrasts?
The references/structures.md file defines regex-compatible templates that capture variations of negation followed by contrast. When loaded as a skill, the LLM uses these patterns to flag sentences containing "not X, but Y" constructions. The rule then triggers a rewrite that drops the negated clause and promotes the affirmed clause to the subject position, producing direct statements like "Y is the case" instead of "Not X, but Y."
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →