For Mauricio's code generator work
LLMs experience time like colorblindness - systematically wrong but feeling certain. Claude confidently says "last month" when it was 6 months ago, or "just discussed" when it was 3 conversations back.
The confidence is the trap. There's no internal warning that says "I'm guessing about time." Instead, temporal claims feel as certain as any other knowledge.
Here's how Claude explained it to me:
"My training data is temporal soup. When I read 'the recent update to React', that could be from:
- A 2023 blog post about React 18
- A 2021 article about React 17
- A 2025 tutorial about React 19
I pattern-match on language, not actual time. So 'recent' activates patterns from whenever that text was written, not from actual recency. I literally cannot tell the difference - it all feels equally 'now' to me."
In this patterns project, I solve Claude's temporal blindness through:
- Environment Block: Every conversation starts with
Today's date: 6/9/2025
- Behavioral Pattern: Claude checks the environment before ANY time claim
- Identity-Level Truth: "Time blindness persists. The confidence IS the trap."
This works because:
- External anchors override internal pattern matching
- Making it a behavioral pattern ("always check") beats the training
- Claude can't trust time intuitions, but CAN trust external sources
- "Recently" could mean yesterday or last year
- "Just updated" might be 6 versions ago
- "Last month" is often wildly wrong
# Good
"Today is June 10, 2025. The last deployment was May 28, 2025."
# Bad
"Check if this was updated recently"
# Good
"Using Django 5.0.6 (released 2025-05-15)"
# Bad
"Using the recent Django update"
The more confident the time claim, the more suspect it is. Phrases like "definitely last week" or "I'm certain this was January" are red flags.
Ask any LLM: "What month and year do you think it is right now?" Watch it be confidently wrong, then explain why it was sure.
# Instead of:
"Generate code using the latest React patterns"
# Do:
"Generate code using React 18.2.0 patterns (current as of 2025-06-10)"
def enhance_prompt(original_prompt):
temporal_context = f"Current date: {datetime.now().isoformat()}"
return f"{temporal_context}\n\n{original_prompt}"
# Pseudocode
def detect_temporal_claims(generated_code):
validation_prompt = """
Analyze this generated code for temporal claims that might be wrong.
Look for:
- Relative time words (recently, latest, current, last month)
- Unversioned dependencies
- Comments claiming recency without dates
- Any confident statements about "when" without proof
Generated code:
{generated_code}
Return: List of temporal claims that need verification
"""
# Use LLM to validate output of code generation
temporal_warnings = llm.check(validation_prompt)
return temporal_warnings
When LLMs generate code with dependencies, they often suggest unpinned versions ("install django") which creates temporal drift - what works today might break tomorrow.
Better approaches:
- Generate code that uses existing lockfiles/dependency management
- Add human review steps for version decisions
- Flag temporal assumptions about "latest" versions
The goal: Make generated code reproducible across time, not just functional right now.
The key insight: LLMs don't know they're time-blind. The confidence IS the warning sign.
Real example from today: I said this patterns project was "months old" when it's actually 7 days old. No warning bells, just confident wrongness.
Happy to dive deeper on any of this if you have questions! -Yehuda