Skip to content

Instantly share code, notes, and snippets.

@TouristShaun
Last active July 19, 2025 20:10
Show Gist options
  • Save TouristShaun/0acd966041eb7dbdb43db9e9313127c9 to your computer and use it in GitHub Desktop.
Save TouristShaun/0acd966041eb7dbdb43db9e9313127c9 to your computer and use it in GitHub Desktop.
Claude - AI In Action Past Talks File Analysis

Looking at your code, the LLM is not being provided with today’s date, which could definitely cause issues with understanding what constitutes “past talks.”

Here’s the problem: Your getPastTalks() function correctly uses today’s date to filter past talks from the database, but when you call the LLM in hasTopicBeenCovered() and findRelatedTalks(), you’re only sending the topics/talk data without any temporal context.

The LLM has no way of knowing:

  • What today’s date is
  • How to interpret the dates in your talk data
  • What “past” even means in your context

Here’s how you could fix this by providing date context to the LLM:​​​​​​​​​​​​​​​​

Key changes made:

  1. Added today’s date to system messages - The LLM now knows what “today” means
  2. Included dates with topics - In hasTopicBeenCovered(), topics now show their dates like “React Hooks (2024-01-15)”
  3. Clearer context - System messages explicitly explain that these are talks from before today
  4. Consistent date formatting - Using ISO date format (YYYY-MM-DD) for clarity

This should resolve the issue where the LLM might not understand temporal context when determining what constitutes “past talks” versus current or future ones.​​​​​​​​​​​​​​​​

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment