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