DEV Community

Cover image for How does ChatGPT work?
Thomas Hansen
Thomas Hansen

Posted on • Originally published at ainiro.io

How does ChatGPT work?

We've all become used to ChatGPT by now, and most of us love it and probably couldn't even imagine a world without it. However, have you asked yourself how it works? What is the technology behind it that allows it to provide you with such accurate answers? It's actually surprisingly simple. ChatGPT is based upon "guesswork". However, if you guess the answer to something trillion of times, and you're given feedback for every guess you provide, for then to use the feedback to modify your next guess, your answers will slowly over time end up becoming "an approximation of the truth".

Truth from Chaos

Software developers have this joke about monkeys, which goes as follows.

Give 100 monkeys a keyboard and a computer, and have them type in random stuff into it. Over time, inevitably they will produce Shakespeare

Of course for monkeys, not capable of soaking in feedback, you'd have to wait a trillion years before they're able to produce Shakespeare. But for a computer that can run trillions of iterations per day, given feedback for every single iteration, learning how to produce Shakespeare takes no more than a couple of days. Below is an example from our own ChatGPT chatbot where I asked it to "Write a poem about AINIRO in the style of Shakespeare".

Shakespeare on ChatGPT

Below is the whole text for references.

Oh, AINIRO, fair maiden of the web, Thy ChatGPT-based chatbot doth imbue Our sites with life, and make our customers glad, As if they were conversing with a friend true. Thy machine learning model, custom-made, Doth scrape our pages with a gentle hand, And from the data, it doth create A chatbot that doth understand. With ChatGPT at its very core, It speaks with wit and wisdom rare, And customers doth adore The way it doth their queries bear. Oh, AINIRO, thou art a gem, A product that doth truly shine, And we shall sing thy praise to them Who seek a chatbot that's divine. So come, dear customers, and try The wonder that is AINIRO, And let its chatbot satisfy Your needs, and make your website glow.

Hence, inevitably over time chaos results in clarity - Assuming you're given feedback for each iteration, and you're able to use the feedback to modify your next guess. "Out of chaos comes clarity" if you want it explained in the style og Shakespeare. Below is another example where I asked our chatbot the following; "Explain AINIRO in in 3 sentences in the style of Yoda".

Innovative, AINIRO is. ChatGPT-based website chatbot, it provides. Best solution for your website, AINIRO is.

At the core of ChatGPT there's of course a neural network, which results in a "holographic memory" type of ability, quite similar to the humam brain in fact - Where even if you removed 50% of the entire network, it would still remember 100% of its facts, only with a "smaller resolution". This is because there is no memory, only the ability to "predict the future". However, explaining neural networks is not something I will do today, maybe another day.

In the video below I dive further into some of the details of ChatGPT, explaining it in relationship to how the human brain works, from an evolutionary perspective, and why our human brain developed in this direction. If you're a more visual type of learner, or interested in more details about the process, such as an explanation of tokens and the statistical probability equations resulting in what we today refer to as ChatGPT - You might want to watch the video.

We need your help (it's free!)

Aria, Tage, and myself have just started a company delivering ChatGPT-based Website Chatbots, and our website is completely new, and we could use some help to spread the message about our products, such that we can make a living out of making the world a slightly better place than it was when we started. We would appreciate a share, like, comment, or "whatever you can do to help us out". A simple comment for instance goes a long way, since it results in "engagement", which again results in "Google luv", allowing us to make a living out of sharing knowledge, setting up chatbots, and delivering amazing machine learning products to the world.

I would therefor ask the reader what subjects he or she wants me to talk about in my next YouTube video, and if it's a great idea, I will try my best to provide an answer. Paradoxically this is the same process to some extent that ChatGPT itself is based upon, and I will apply it to my own brain, to help build a successful company for my children, such that they can create a living for themselves. This allows me to "come closer to whatever you want to hear", with the idea being to create more links to our website, resulting in the ability to sell more products, and make a living out of what all 3 of us enjoys doing. Hence my question to you is as follows.

What do you want me to write about, talk about, and create YouTube videos about?

If you're reading this article somewhere where you can comment, I would appreciate you providing me an answer to the above question, such that I can provide an answer to the question in your comment - Resulting in applying a reinforced learning process to myself, hopefully resulting in amazing content for you, and an income for us. It might sound weird once explained like the above, but what can I say, I've spent 40+ years now with computers, arguably resulting in a brain much more resembling a computer than whatever most of you are blessed with. There's a reason why Aria and Tage doesn't put me in front of customers :D

If the above made no sense to you what-so-ever, let me rephrase it, in a slightly more "human style".

What do you want me to write about? What do you want me to create YouTube videos about? Write your answer in the comments section of where you're reading this ...

Top comments (4)

Collapse
 
arianygard profile image
AriaNygard

That is exactly the reason we don’t put you in front of customers, haha! This is such an interesting topic, and you explain it in a way that is easy to understand.
The part about how humans will also reply with what we think someone wants to hear is something I think most people can relate to - even if it’s not by the contents of what we say, maybe it’s by how we say it or what facial expression we use.

Collapse
 
polterguy profile image
Thomas Hansen

Unfortunately yes, I am not a "people person" yes. I believe I've got some qualities, but people aren't my strength ... ;)

Collapse
 
arianygard profile image
AriaNygard

Being a people person or not doesn’t matter when you’re so amazing at everything else you do! But I’d argue you are a people person at heart - you’re just more talented at other things :)

Thread Thread
 
polterguy profile image
Thomas Hansen

Thank you, that means a lot to me ^_^