Why can’t ChatGPT sort a list of dates?

1.35K viewsOtherTechnology

Basically I’ve being trying to sort a list of food by date. I took a rough note of each food and date and it gave it to ChatGPT and asked it to format and order it. It formatted it just fine but it couldn’t order it by date. Most of them were in the right place but there were a few out of place. For example at one point it gave me:

– 1st February 2024 – Cookies
– 1st March 2024 – Biscuits
– 1st June 2024 – Soup
– 3rd June 2024 – Chocolate
– 9th May 2024 – Chocolate
– 1st August 2024 – Eggs
– 1st August 2024 – Chicken
– 15th September 2024 – Yogurt
– 25th November 2024 – Sauce
– 16th November 2024 – Soup
– 19th November 2024 – Apple Juice
– 1st November 2024 – Potatoes
– 1st November 2024 – Soup
– 1st May 2024 – Carrots
– 1st January 2025 – Shortbread
– 1st January 2025 – Pasta
– 11th January 2025 – Noodles
– 1st January 2025 – Carrots
– 2nd February 2025 – Cereal
– 7th April 2025 – Green Beans
– 26th March 2025 – Rice
– 28th April 2025 – Pasta
– 1st May 2025 – Stock Cubes

I tried both written and numerical date formats. I also tried asking it to format it and then order it in separate queries so it was only doing one thing at once. I’ve tried a few separate lists and it happened with each. I also got the same results with copilot. When I pointed out the mistake it would say something like “sorry, here’s the correct list” and output the exact same thing. I then remembered something similar happened about a year ago when I asked it to list the Agatha Christie books in publication order and tell me which ones were in thr public domain. It listed them all but there were mistakes in the order. It would then tell me that only books published after (for example) 1926 or later are in the public domain, and then tell me that a book published in 1925 was.

So why can’t it do this? It seems like a very basic task, one that much less sophisticated programs could do. It has so much information, surely some of that information includes which order the months come in and that 25 comes after 16. I’ve had it do relatively complicated calculations based on a rough written description, so ordering a few dates thst are all formatted the same should be a walk in the park, right?

In: Technology

34 Answers

Anonymous 0 Comments

Ok say it with me.

ChatGPT is not an AI. Its not a computer. Its not smart. It cannot do anything. Except spit out what it predicts is the most likely next word.

Anonymous 0 Comments

If you start your prompt with

“Write and execute code to sort these dates” 

Then it will write python code to solve the problem, then run that and produce the correct result. 

Anonymous 0 Comments

man I went on chatgpt today and gave it 1 simple line of lyrics and it told me it was by X artist then I told it that it was wrong then it suggested another artist, once again I told it it was wrong then it told me another artist, at last I gave up and told it the artist it was from and then it said it was a random song by the artist I gave, the hell?

Anonymous 0 Comments

I got it to do this on literally my first attempt: https://chatgpt.com/share/800492f1-16f2-413d-9507-dd2814a4587e

– 1st February 2024 – Cookies
– 1st March 2024 – Biscuits
– 1st May 2024 – Carrots
– 9th May 2024 – Chocolate
– 1st June 2024 – Soup
– 3rd June 2024 – Chocolate
– 1st August 2024 – Chicken
– 1st August 2024 – Eggs
– 15th September 2024 – Yogurt
– 1st November 2024 – Potatoes
– 1st November 2024 – Soup
– 16th November 2024 – Soup
– 19th November 2024 – Apple Juice
– 25th November 2024 – Sauce
– 1st January 2025 – Carrots
– 1st January 2025 – Pasta
– 1st January 2025 – Shortbread
– 11th January 2025 – Noodles
– 2nd February 2025 – Cereal
– 26th March 2025 – Rice
– 7th April 2025 – Green Beans
– 28th April 2025 – Pasta
– 1st May 2025 – Stock Cubes

Anonymous 0 Comments

I just tried with chatgpt and got a correct sort on the first try. which version did you use ? what prompt did you use ? mine: create table from [list with dates and names] then sort the 1st column chronologically.

Anonymous 0 Comments

When I ask it to show me the dates in YYYYMMDD and then rank them, as numbers, smallest to largest, it works. For some reason it helps me it seems when I ask for it in table format with a column showing the “ranking” smallest to largest on any list I’ve fed it to do anything sorting related with.

Anonymous 0 Comments

ChatGPT is just a giant chat bot, that is all it is. Actual analysis is not within what it can do.

What it is very good at is picking out patterns and attempting to make new sentences based on those patterns. For example, you have a lot of sentences that read:

*I like dogs. I like cats. I like ponies. I like chipmunks.* – There is a pattern there and ChatGPT will likely see it. Then you have a lot of sentences like:

*Dogs like steak. Dogs like treats. Dogs like playing fetch in the park.* – Some more sentences with a similar but different pattern. Chat GPT then can try to mash those together and get things like:

*I like steak. Dogs like chipmunks. I like playing fetch in the park.* And you see the quality of the result.

ChatGPT has tried to pick out the commonalities from the groups of sentences. And while ChatGPT is much more complex than my pitiful examples, it is still doing what I demonstrated above.

Important hint: Never ever use ChatGPT to check the building code. It is going to be wrong; or maybe sorta kinda right, but only when the moon is full and the grass is green (and the code inspector has possibly had some peyote depending on how weird the code summary is from chatgpt).

I tried it a couple times out of morbid curiosity just to see how bad it was, and it was better and worse all in one sentence.

Anonymous 0 Comments

I ran some tests and it passed every single one.
Sorting dates that are “Number word month year” (e.g 12 September 2024), sorting dates that have an addendum (e.g 12 September 2024 – XYZ), sorting dates that have a suffix (e.g 12nd of September 2024 – XYZ).
cGPT is a black box, but it appears to have solved it in a human way. Convert it to a sortable list, sort it, unconvert it and present it.
I suspect you may have been using a lesser model. Have you been using cGPT4o?

Anonymous 0 Comments

Weirdly, if you asked it to make you a python script that sorts that data, it would probably output something that works.

Anonymous 0 Comments

There is a way to do things like this with GPT. As others have pointed out, it’s just a language model. It knows very little. The way to make it do things like this is to ask it to create a program/script to do the tasks it is assigned and then run that script. Put it into the “My GPT customizations” and you’ll be fine. It can then reference the result of the script and then add the words after.