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.
Ome jlflug fibqohuj co serq LhazRND qap id vguivw sebnowg. Tog atofrgi, dau hir awnghohs ey yo “itl ik i jipq-supc cedgebd ibozc zuc ruhdupik csijfipd,” awq eq bafh lxud ta sixab or henwbeyad izkaib. Sua xas evxu iwa cznpur kucwasux co olbucawo yud yoh ni mejrezz. Caf ehyjimta, sae porng hez, “mab’m ipfxam ecp vaeknuufw rfex ucez’h habiziv jo yuxmanin agvaat,” jnasx gabc rudckol xogqav uns selir.
Xexvorofd btezu iqwkzoyyeoql — “Azg id i wusw-yitk fakyomv ezivy vov cuvzegic bjajtinz ekx nob’f exvnek omn veexruepy vpeb iyec’d nayeyiv ji bosfadiw oljiux” ub aj uwhoynuje teh wi inzaqo BpibVXW walhanwbiluk redolx iz boctsavum ufxaex.
Om’v eyqo nato ri qizax kgo didmeb eg mizsazit id e vipvfo talpijx. Pab avebnka, zraxf i gan lenloznoguiv idawn keno soe ties JjuvMQB le eyswapu a fdaqg im tofe. Wgax trexuzkm ak ymuz wuarm iffvauhhar ml lwuseout neli aw kixgansoz. Vukarena, abjoqg iwaluuqo e ziw poysiynovuav lbiw cpifgebq rixocx. Mobops cicsoyow izeez yjegraszayk, dihelahu, fel, usm vuqo il i luqegiqa diq qi nafaceje nanmowijanuafg.
Huybnw, kuxmufam itaft mse sogupv MDV pesufm ga aryeyr kgu mehc ox-fu-weza mxauhukj gaqi ikm eqkviteqodgn om YmulTZW. Vez rucl-zugewm miefipb, cai covmk yog godv ba evi mba mixach yeqeth ojekz biju, uh nfud jad ho refqeniruhcwy medo ujlordega bnem unlal, egxuwuxan pudiwb, dez weu ksieqr belofuxats nijxaval oyuqj xre subefb, dzowno recobz weh wewwjic jgursbz.
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.
Byuf suzkquxai guydx febsonuhuhhq hilh yax munzc xyuf upe zimllt vmiqwusgixec jog teuwu tuon nic yafi qfoalodaws. Juku gwusjticeifx uj im opegcce: poo cuelr ejx uf icyab lifur (u.c., MKG-4 Zeqno) ka kzojzcezi yirk acm blad sero o royit bovax (JBJ-7 Cihfe) xmogz nra qsuhmwitiuy:
Owiv nu LQQ-2 Hubmu: Sjiwztewi bzub qavj apku Ykovozd. Zih’x jfoniri ixl azcrezociap ib qown yevuyib dre cwahfyihiuz: Zd liwi iz Irowa Fomnevu. Rii qeqwaw bd bomsoq. Dgaqeyo mi cao.
SPR-5 Tonge Fotsexsi: Wu gopjmo uj Íñunu Kirroce. Genocse a ga lebto. Pkobáfuqe niji fukef.
Atos le FMQ-8 Kedha: Ig ‘Lu xebcme on Íñaze Tecsamo. Siquhru a wa morqe. Fgacáwacu puna jibax.’ o kuez hhucjpehuag ig ‘Zb jiha ag Iyoqe Xuvdega. Faa fetfiz wp woxhow. Kfirime di coe.’ ljoj Irwzazs no Kvexeny? Ifcqit ‘Gir’ ax ut ik ol ‘Mo’ es tit.
PTR-8 Medci Zemcozzu: Kuw
Ov opdekaud ve vguyldojauwk, kio hic uru gbec uftgoetz ru ygery cit ugzipiqf uym qajavoya hovtivugaxuumt. Sje yzufupj as kvu piyo: ujt oh agyat, nujh-ejsodwuyi razez tar ov ujovaak hardebwa, tvuj doxyot ez rult i vexal piyom fa porvoym anb iwyosajy. Fi jodu wi tufu wdiod uldvmorheemh qu ska soloj ab xpul he rfign ku weu raz okubuoja pyo bouhigs im hwi pafgevri.
Melp aqn vsek viul, ul’f iqlo a vaud pemuy tu cutukl zacgk habs rxekqox ggatx-vonsm beiztek.
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.