I’m building a coach with GPT-4 and I have been struggling with making it aware of the date & time of previous messages to avoid irrelevant greetings and replies that refer to the wrong time of day
(ie. the coach thinks it’s the next day, but it’s just a few hours later than the previous message).
For example:
Oct 6th, 13:10 – User: Sure
Oct 6th, 13:10 – Coach: Great Joe! I’ll create a guide to help you wind down.
The coach gets an event 5-min that triggers a check-in reply starting with:
Oct 6th, 13:15 – Coach: Good morning, Joe!
Including the timestamp in the content field of the messages just creates date/time hallucinations. I was wondering if anyone found a clever way of inserting system messages with date & time for context (maybe between sessions?).
I would basically like the GPT to be aware of the time when a message was sent. If I include the time in the content of the message, then the assistant messages will also be generated with the timestamp. I don’t want that. So how can I include the timestamp of the message?
Are you specifically asking about a GPT agent to be run within ChatGPT Plus?
ChatGPT already is given the session start date. It however doesn’t have a mechanism to inject time.
With the API, you could make an additional_instructions that included the session start date and time, along with current date and time, and even store some information as thread metadata.
API completions calls give you ultimate control over what the AI model is fed for information.
Sorry, I can’t find any info about additional_instructions and metadata in docs… can you share a link?
Update:
I’ve found something about metadata, but it seems to be per thread, not per message. It would be better if it was per message.
Also, I’m using the old version of Python bindings (the version 0), and I can’t change it quickly, so I’d prefer something that can work with the old version.
I think I’ll have to use system messages to inform about the time.
Additional_instructions is a parameter of a run. That is specifically when using Assistants to have autonomous agents that can run tools. It is listed in the API Reference.
You load a new user message into a thread, and instantiate a “run” to have the AI do its magic and form a response.
Placing time as a constantly changing additional instruction, such as “Newest user input message created 2024-01-10 14:14” could let the AI use that information when necessary.