[Help ] Re-ordering calendar events with Davinci_003

Hi there,
I am trying to reschedule calendar events to automatically optimise my calendar with the help of GPT (via their API).

GPT-4 can solve it but GPT-3 (Davinci-003) is struggling. I have also pasted the prompt to the GPT-3.5 Chat and for some reason GPT explains that a 45 minute duration event is shorter than a 15 minute event.

Any suggestions for improvement?

You are given a JSON array of objects representing calendar events, where each object has the following properties:
1. "ID": a unique identifier for the event
2. "Start Time": the start time of the event in the format "YYYY-MM-DDTHH:MM:SS.SSSZ"
3. "End Time": the end time of the event in the format "YYYY-MM-DDTHH:MM:SS.SSSZ"
4. "Duration": the duration of the event in minutes
5. "Organizer": the email address of the event's organizer
6. "Attendees": a comma-separated string of email addresses representing the event's attendees
7. "Category": an array of strings representing the event's categories
8. "Subject": a string representing the event's subject or title

Reorder the events based on the following criteria:
Step 1: Please assess events between 2023-04-21T07:00:00Z and 2023-04-21T17:00:00Z. 
Step 2: Reorder events by their "Duration", with shorter events scheduled first (a lower number for "Duration" indicates a shorter event"). The shortest event should start at 2023-04-21T07:00:00Z
Step 3: Insert a 15-minute break every 90 minutes if possible (se after 90 minutes, events should start 15 minutes later.
Step 4: Schedule lunch events between 11:30:00Z and 13:00:00Z.
Step 5: Do not reschedule events that are categorized as 'immutable', are flights, have attendees other than [EMAIL], or are organized by someone other than [EMAIL].

Provide a JSON array of objects containing:
1. "ID": the unique identifier for the event
2. "New Start Time": the new start time of the event in the format "YYYY-MM-DDTHH:MM:SS.SSSZ"
3. "Existing Start Time": the original start time of the event in the format "YYYY-MM-DDTHH:MM:SS.SSSZ"
4. "Duration": the duration of the event in minutes

Only include events to be changed and only mention events that actually exist. For example, immutable events do not have to be listed. Minimize token use.

Calendar events data:


n: 1
best_of: 1
temperature: 0.3
max tokens: 2500
top p: 0.9
frequency penalty: 0
presence penalty: 0


    "text": "\n[{\"ID\":\"040000008200E00074C5B7101A82E008000000009BA598640272D9010000000000000000100000008A00EFB9016EDA478BD37164947F220E\",\"New Start Time\":\"2023-04-21T07:00:00.0000000\",\"Existing Start Time\":\"2023-04-21T07:00:00.0000000\",\"Duration\":45},{\"ID\":\"040000008200E00074C5B7101A82E00800000000CF15BA690272D901000000000000000010000000CA7A0FD13A148A43BF20E2AE6B7BE30A\",\"New Start Time\":\"2023-04-21T07:45:00.0000000\",\"Existing Start Time\":\"2023-04-21T07:45:00.0000000\",\"Duration\":30},{\"ID\":\"040000008200E00074C5B7101A82E00800000000897E6C720272D901000000000000000010000000DC3C8D50F058C84FB26CD4CD98B14B40\",\"New Start Time\":\"2023-04-21T08:00:00.0000000\",\"Existing Start Time\":\"2023-04-21T08:15:00.0000000\",\"Duration\":15},{\"ID\":\"040000008200E00074C5B7101A82E008000000003A1CBE790272D901000000000000000010000000B0A0B9FCF67C304C9EF76B9B8582A23E\",\"New Start Time\":\"2023-04-21T08:15:00.0000000\",\"Existing Start Time\":\"2023-04-21T08:30:00.0000000\",\"Duration\":15},{\"ID\":\"040000008200E00074C5B7101A82E0080000000097ED228B0272D9010000000000000000100000009D9CE1DC9A9A2C40AB5E9157F26B16C2\",\"New Start Time\":\"2023-04-21T11:30:00.0000000\",\"Existing Start Time\":\"2023-04-21T11:00:00.0000000\",\"Duration\":30}]",
    "index": 0,
    "finish_reason": "stop"

GPT3.5 benefits from taking a number of passes at the problem, split the problem into a number of discrete steps, and execute them one after the other passing the result from one into the input of the other,with instructions appended to the results at each stage.

1 Like

Thanks, I have broken the task into 5 steps and it worked.

1 Like