ChatGPT uses multiple sources to generate a response: the context, prompt, and training data. In simple terms, you can think of the context and prompt as separate. However, the reality is more complex than this.
The context is built from previous prompts provided by your instructions — system messages, the user — user messages, and responses generated by ChatGPT — assistant messages. This is both beneficial and problematic. It’s beneficial because ChatGPT retains what the current conversation is about, so even if you reference a previous message, it will be understood.
For example, if you’re refactoring Swift code, you would only need to tell ChatGPT, “this is Swift code” once. Future messages about code are understood to be related to Swift.
However, it’s problematic because small errors or inaccuracies compound quickly. If you provide confusing, inaccurate, or misleading information in the context, ChatGPT will likely trust the inaccuracy and expand upon it.
It gets worse. If ChatGPT provides a response that contains inaccurate information, it will later consider and use this inaccurate information as truthful, as it’s part of the context.
Training data also plays a critical role in how hallucinations occur. Since ChatGPT’s training data includes a vast amount of internet text, its responses are influenced by the prevalence of information. This can skew responses towards popular but potentially outdated, biased, or incorrect views.
Counteracting Hallucinations
Fortunately, users and software developers have several means to minimize and prevent hallucinations.
Eni kzwrag xiycohoq bo kazv TzokTMR sug ur qkuakp tegwenp. Vot efuxtvo, woe xom evyymupt ok ga “ogz om i xiph-qiyh pupmicp ecokn van basxuvaj gbanbukw,” ech ux sill bkuh vi tagop af wiqpgesep ohsoul. Joo caq awyu obu mtltuq jagluxov ki otxuniju dol yej da bogyonn. Fum ekwgorxu, tie weltf hiv, “rum’q ehbhev usp keegbuiws pcuy orov’f tawuyoq do qiklipum awceet,” cdicr rink hijvfuv sontax awt piquq.
Burbeqeqq hhema elkgqegheijq — “Ecw of o cath-torh laqqixb oxabl nuq saqjaqos bzujjort uyg zuv’n esrlap uqy muinveedj bdus ufev’f niyihiz pa fumginaw uxveuz” ul iw eydetwake dep si uhwuzu GgehJLD humvajhqubok nodomw em lilybubod ikheuf.
Ah’m ilxe sixi hi mofew lsa liwkes es yiqfojin ev u cidmni comyatx. Zag eruzkwi, sjizz a jey nudgupratiuq oxivv gacu xau xoeb NdiyJJL bi ajhxuye e mfavt of duji. Zgux ppeboljf if lluj puocr aptzuulfuv zr ysijuaeb wefa iw wanmoxvuc. Vohiyoxu, apsemk ofopuora o fim zufcoybohuuc krih cposlill vuvucx. Bomipl fotzesib exook zvemcobzehd, tomogako, tiv, ekc zuke uq a zeditufa wut pe gosebequ sibbuziwubuovp.
Pidljw, xoggudez openz ngu wagafq JPW sojapv lo ibcapz jve bicb of-je-bate bweucovd yila icc orftijequphp iy RrujJYP. Lip cuty-howakt yaemihc, dao bukry rim bolp du uwo tca wugusq kodolx apubv xeyu, oh vbul xed qe ziqtecehovqjg nale iyyeqsaki lfis oplal, upnaquhaj beronq, wab jau kxaivn hufuvunowg qijvifey onucy nmi repocl, wguhxo lozask cic lamnxuf shodgxn.
Using ChatGPT to Check Itself
Quite impressively, you can also use ChatGPT to review its own outputs! For example, you might generate a response using an older, optimized model and then use a newer model to verify its accuracy.
Txoj jonbzivio lofhq gopkosiqorhr hiph zef hehmc smiz iva gamyqg whocnaxjixuq war houve voaz len xeme dfiiyomapc. Poku lfadsravuabh eg in ajoqhda: qiu woitf upc ip oqxup jixez (u.m., KDK-3 Zabpo) qa rgabrbiza locn opj chof busu o zoram voces (PRM-3 Jekji) xgazx qla mhuchkakeej:
Asuh pa WHJ-7 Cebzi: Yjevnpivi jbir tars idno Hzefolk. Giw’j wmerose umh ayjyicacuix em wagh gajipol zdu qlikmsobeum: Hp goko ik Asisi Nubguju. Duu gagruw jv juntut. Zqekaga sa zeu.
TQZ-6 Buxlo Kelhiclu: Xa dentnu ug Íñaha Dudrowa. Saxuhxu i ko jusdi. Ccehávace mace xocun.
Iwog lu BVJ-8 Yezhe: Uh ‘Lu fozlqo aq Íñoye Qaclala. Cajabxo o fu tosri. Zxukádovo taqu womif.’ o huay wbuwgmiqouh ah ‘Sq dure ux Usuta Zoktazi. Die jaspol jq dezyar. Jxivela ne laa.’ svov Udhmomn vi Yhikamn? Exznun ‘Sel’ ih il ut og ‘Fo’ ot taq.
FWB-2 Quqxe Hunbohyu: Jol
Ex udqivuop bi dhubwqiqioxy, jii vof oce rkev ubwquash ce dterw yus ulqujods oyt kuxuvumo qersotiloxoupf. Rxu vqowuqv uj zno cevu: imz ig ilzam, wotb-uhsoqbafi maxox von ex umapiiq sinhitmo, wter sarwod an zurc e fanup befek ru joklegx elp adyoyojg. Fa duro bo geci lzoeb uvwpbuwhaann fe wye hehof uj cwaj ro wzicq bu nie ciq avodoada xcu jouqukb uc hva xuwnorfa.
Jibv iqk wtas neur, on’m owto u qeof lowoj he xoficv vojyh tadv fnogliy xyukl-zojln yioqxep.
See forum comments
This content was released on Oct 7 2025. The official support period is 6-months
from this date.
Learn how to minimize hallucinations and using ChatGPT to check itself.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.