Here’s how to stop ChatGPT from hallucinating

ChatGPT hallucinates when it runs out of context window and forgets earlier conversation. Ask the model how much context it has used, and start a new chat once it hits the limit.
Chapters
Here's a way to get ChatGPT to stop hallucinating. So the reason ChatGPT hallucinates a lot of the time is because the context window has been filled up. Basically, this is the memory of ChatGPT. Here's the hack, though. You can ask ChatGPT how much of its context window it has left. Here you can see I'm saying, how much of your context window have you used? And ChatGPT is able to say, oh, I've used 1400 out of 8000. I then have it generate some more text and it's able to say, okay, Now I've used 2,700 out of 8,000. The main reason people run into hallucination problems is when ChatGPT goes over that limit. When it goes over that limit, what happens is it starts to forget stuff from earlier on in the conversation, which means it loses some of the most important context of the conversation. It just gets shunted out, basically. So we can't actually stop this from happening, but what we can do is every once in a while say to ChatGPT, hey, how much context window have you got left? And if it says, oh, I've gone over my context window, it's time to start a new chat.
More from Kyle

What’s the number 1 reason for not starting a business? I polled my 60,000 newsletter subscribers

Is ChatGPT dying?? Goldman Sachs published this chart showing traffic to the chetgpt website

The new way to build a business : audience first! Inspired by Tibo - follow him on twitter

How to grow on social media? I stalled out in growth the last month - and have finally started again

Is gen AI a dud? Kinda hard to reconcile with the massive productivity gains some of us are already

Companies banning AI is a massive opportunity for you as an AI expert Doesn’t make sense? It’s

Quick tip on using AI for personal development and making hard decisions Have it act as you in the

Is ChatGPT’s new advanced voice mode illegal in the EU? It’s ability to detect emotion is a no no


