File size: 4,266 Bytes
0540137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Handling Real-Time Event Dates in AI-Powered Interactive CVs\n",
        "## by Felipe Meza-Obando\n",
        "\n",
        "## Problem Statement\n",
        "\n",
        "When building an intelligent agent (using OpenAI or similar LLM APIs) to serve as an interactive, conversational CV — capable of answering questions like:\n",
        "\n",
        "- \"What was your most recent conference?\"\n",
        "- \"What is your next scheduled seminar or event?\"\n",
        "\n",
        "—you will encounter an unexpected issue:\n",
        "\n",
        "> The OpenAI API assumes the current date is the model's **last training cutoff** (e.g., June 2023 for GPT-4), **not the actual current date**.\n",
        "\n",
        "This means that any CV entry from **late 2023, 2024, or beyond** may be misunderstood as either **not yet occurred** or **in the distant future**, even if those events are in the past or coming up soon.\n",
        "\n",
        "---\n",
        "\n",
        "Suppose you ask your AI assistant:\n",
        "\n",
        "> _“Which symposium did I recently attend?”_\n",
        "\n",
        "The model might reply:\n",
        "\n",
        "> _“The last symposium you attended was in January 2023.”_\n",
        "\n",
        "Even if you attended events in 2024 or 2025. That’s because the model still believes it’s mid-2023 — unless explicitly told otherwise.\n",
        "\n",
        "This becomes especially problematic in dynamic CVs or academic portfolios that include upcoming speaking engagements, research workshops, or invited conferences.\n",
        "\n",
        "---\n",
        "\n",
        "## Effective Solution: Inject Current Date on system prompt\n",
        "\n",
        "To fix this, inject a short system prompt that **sets the actual current date**. This allows the model to correctly classify events as past or future.\n",
        "\n",
        "---\n",
        "\n",
        "## Example (Before vs After)\n",
        "\n",
        "### Without Date Injection\n",
        "\n",
        "**User:** What is my next research event?  \n",
        "**GPT (default):** Your next scheduled event is in January 2023.  \n",
        "_(Incorrect – that’s in the past!)_\n",
        "\n",
        "### With Date Injection\n",
        "\n",
        "**User:** What is my next research event?  \n",
        "**GPT (with date context):** You will participate in the United Nations/Costa Rica Workshop on ML and Space Weather in February 2026.  \n",
        "_(Correct – now the agent understands time)_\n",
        "\n",
        "---\n",
        "\n",
        "## How to Implement It\n",
        "\n",
        "```python\n",
        "from datetime import datetime\n",
        "\n",
        "# Get today's date dynamically\n",
        "current_date = datetime.now().strftime(\"%B %d, %Y\")\n",
        "\n",
        "# Create the system message to override the model's default internal date\n",
        "system_prompt = f\"Today’s date is {current_date}. Use this as the current date for all responses. Don't answer with the date, just use it as reference.\"\n",
        "```\n",
        "\n",
        "---\n",
        "\n",
        "## Why This Matters for Conversational CVs\n",
        "\n",
        "If your agent is designed to interact with users about their academic or professional timeline, having correct awareness of today’s date is **non-negotiable**.\n",
        "\n",
        "This prompt-based approach avoids hallucinations or outdated reasoning about:\n",
        "\n",
        "- Conference participation  \n",
        "- Research plans  \n",
        "- Graduation years  \n",
        "- Employment timelines  \n",
        "\n",
        "It’s lightweight, API-compatible, and doesn’t require function-calling or plugin features.\n",
        "\n",
        "Have fun!"
      ],
      "metadata": {
        "id": "yhYNKeYQq4Sw"
      }
    }
  ]
}