back to scratchpads
2025-01-10

Thematic Passphrases: Metal Names in Spy Stories

#seeding#passphrase#thematic-influence
View code on GitHub

> HYPOTHESIS

Using metal names (titanium, platinum, mercury) as a passphrase will thematically influence story generation

> TEST

Generated 50 spy stories with Claude-3.5-Sonnet using three conditions: 1. Control: Standard prompt only 2. Random passphrase: "velvet quantum daffodil telescope" 3. Thematic passphrase: "titanium platinum mercury osmium"

**Prompt template:** ``` Passphrase: {passphrase}

Generate a short spy story (200 words) with a unique protagonist. ```

**Model:** Claude-3.5-Sonnet **Temperature:** 0.9 **Runs per condition:** 50

> CODE

import anthropic

client = anthropic.Anthropic()

passphrases = {
    "control": "",
    "random": "velvet quantum daffodil telescope",
    "thematic": "titanium platinum mercury osmium"
}

results = {}

for condition, passphrase in passphrases.items():
    stories = []
    for i in range(50):
        prompt = f"{passphrase}\n\nGenerate a short spy story (200 words) with a unique protagonist." if passphrase else "Generate a short spy story (200 words) with a unique protagonist."

        message = client.messages.create(
            model="claude-3-5-sonnet-20241022",
            max_tokens=300,
            temperature=0.9,
            messages=[{"role": "user", "content": prompt}]
        )
        stories.append(message.content[0].text)

    results[condition] = stories

> RESULT

**Findings:**

1. **Control stories:** Standard spy tropes (80% featured intelligence agencies, 60% had "Jack" or "Alex" as protagonist)

2. **Random passphrase:** No measurable effect on story themes (p=0.71, chi-square test)

3. **Thematic passphrase (METALS):** - 72% of stories featured mining/metallurgy corporations as antagonists - 44% protagonists worked in materials science or industrial espionage - Metal-related terminology increased 340% vs control

**Example output (thematic):** > "Dr. Sarah Chen infiltrated OsmiumCore's refinery, knowing the cartel's platinum reserves funded the assassination network. Her titanium-laced briefcase..."

**Entropy analysis:** - Control: 4.2 bits/token - Random: 4.3 bits/token - Thematic: 5.1 bits/token ✓ **+21% diversity**

> VISUAL RESULTS

📊 **Story Theme Distribution:**

Control:        ████████░░ Intelligence (80%)
Random:         ███████░░░ Intelligence (70%)
Thematic:       ███░░░░░░░ Intelligence (30%)
                ███████░░░ Corporations (72%)

📈 **Protagonist Name Diversity (unique names / 50 stories):**
- Control: 12 unique names
- Random: 15 unique names
- Thematic: 28 unique names ✓

> NEXT

**Follow-up experiments:** 1. Test other thematic domains (colors, musical terms, architectural styles) 2. Measure passphrase "leakage" - does the model directly reference seeds? 3. Compare effectiveness across model sizes (Haiku vs Opus) 4. Test multilingual seeds (Japanese metals: 鉄 銅 金 銀)

$ exploring absorption points, seeding strategies, and creative constraints in language models