Date & time awareness for a GPT-4 based coach

Hi everyone,

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?).

Thanks

1 Like

Hi! And welcome to the community.

Will this help?

You are basically creating your own timeline which seems to be helpful and solve it.

1 Like

The page no longer exists. What was the solution?

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.

I’m using API.

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.

Yes, you can use “aditional_information” which adds new text to the end of the GPT Assistant Prompt.

However, even you can add last user message timestamp, it will be near impossible to specify each message a timestamp.

Maybe is too much to ask, but it will be really great to let GPT Assistant each message timestamp

That way you will be able to ask things like “Hey remember what you say last monday?”

Practical uses will be to customer followups, on appointments, billing, recurring payments, etc.

For example:

  • User: “Hey, no one remind me of my appointment (or payment)”
  • Assistant: “Yes i did, yesterday morning”