<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Daniel Bejarano on Medium]]></title>
        <description><![CDATA[Stories by Daniel Bejarano on Medium]]></description>
        <link>https://medium.com/@daniel-bejarano?source=rss-348694cf2191------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dHnuvTZTQlqxLtvwPG5wOg.jpeg</url>
            <title>Stories by Daniel Bejarano on Medium</title>
            <link>https://medium.com/@daniel-bejarano?source=rss-348694cf2191------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 11:19:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daniel-bejarano/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Brief(ish) Story of ChatGPT]]></title>
            <link>https://daniel-bejarano.medium.com/a-brief-ish-story-of-chatgpt-226c87480772?source=rss-348694cf2191------2</link>
            <guid isPermaLink="false">https://medium.com/p/226c87480772</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[vector-embeddings]]></category>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Daniel Bejarano]]></dc:creator>
            <pubDate>Tue, 23 May 2023 21:58:37 GMT</pubDate>
            <atom:updated>2026-04-01T17:12:31.143Z</atom:updated>
            <content:encoded><![CDATA[<p>What is this <em>ChatGPT</em> thing? And why is everyone &amp; their mom talking about it?</p><p>It is a language model. But that doesn’t say much. To understand this complex AI model we’ll break it into its basic components.</p><p>The <strong>Chat</strong> part is obvious if you’ve used it. You give it prompts and it responds. Below are a variety of examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*weg49OlE20Tj1rte503AjQ.png" /></figure><p>The <strong>GPT</strong> part means <strong>Generative Pre-Trained Transformers</strong>. Pretty self explanatory. Moving on…</p><p>NOT, let’s examine one at a time.</p><h3>Generative: 😺 vs 🐶</h3><p>Short and sweet: ChatGPT is a model that <strong>generates</strong> content. More specifically, in Machine Learning (ML) you can divide models into two categories. One is <strong>generative</strong>, the other is <strong>discriminative</strong>. The difference is this: generative models learn the characteristics that make up a group of data. For instance, given pictures of cats and dogs it will learn what a dog looks like to the extent that you can say “hey, draw a picture of a dog” and it will be able to <strong>generate</strong> an image of a dog, one that didn’t exist before. <strong>Discriminative</strong> models don’t learn the intrinsic characteristics of data. So you can’t ask it to draw a dog</p><p>Instead, you can give it an image of a dog or a cat and it will say “this is a dog” or “this is a cat”. In other words, it will learn to <strong>discriminate</strong> (differentiate) between cats and dogs</p><p>Thus, by being <strong>Generative, </strong>ChatGPT is able to <strong>generate </strong>content because it has learned the characteristics of some data. In this case, that data <em>isn’t</em> cats and dogs pictures, it is… <strong>language </strong>itself</p><p>Sexy stuff.</p><p>We mentioned ML. You’ve heard the term, but how do you eat it? Think of it as a subset of AI. A way to program computers so that they can learn patterns in data. As you give them new data, they keep learning. In the example above, how does a computer learn to differentiate between cats and dogs? Well, you find tons of images of cats and dogs and give them to the model. If you have a label (“cat” or “dog”) for each image the model will do some mathematical computations and learn patterns like “If I see triangular ears and a little triangular nose, then it’s probably a cat!”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*yl_t8S4oTXp5pAZkV9jC_w.png" /></figure><p>In the context of ChatGPT, generative means that it learns the <strong>probability</strong> <strong>distribution</strong> of language. What the hell does that even mean? Well, as I wrote the sentence <em>“What the hell does that even “</em> you probably could guess what the next word would be:<em> </em>“mean”. That’s because you’ve had years of training. Meaning, for years you’ve heard and spoken English and you’ve heard that phrase before many times. For that reason, this sounds off: <em>“What the hell does that even chicken?”</em> If you analyze it, not only does it sound funny, but it doesn’t make sense because the sentence structure calls for a verb to be where <em>chicken </em>is. That’s the probability distribution of language. There is a structure to it, and certain words appear together more often than others. That’s what <strong>Generative</strong> means for models. They learn that, <strong>probably</strong>,<em> </em>“mean”<em> </em>is <em>way</em> more likely to appear at the end of my “What the hell…” sentence than <em>chicken</em>.</p><p>Have you ever played that game where you get in a circle and one person says a word, any word. The next person repeats that word and adds one new word to it. So on and so forth, thus socially building a sentence on the go, á la kumbaya. Well, in essence, that’s what ChatGPT does, but by itself, without friends 😢</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*7V0VZqFqAwEDwTnlTYvEdA.png" /></figure><p>Basically, all ChatGPT does is guess the next word in a sentence, given words that came before it. It’s just <em>really</em> good at guessing what that next word is because it learned language and can understand context. But how does a models learn language? To answer that let’s move on to the <strong>Pre-Trained </strong>part, or the<strong> <em>P</em></strong><em> </em>in <strong>GPT</strong>.</p><h3>Pre-Trained</h3><p>Like the 😺 vs 🐶 model above, when you ask ChatGPT for something, it doesn’t go into the internet, learns the probability distribution of language from scratch and then responds to you. Because just like it took you years to learn English, models too take time to learn. ChatGPT is <strong>Pre-Trained</strong>, meaning it already saw billions of sentences and learned that “Best day ever” is a more likely phrase than “Best day water”. Hence, when you prompt ChatGPT it responds in seconds.</p><p>So what does training actually entail? A computer doesn’t recognize “Best day ever” as language. It’s not a human. It can work with numbers though. The first step to train a language model (like ChatGPT) is to convert phrases into a series of numbers. We call these <strong>vectors</strong><em> </em>and they look like this: <strong>[9, 0, 2, 4, 7].</strong> It’s just a list of numbers, in this case a list of five numbers. They can be of <em>any</em> size. This is a vector: [0], this is also a vector: [0, 1, 2, 3, 4, … , 10000]. A vector (a.k.a. list of numbers) doesn’t do much by itself. But, the difference or similarity between two or more vectors contains knowledge! To exemplify:</p><ul><li><strong>[9, 0, 2, 4, 7]</strong> and <strong>[9, 0, 2, 4, 0]</strong>. Are these two lists similar? Very much so! At any given position, all numbers are the same except for the last ones (7 and 0).</li><li><strong>[9, 0, 2, 4, 7]</strong> and<strong> [0, 3, 3, 7, 2]</strong>. How about these? Very different.</li><li>Here’s a challenge: Is the list <strong>[1, 7] </strong>more similar to <strong>[3, 6]</strong> or to <strong>[4, 5] </strong>(remember, vectors can be of any size, here they’re size 2)? Hard to tell. But maybe if we plot them we can see. The plot below is just a 2D grid of numbers from 0 to 10, like coordinates. It’s easy to see that coordinates <strong>[1, 7]</strong> are closer to <strong>[3, 6]</strong> than to <strong>[4, 5]</strong>. We can say that red is more similar to blue than it is to green.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*cLLj6Yvl_bDbOeFDfOtY-g.png" /></figure><p>Vectors of size 2 (or two-dimensional) can be plotted in 2D grids. But we can have a vector of just one dimension. For instance, vectors [3] and [7]:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*yXg22Zaq8i-R6gsgIXeKdg.png" /></figure><p>One-dimensional vectors are just points in a line. Two-dimensional vectors are points in a 2D grid. Three-dimensional vectors are points in a 3D space:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*UJX_tMfNkaTedYdRWxeBWA.png" /></figure><p>Then we can have a 4D vector like [5, 2, 0, 9] but that’s really hard for humans to imagine because our world is 3D. Go ahead, take your time and imagine a 4D graph.</p><p>…</p><p>Welcome back after failing to imagine a 4D graph. It doesn’t matter that we can’t picture those 4+ dimensions. What matters it that the same rules that apply for 1D, 2D and 3D, apply to any size. Why is this relevant? Because the vectors that ChatGPT uses are of approximately 1000 dimensions! How do you even plot that? Like I said, you can’t, but just like we knew that the 5-dimensional vectors <strong>[9, 0, 2, 4, 7]</strong> and <strong>[9, 0, 2, 4, 0] </strong>are alike, we can similarly compare how close or different two 1000-dimensional vectors are. You just apply some mathematical operations like addition and subtraction to measure distances. Computers are really good at that.</p><p>Ok we get it, you can have vectors of any size and calculate the degree of closeness (aka similarity) between them… Why does that matter? It matters because ChatGPT represents a sentence like “Dude, where is my car?” as a list of like 1000 numbers. Big vectors. And how crazy is it that we can convert a sentence into just a list of numbers? Crazy I tell you! More importantly, the model will learn to represent sentences that are similar as vectors that are closer than sentences that are dissimilar. And in doing so it captures knowledge. Let’s look at an example. <strong><em>Note</em></strong><em>: Because I don’t want to be typing 1000 numbers throughout this example, and you don’t want to be reading them either, for simplicity I’m going to represent sentences as 2D vectors such as </em><strong><em>[8, 2]</em></strong><em>. Technically, that’s allowed, but there is very little information you can capture in just two numbers. There’s much more space for information storage in 1000 numbers.</em></p><h3>Example: Of Monsters 🤖 and Men 👨</h3><p>This section is a little more technical, but not too much. If you’re patient, it will help you truly understand ChatGPT.</p><p>Say that we have four sentences:</p><ol><li>Monsters are horrific and evil</li><li>Humans can be good creatures</li><li>Dogs are loyal and happy</li><li>Children are a joyful and playful bunch</li></ol><p>If I say, “ok computer, we’re going to represent the above sentences as the following vectors”:</p><ol><li>[7, 5]</li><li>[9, 8]</li><li>[9, 5]</li><li>[3, 7]</li></ol><p>Are those good representations? If your answer is “Good for <em>what</em>?” then you’re on to something. Let me introduce a new concept: <strong>goals. </strong>Just like we set new year’s goals such as exercising more, complaining less, learn that tiktok dance (I’m not the only one, right?), machines also need goals. In ML (machine learning, that is) we train computer models <strong>to perform a task</strong>. Basically, to reach a goal. <strong>For ChatGPT the goal was to learn language. </strong>More specifically, it was tasked to be able to respond to prompts, and to do so while understanding context (it’s different to say “ChatGPT, tell me a joke” than to say “ChatGPT, write code in Python”). And to do all this while using human-like English.</p><p>That’s a lofty goal and we’ll get there later, but for this example our goal will be to simply <strong>categorize a sentence as <em>positive 🍏 </em>or <em>negative </em></strong>🔴<em>. </em>Now, if I ask “are those four vectors above good representations?”, can we answer that question? Now that we know what the goal is, we might. Let’s analyze the vectors (each circle in the image is a vector, numbered by the order above, and colored as follows: green = positive, purple = neutral, red = negative).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*Hwgj5s_2kHyT8HFDkuY15g.png" /></figure><p>If the goal is to differentiate between positive and negative sentences, this is a bit of a mess. Sentence 3 is closer to 1 than it is to 4, which doesn’t make much sense because 4 and 3 have a positive sentiment (we can tell by the words <em>loyal</em>, <em>happy</em>, <em>joyful</em>, <em>playful</em>), but sentence 1 not so much (<em>horrific, evil</em>).</p><p>The following would be more useful representations because the cute sentences are closer to each other, and the ugly sentence is far from them. We want vectors that end up being plotted like that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*sb72IeR6uP769P7yNsntrg.png" /></figure><p>When we say we <strong>train </strong>a model<strong>, </strong><em>this </em>is what we mean:<strong> in the beginning, the model randomly guesses vector representations</strong> for each sentence because it doesn’t know better.<strong> Then it goes through a series of iterations</strong> where it checks whether it is doing it right or not. How does it know if it’s getting things right? In this case we would need to give a little test to the model, something that says “you got it right — gold star”. Like a teacher grading a test, <strong>the model sort of grades itself</strong>. We give it a cheatsheet and say “study until you get most of these right”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*WUREaE6HNAUVqGW3rwSLsQ.png" /></figure><p>The very first step would be to label the data ourselves (i.e. create a cheatsheet for the model), like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*CdgpKHHQf9whcnfi4UT_6A.png" /></figure><p>We (a human) manually assign labels to sentences: negative, neutral, or positive. The model will then tweak the vector representations of each sentence so that the positive ones are closer together, neutral ones are a little farther away, and negative ones are furthest away. Remember that computers don’t know what words mean, so we must convert labels to numbers. A useful method is to denominate <em>negative </em>as -1, <em>neutral </em>as 0, and <em>positive </em>as 1. Why we use those three numbers isn’t necessarily obvious, but we have learned that those are good representations after years of creating and testing models. And it kinda makes sense because -1 (negative) is farther away from 1 (positives) than they are from 0 (neutral). In other words, <em>negative</em> is more like <em>neutral</em> than it is like <em>positive.</em></p><p>Now, how does a model find the best vectors to represent a sentence? Remember that Calculus thing you learned back in college and thought “this is BS”. Well, models use math from that Calculus thing and go through the following four steps:</p><ol><li><strong>Come up with some random vectors</strong> — It’s a random numbers party. Doesn’t matter what they are, the point here is just to get started. Example:<br>a. [0, 0]<br>b. [9, 0]<br>c. [0, 5]<br>d. [1, 3]</li><li><strong>Pass vectors through a series of transformations</strong> — Those can range from a simple addition, to a complex equation. As an example, let’s pass our last sentence vector <strong>[1, 3]</strong> through three transformations. <strong><em>Note</em></strong><em>: I’m choosing three random transformations to illustrate a point, but the process of choosing good transformations are more technical and scientific. In ChatGPT, the main </em><strong><em>transform</em></strong><em>ations are called, you guessed it, </em><strong><em>Transformers</em></strong><em>! The </em><strong><em>T </em></strong><em>in</em><strong><em> </em></strong><em>Chat</em><strong><em>GPT! </em></strong>(stay tuned for the next section). Ok, here we go:<br>a. First transformation: <strong>multiply by 3<br> </strong>i. 1 x 3 = 3<br> ii. 3 x 3 = 9<br> iii. So we end up with<strong> [3, 9]<br></strong>b. Second transformation:<strong> subtract 1 → [2, 8]<br></strong>c. Third transformation: <strong>divide by 10 → [0.2, 0.8]</strong></li><li><strong>Apply a</strong> <strong>Reduction</strong> <strong>Transformation</strong> — What that means is that since our vectors are 2-dimensional but our labels are 1-dimension, we need a way to compare apples to apples. If I say “is the vector <strong>[0.2, 0.8]</strong> closer to -1 or to 1?” That’s hard to tell because -1 is a 1D vector (a point in a line) and <strong>[0.2, 0.8] </strong>is a 2D vector (a point in a grid). So, we convert the 2D to a 1D. We can do this many ways, and one way is to just take the average of <strong>[0.2, 0.8]</strong>, so let’s do that:<br>a. Average = (0.2 + 0.8) / 2 = <strong>0.5</strong></li><li><strong>Compare</strong> — We know that sentence #4 is a positive sentence because a human labeled it as such. So we know it must be closer to 1 than to -1. Looking at the image below where we plot 0.5 in a line, we can easily see that hey! It’s not that bad! <br>-1 | — — — — — — | —o— — — — | 1</li><li><strong>Make Changes and Repeat Steps 1 through 4</strong> — It’s not that bad, but it could be better. The model uses some of that Calculus magic (tools like <a href="https://en.wikipedia.org/wiki/Backpropagation">backprop</a>) to make modifications to the vector in the right direction. That is, modify it so that when we go through the transformations in steps 2 and 3 the end result is closer to our goal, which is 1. Example:<br>a. Step one — Instead of [1, 3], make it something like [2, 3] because Calculus says so<br>b. Step two — multiply, subtract, divide to end up with <strong>[0.5, 0.8]<br></strong>c. Step three — take average to get<strong> 0.65<br></strong>d. Step four — What do you know?! 0.65 is even closer to 1 (which is what we want). Representing “Children are a joyful and playful bunch” with the vector [2, 3] is a good representation!</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*C2vRzQPRsQeYbWGpLMSBiQ.png" /></figure><p>Now if we do this for the other three sentences and plot the vectors we would see how positive sentences cluster together, far away from neutral and furthest away from negative. The model has learned 💪 But it isn’t ready to rebel against humans quite yet.</p><p>By the way, do you know what those five steps above are? An <strong>algorithm</strong>. It’s just a series of ordered steps used together to accomplish a goal. Feel free to throw that fancy <em>algorithm </em>word around from now on.</p><p>More importantly, what <strong>you</strong> just learned is the basis for how most of Machine Learning models work. In particular, it’s how ChatGPT learned. It converted human text to vectors, then transformed those vectors and tested how good those vectors were at performing a task. Then made adjustments. Now when you ask something to it, ChatGPT transforms your text and performs some transformations to then predict what the best response would be.</p><p><em>What we have then is a computer that spent hours looking at sentences (it </em><strong><em>Pre-Trained</em></strong><em>) to learn. But ChatGPT can do more than answer things like “is this a positive or negative sentence?”. It learned to generate language because it learned the underlying structure of the data (it is </em><strong><em>Generative</em></strong><em>). The data, in this case, was a big chunk of the internet. Billions of sentences. ChatGPT learned the structure of language </em><strong><em>because that’s what it was tasked to learn</em></strong><em>. That was its </em><strong><em>goal.</em></strong></p><p>How does that look in practice? Now things get interesting…</p><h3>Learning to Speak</h3><p>Some years ago, researchers discovered that computers could become particularly good at two games. The first is called “Guess the next word!”. The second is “Guess the next sentence!”. They don’t call them games though, but <em>tasks </em>instead. Let’s see how you do.</p><h3>Task 1: Guess the MASKED Words</h3><p>Can you guess the hidden words behind [MASK] on each sentence below?</p><ol><li><strong>These enchiladas are too [MASK].</strong></li><li><strong>[MASK] has the largest number of Tour de France titles.</strong></li><li><strong>President Trump is the [MASK] president the U.S. has had in 30 years.</strong></li></ol><p>From the whole vocabulary of English words (well, technically speaking ChatGPT does not guess words but tokens, but think of tokens as words) ChatGPT would then choose the best fitting MASKED word.</p><p>What are these “right” words? They are, of course:</p><ol><li>spicy</li><li>France</li><li>worst</li></ol><p>Or is it:</p><ol><li>expensive</li><li>England</li><li>best</li></ol><p>🤔 Hard to tell… “spicy” and “expensive” are equally likely without more context. France is the right answer in this case, but if ChatGPT never saw a sentence that connected France to the most Tour de France titles it could easily guess it wrong. And whether it is “worst” or “best” on the last sentence is a rather subjective (and controversial) topic.</p><p>During training, ChatGPT would be given sentences like the one above, and have to guess which word was hidden behind [MASK]. Then it would check to see if it got it right. If it didn’t, it was “penalized” and had to go back and make adjustments so that next time it would get it right. Just like the vector modifications we learned above for <em>negative </em>and <em>positive </em>sentences.</p><p>Large Language Models (like ChatGPT) learn probability distributions of language from looking at <em>lots</em> of sentences and actively guessing hidden words. For instance, ChatGPT would “think”: I have seen <em>spicy </em>and <em>enchiladas </em>as part of the same sentence many times before… chances are high that they go together. For the enchiladas sentence however, there are several options that make sense (see image below). What the model (ChatGPT) does is to read a sentence and when it sees MASK it goes through the English vocabulary and scores each word depending on its level of fit. The more likely the model thinks a word to be the hidden word, the higher the score. How did it know to give <em>spicy </em>a better score?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*j1uhchMzZ5Cs6AiquAIJyg.png" /></figure><p>That is the magic question. How does it guess words so well that it seems like a human wrote the damn thing?! The answer is <strong>context</strong> and it’s the topic of the next section (Task 2) and the following one (Transformers)</p><h3>Task 2: Guess the Next Sentence!</h3><p>Many important tasks ChatGPT gets asked to do, such as Question Answering, are based on understanding the relationship between two sentences, which is not directly captured by language modeling (that is, by learning language via guessing the next word).</p><p>Therefore, ChatGPT was not only<em> </em>trained to predict the next word. <strong>It was also trained to predict the next sentence.</strong> It’s a very similar mechanism to the one for masked words.</p><ol><li>I’m not really good with Mexican food. [MASKED SENTENCE].</li></ol><p>The model is tasked with choosing the right sentence from a bunch of choices. If it gets it wrong it’s penalized so that it has to make adjustments to its sentence vectors, just like it has to when it guesses a word wrong. This is how it is able to learn that “These enchiladas are too <strong>spicy</strong>” is a likely sentence after “I’m not really good with Mexican food”. Because from context we know that Mexican food is more well known for being spicy than for being expensive, or big, for instance.</p><p><strong><em>We know what the model goals are (to predict the next word and sentence) and how models learn (by playing the game with millions of sentences and finding probability distributions of words, modifying its vectors when it doesn’t guess things right). It is now time to explain where the magic comes from </em></strong>🪄</p><p>Hiding words and sentences and training language models to predict the hidden parts are techniques we’ve used for several years. But we haven’t had something as powerful as ChatGPT until recently. What then made ChatGPT the magical creature that it is? There’s three main sources of magic:</p><ol><li>Transformers — context machines</li><li>Size — bigger models</li><li>Fine-tuning — learning to understand instructions</li></ol><p>First, let’s talk <strong><em>Transformers</em></strong><em>! </em>The <strong>T </strong>in<strong> </strong>Chat<strong>GPT.</strong></p><h3>Magic 1: Transformers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*OEybuvWBZ92NbGJvrvBgcg.png" /></figure><p>Look at the following sentences</p><ol><li>That <strong>haunted</strong> house, there is no way you can go inside and come out [MASK].</li><li>That <strong>smelly</strong> house, there is no way you can go inside and come out [MASK].</li></ol><p>They are the same, except for one word. That word (haunted vs smelly) changes the meaning of the sentence. So much so that you would probably guess completely different words behind MASK. You, human, know that. But how does ChatGPT know that it is this word in particular that is of importance? How does it know to focus there and not so much in, say, “inside”. After all, “inside” is closer to MASK than haunted/smelly is.</p><p>Similarly, how does a model know that “python” here means two very different things? The first sentence refers to python snakes, the second to the Python programming language.</p><ol><li><strong>Pythons</strong>, are mostly found in the tropics and subtropics.</li><li><strong>Python</strong> tends to be beginner friendly because of how declarative it is.</li></ol><p>We need some history for this one… Back in 2017 (that’s about two pandemics ago) Google Brain published a paper called “<strong>Attention</strong> Is All You Need”. The paper discovered that some specific vector transformations (remember transformations from the “Of Monsters and Men” example) were able to teach the model which parts of a sentence were the most important, so to speak.</p><p>You know how we used vectors to represent a whole sentence? Well, you can represent words as vectors too. Let’s recap: a vector is simply a list of numbers. There isn’t much value in any one of them by themselves, but the relationships between them (similarity, or closeness) <em>that </em>has value. Because if two word vectors are similar (e.g. [0, 9] and [0, 8] are alike, but [1, 5] and [8, 0] not so much) then it means the words are similar. In the image below, the vectors for “apple” and “pear” are close together and away from “sandwich” and “burger” because although they’re all food, fruits are more similar amongst themselves than compared to a sandwich.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*YZnHvpG9Ay_S2gfJyI9NfQ.png" /></figure><p>The details get technical, but in simple terms, what researchers at Google did was to create a data transformation that would take word vectors and find which words commanded the attention of the sentence (aka which words have the greatest influence in the rest of the words in that sentence). They named that process: <strong>Self Attention.</strong></p><p>Why is that useful? I’ll answer that question with a question… <strong>If you read the sentence <em>“The animal didn’t cross the street because it…”</em></strong> What is<em> </em><strong>it</strong> referring to? The animal, or the street? Reading the rest of the sentence helps clarify because “wide” is more likely talking about the street. What Self Attention allows us to do is to mathematically determine what word “it” is most connected to. In this case (image below) we can see that it, correctly, determines a stronger connection to “street”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*atsV-o2hkhSP44T4lOwGUw.png" /></figure><p>Cool, but how does a model determine that? Turns out if you multiply word vectors in a sentence against each other and use the outputs to guess the MASKED words, you end up getting representations of words and sentences that “know” which words are most important. Just like in the negative-vs-positive example above (where the model learned to tweak the vectors so that positive sentences became more similar to other positive sentences) here the model learns how to represent word vectors to find the most important words in each sentence, and use that context to best guess the masked word.</p><p>Let’s illustrate. <strong>The image below shows what happens inside ChatGPT.</strong> To the left of the vertical line is the architecture, and to the right is an example with values. We start from the bottom where it says “Input”. To train ChatGPT they gave it billions of sentences from text found on the internet. Sentences like “this restaurant was not too terrible”. But to force the model to learn, they covered 15% of words. So, in this example, instead of “terrible” we cover it with [MASK] so that the model has to learn how to correctly guess “terrible”.</p><p>The first step is to convert words to vectors. Here we call them <strong>Embeddings,</strong> but they are the same thing: a list of numbers. We can start with random numbers like in the “Of Monsters and Men” example. It is the model’s job to figure out what those embeddings (aka vectors) will be, which are shown in green. We then pass those embeddings to a transformation layer. We will explain this further in a bit, but for know think of it as code that tells the model “multiply word vectors against each other”. The end result are the <strong>Transformed Embeddings</strong> we see in yellow. Our point of interest during training is the masked <strong>T</strong>ransformed <strong>E</strong>mbedding (TEmask). The model takes that embedding and applies some transformations to it, then it compares the end result with a dictionary of embeddings. That dictionary contains a vector for each word in the English vocabulary, so that we can ask “this TEmask embedding, which word vector is it closest to?” As an example, say that the model computes the transformed vector for MASK to be <strong>[2, 4, 0, 5, 1, 8]</strong> (yellow box on the right-hand side). It takes that embedding and compares it to the English vocabulary vectors (blue box). Then it scores how similar the vocabulary words are to that vector. In this case, it finds that the vector for terrible, which is <strong>[2, 4, 4, 5, 1, 8]</strong>, has a “similarity” score of <strong>0.64</strong>. The model outputs the content in red which is a list of words and their “similarity” score. The higher the score, the more likely that word is to be the word behind MASK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*24ma8Ba1oVqq4RXYk2JmMA.png" /><figcaption><strong><em>Note</em></strong><em>: This diagram simplifies computations considerably, but the overall idea is that.</em></figcaption></figure><p>The model has just said “hey, this masked word here, I think it’s <em>terrible”. </em>The model then has the ability to then see what is hidden behind MASK. In this case it confirms that it correctly guessed “terrible”. Well done ChatGPT 👏! But what happens if instead it had scored “loud” higher than “terrible”, for instance? If the model gets it wrong it has to go back (using the Calculus thing we discussed in the “Of Monsters and Men” example) and change the transformations (remember, these are just operations like addition, multiplication, etc) so that next time the results are closer to the right word. The model iterates through this process for a while until it gets good enough at guessing.</p><p>One last thing, the model is trained to guess words bidirectionally. What’s that? It means moving forward and backward. In the sentence “The baby will be [MASK] the following week.” if we move forward it will use the context provided by “The baby will be” to guess the masked word. If we move backward, it will use the context from “the following week.” to guess the masked word. By using both we’re making the model more robust because, as you know, what comes after the masked word is as helpful as what comes before.</p><ul><li><strong>Forward:</strong> The → baby → will → be → [MASK] → the → following → week → .</li><li><strong>Backward: </strong>. → week → following → the → [MASK] → be → will → baby → The</li></ul><p>The image below shows how we do this everyone-against-everyone multiplication of word vectors to get the attention-aware vectors. The model basically multiplies every word vector in “this restaurant was not too terrible” against each other. In order to get the attention-aware vector for “terrible” (y-terrible) it multiplies the “terrible” word vector with “this”, “restaurant”, “was”, and so on. The image below shows highlights when the “terrible” word vector is being multiplied by the “not” word vector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*8Y8Rm5QMuSXMMrrWT58uhQ.png" /></figure><p>The model then combines all the green vectors (similarly to how we converted 2D vectors to 1D by taking their average). One way to do that, for instance, could be to just sum their values:</p><ol><li>Vector 1 = [1, 2, 3]</li><li>Vector 2 = [9, 3, 5]</li><li>Vector 3 = [0, 8, 8]</li><li>Combination of all three vectors = V1 + V2 + V3 = [1, 2, 3] + [9, 3, 5] + [0, 8, 8] = <strong>[10, 13, 16]</strong></li></ol><p>That’s it. That’s our <strong>sentence vector. </strong>Like the [2, 3] vector we used to represent “Children are a joyful and playful bunch”, in this case [10, 13, 16] represents the sentence “this restaurant was not too terrible”. The powerful things here is that the mechanism used to obtain this vector basically measures which word has the highest impact in the sentence. In other words, by forcing the word vectors to look at itself and each other (that’s <strong>self-attention</strong>), you get a final consolidated vector that “knows” what the important words are.</p><p>To drive that point home, let’s say we use embeddings that are the same size as the sentence, so that each word corresponds to a value (a number) in the embedding, like in the image below. Using transformers with self-attention (green arrows) we would get a vector that captures what the most important parts of the sentence are. In this case, it would give higher values to “restaurant” and “terrible” (7 and 9, respectively), while giving lower values to “this” and “was” (1 and 2, respectively). Without self-attention (red arrows) we would get vectors that don’t really know which words are important and which aren’t.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*Hdnd9TZQAPUSZUz6IN-D0A.png" /></figure><p>Alright, enough Transformers talk. The key insight here is that training the model with a middle step that allows the sentence to “look” at itself allows it to learn what words contain more value, and therefore to learn context so that the model can intelligently predict what word to add next depending on whether it saw the word “haunted” or “smelly”, for example.</p><p>Now that we know how the model learns context, it’s time to learn more magic. Why is it that humans are smarter than birds? Without getting too technical, the answer is mostly: size. Not physical size, but brain-power size. So let’s learn about machine “brain” power.</p><h3>Magic 2: Size</h3><p>Bigger models are “smarter” (usually). ChatGPT is only the latest of similar models, and this is how they’ve grown over the years:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SjL1BOxBD9mvkuC4t9duJA.png" /></figure><p>But what does <em>bigger </em>mean? What are these parameters you’re talking about, <em>sir</em>?</p><p>We’ve talked about transformations, but they probably seem like black boxes to you. Fair enough, let’s demystify. Look at the purple boxes in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*fswc40LF4_TOE3xkHBcFtA.png" /></figure><p>Inside those boxes we find a series of operations (aka transformations). If you’ve heard the term <strong>Neural Networks, </strong>well that’s what’s inside. <strong><em>Note</em></strong><em>: They are not exactly like what I will show below, and ChatGPT uses a system of Encoder-Decoders as the wrapper for those networks, but the concepts are all the same</em>.</p><p>All you need to know is that a neural network is a series of operations (multiplications, additions, etc). Here there are three layers of nodes (blue circles, also called neurons because researchers based this design from how brains work — a network of neurons). Each circle in a layer is connected to all circles in the following layer. It’s everyone against everyone here. Free-for-all. Choose-your-battle. It’s a party and everyone’s invited. In the image below we start with a sentence “penguins are some elegant birds”. We convert its words into vector form as shown (it can be at random, so we get penguin = [1, 4, 0 ,9]), then we pass them through the neural network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*Btz9J943Xa_poaaXjTdElg.png" /></figure><p>The image below shows what “passing through the network” means. I removed all connections to only show those from the top node at each layer for explanation purposes. I also colored them to help explain. Let’s start with the “penguin” vector: [1, 4, 0, 9]. That will be the value of the orange node. We take that vector and multiply it by the numbers (weights) shown next to the lines coming from the orange node connections. Here’s how the penguin vector gets transformed:</p><ul><li>Orange node = [1, 4, 0 9]</li><li>Purple node = <em>orange node</em> x <em>purple weight </em>= <strong>[1, 4, 0, 9]</strong> x <strong>0.4</strong> = [0.4, 1.6, 0, 3.6]</li><li>Green node = <em>purple node </em>x <em>green weight</em> = <strong>[0.4, 1.6, 0, 3.6]</strong> x <strong>5</strong> = [2, 8, 0, 18]</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*J4cOPLXYC6F1fgVsS5hr5Q.png" /></figure><p>At the end the network spits out a vector that results from combining values in its last layer (the green circle and its buddies underneath it). Don’t worry about the actual math. The important thing here is that data passes through the network and is being transformed (in this case via a multiplication) by the weights. Those weights, <em>those </em>are the <strong>parameters</strong>. So when we say that ChatGPT is more magical than its predecessors because it’s bigger, that’s what we mean: it has more parameters, meaning, there are more values by which we multiply the data as it passes through. The more parameters (neurons) in a network, the more knowledge it can store. That’s why we humans are smarter than them birds.</p><p>We can add operations (a.k.a. make the model bigger) via three main ways:</p><ol><li>by making the networks deeper (grow it horizontally)</li><li>by making it wider (grow it vertically)</li><li>by adding more of those purple boxes in the first table in this section</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*8xcrZLE1jzN0usn6HS4OnA.png" /><figcaption>Source: <a href="http://trendytechz.com/deep-neural-network-plays-major-role-finding-obstacles-near/">http://trendytechz.com/deep-neural-network-plays-major-role-finding-obstacles-near/</a></figcaption></figure><p><strong>Conclusion</strong>: want to make your Language Models smarter, make them bigger (that’s why they’re now called <strong>Large Language Models, </strong>because we’ve made them <em>huge</em>).</p><p><em>There is one caveat to this whole “bigger is better” paradigm. Recent research has shown that you can achieve the same level of performance (aka magic) by increasing not the model size, but the amount of data it is trained on. For instance, ChatGPT was trained with ~10 billion sentences, this research suggest that OpenAI (who created ChatGPT) could improve the model by keeping it the same size (same number of parameters) and training it using, say, 100 billion sentences instead.</em></p><p>In any case, GPT-4 is in the works and word on the AI street is that it will be made up of 100 trillion parameters. Not sure if they will also increase the amount of training data, but they should.</p><p>Moving on to the final technical section of this writeup that started as an outline and now is pretending to be a book…. Magic #3: Fine-Tuning.</p><h3>Magic 3: Fine-Tuning</h3><p>ChatGPT was trained on so much internet text, it saw so many things, that it now has PTSD. Just kidding, it saw so many things that you can ask it pretty much anything and it will at least respond (maybe inaccurately, but respond). It saw:</p><ol><li>Poems</li><li>Math problems</li><li>Code</li><li>Books</li><li>Conversations</li><li>Technical papers</li><li>Jokes</li></ol><p>And so much more.</p><p>That’s great because it knows so much. But it creates a problem: when you ask ChatGPT to tell you a joke, how does it know to not respond on the form of a poem, or to not give you code? What you’re asking is a subset of the what the model can do, how does it know how to respond? After all, ChatGPT only learned to predict the next word and to connect sentences coherently.</p><p>The answer, surprise surprise, is <strong><em>Fine-Tuning! </em></strong>Yayy! 🥳 Now, what the hell is that?!</p><p>When a kid is learning how to speak, it’s not enough that it knows how to put together sentences in a coherent way. If your 6-year-old started cussing like a sailor you will probably intervene and say “we don’t talk like that”. And via this social context over the years we learn to talk and behave differently when in a classroom, when at a bar, when at a funeral, or when talking to our best friend. That is fine-tuning.</p><p>Here, ChatGPT is the 6-year-old, and the researchers who built it are like the teachers, friends, or anyone who would say “hey don’t talk like that!” or even “hey that was funny. More of that!”. It’s the good old conditioning game of reward and punishment. For ChatGPT, two things were done:</p><ol><li>Supervised Fine-Tuning</li><li>Reinforcement Training from Human Feedback</li></ol><h3>Supervised Fine-Tuning</h3><p>The intent of ChatGPT is to be, well, a <strong>chat</strong>bot. Remember goals? If we want a model to be good at something, we need to train it to do that, then say “bad robot” when it doesn’t do it right. That’s the <strong><em>supervised</em></strong><em> </em>part: a human telling it “you did it right/wrong” (like adult <em>supervision</em>). The first step to fine-tune the model was to teach it to be a chatbot. How?</p><p>First, two humans had a conversation, one of them pretending to be just a regular human, and the other pretending to be the ideal chatbot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*R2fsy1ub73ZmpWJyYxA-XA.png" /><figcaption>Source: <a href="https://www.youtube.com/watch?v=VPRSBzXzavo&amp;t=72s">https://www.youtube.com/watch?v=VPRSBzXzavo&amp;t=72s</a> (this is a terrific video btw, worth a watch)</figcaption></figure><p>Remember when we introduced vectors and wanted to classify sentences as positive, neutral or negative; and we required some human labeling to check whether the model got it right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*PvKGUcTlVeSp0m38m7piUw.png" /></figure><p>This is the same principle. We feed these conversations to the model and ask it to predict the next response. We know what that next response is, of course, so once the model predicts something, it can take a peek at the actual response and use that Calculus magic to go back and modify its parameters (that is, the series of operations it uses to multiply and add sentence vectors) so that next time it gets it right (or closer to right). It’s the same principles we’ve covered before, the only thing that changes is what data goes through the transformations. In this case the data is vectors representing the history of conversation, and the label (analogous to the positive, neutral, negative we saw before) is a vector representing the next response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*hOOMtV86iQWfn3wi7G-Qxw.png" /></figure><p>Fantastic, the model can now spit out language <em>and </em>behave like a smart chatbot. But a problem was found 😨. You see, the model learned by reading reasonably coherent conversations between two humans. But say you have a trained model and you start having the following conversation with it:</p><ul><li><strong>Human:</strong> “Hey model, why does the government ask me to file taxes if it already knows how much I owe?”</li><li><strong>Bot: </strong>“Hi human, it does it for the lols”</li><li><strong>Human: </strong>“That sucks. Hey can you help me with my taxes?”</li><li><strong>Bot:</strong> “Orange is the new black”.</li></ul><p>The first bot answer is kind of strange but reasonable. The second one though, it’s completely off (or maybe it’s making a dark joke about you going to jail). Since the way ChatGPT works is that it reviews the whole history of a conversation (again, it’s a terrific context machine!) to answer intelligently, if at one point it makes a mistake (because it’s imperfect) then it’s probable that each subsequent answer will be increasingly off because each time it’s using those previous wrong answers 😟</p><p>We don’t want that, nah ah! So we bring some fancy Machine Learning technique. Meet: <strong>Reinforcement Training </strong>(I swear we’re almost done)<strong>.</strong></p><h3>Reinforcement Training from Human Feedback</h3><p>Have you seen videos of those robots that make you think “ok maybe I do need to be nicer to my toaster”? The way they train those robots is through <strong>Reinforcement Learning</strong>. In simple terms, it consists of coding a reward-punishment system so that the robot seeks rewards and in doing so, learns. For instance, if the robot falls, it learns to avoid stepping in that particular way, or learns to balance itself better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*BCYdXGmeMMDsASmYTef4Bg.png" /><figcaption>Source: <a href="https://www.bostondynamics.com/">https://www.bostondynamics.com/</a></figcaption></figure><p>The same principle was used as the last step in building ChatGPT. It consists of two main steps:</p><ol><li><strong>Collect comparison data and train a reward model</strong> — Researchers would have a conversation with the model, giving it prompts like “Explain the moon landing to a 6-year-old”. Then for any given response, they would sample alternative responses. Frankly, I’m a little unclear as to how they got these alternative responses, and it’s not too important, but my intuition is that they asked the model the same prompt several times (these models are <strong>stochastic</strong>, meaning, there is some randomness to them so if you give ChatGPT the same prompt back to back, it will give you different responses). So, for each prompt they have 4 possible answers (A, B, C, D). A human then ranks these based on their preference (D &gt; C &gt; A = B). Then they used these rankings to create a reward model. Just like the dog-looking robot above was told “falling is bad, avoid falling”, here they make a reward model that says “answer D for this type of prompt is better than answer C”.</li><li><strong>Optimize a policy against the reward model </strong>— the model must then internally learn a <strong>policy system</strong> (PPO in the image below) that tries to approximate that <strong>reward model</strong> (RM, which we developed in step 1) as much as possible. For instance, the reward policy might be that when asked to explain things for a 6-year-old it should use some light humor. Strange policy, but let’s run with it for a second. The model doesn’t know that policy. It needs to learn it, instead of us just giving it away. Because that process of learning, that is the magic. Just like you as an adult know that playing with fire burns, but then you see dumb kid Jimmy about to burn its little finger and you say <em>nothing </em>and think “let dumb Jimmy learn the lesson”. And sure enough he burns his finger <em>but</em> learns not to do it again 🔥 (follow me on Twitter for more parenting advice). Well, same thing, we can’t just take the RM and give it to the model. Instead, we let it learn by giving it prompts, asking it to choose the right answer, then allowing the model (kid) to ask the RM (life) “hey, did I get it right?”. If it did, reward. If it didn’t, get burned. Tough love, but it works.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*JRU25KZVrNvk0pfHb189uQ.png" /><figcaption>Source: <a href="https://arxiv.org/pdf/2203.02155.pdf">https://arxiv.org/pdf/2203.02155.pdf</a></figcaption></figure><p>Let’s review:</p><ol><li>They trained a computer to understand and <strong>generate</strong> language by asking it to guess what the next word would be</li><li>They made it a <strong>context</strong>-understanding machine by pushing it to learn what words on a sentence are the most important.</li><li>Because we don’t want the model to say things like “Last night I was wondering about windows and doors. Why did Rose not let Jack on that door?” where each sentence on its own makes sense but they have nothing to do with each other, they asked the model to guess the next sentence so it learns to connect them.</li><li>To make it smarter, they built a pretty <strong>large </strong>model and fed it a large amount of data.</li><li>We don’t just want a model that can talk English nicely. We want it to understand and respond to instructions. So researchers <strong>fine-tuned</strong> it by rewarding it when it responded what a human deemed to be a good response.</li></ol><p>And just like that, after years of research, tens of brilliant people working hard, months of development, $100+ million USD spent in training, and a dash of fairy dust, we have this breakthrough model that we can ask it things like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*YSunx3oGutQjsuqfg_QBLg.png" /></figure><p>And be dissatisfied with both answers 😒. Which brings up a timely point… how do increase your chances of getting a good response from these models?</p><h3>ChatGPT In Practice</h3><p>These Language Models, well, they can’t do everything for us. The quality of the response is directly related to the quality of the prompt/question provided. Here is a great link to prompt the model to get it in the right “mood” to answer your questions as it can.</p><p>Curious as to where this AI magic is going? Let’s walk to the next section to hear my subjective thoughts on the matter…</p><h3>Last Thoughts: The Future</h3><p>How unique is ChatGPT? Will it deem Google useless? Can I train a ChatGPT-like model myself? Is it factual? Is it biased? How long until machines take over?</p><p>ChatGPT is somewhat unique, but not <em>that </em>much. It’s the first publicly available model of its kind, but its underlying technology (what we went over in this long article) is well known. And it’s the result of years of research and development not only from OpenAI (who created ChatGPT) but from many other labs that have pushed the frontiers of Language Models in the last two decades.</p><p>Google, Meta, DeepMind, Microsoft, IBM, and others are all working on similar models. They have been for quite a while. For instance, Google Brain (a research lab at Google) came up with Transformers in their current form, which allowed them to build the next generation of models (BERT) four years ago.</p><p>There’s speculation in the air about what this means to the search engine giant. My inclination is to think that Google isn’t really falling behind, they’re just being quieter. They built Sparrow with 500+ billion parameters. DeepMind (owned by Alphabet, which is Google’s parent company) built Chinchilla which is smaller but performs at a similar level to GPT-3 (which is the basis for ChatGPT). Meta’s Atlas is a smaller model but is able to retrieve documents in real time to find factual answers (something that ChatGPT has been openly critiqued for lacking). And there are several others.</p><p>I don’t believe that the future of language models belongs to any one of them. I believe that several 4–5 companies with big research departments and deep (I mean deep) pockets will be at the forefront of this movement which I dare to say may be as revolutionary for the internet as Google was ni 1999.</p><p>Because of how costly training these models is, it’s unlikely that individuals or smaller organizations will develop their own, at least not at a level to compete with the mega models. But, these smaller organizations and individuals will find the uses for the mega models. They (we) will probably also be able to take the mega models and further train them at more specific tasks, if those models are made public (like BERT). Imagine taking ChatGPT and making it exceedingly good at working with legal documents. That will be super boring, but also super useful to lawyers.</p><p>A big portion of work in the coming years will be spent in making these models more factual and less biased. Currently they are trained with internet data, which comes with errors and biases. We are already seeing efforts to both clean the input data better, and to fine-tune models further to reduce the biases and errors they’ve shown to have.</p><p>So, is it a matter of months or years until these models become sentient? I belong to the camp that thinks that won’t happen, maybe ever. At least not from using the current methods we’re using now. As you saw, the technology is not intelligence per se. It’s a machine that very accurately predicts what the next word will be, limited to some parameters provided by the humans training it.</p><p>Whatever the future of Language Models hold, it is star bright and something to be excited about. It might just turn upside down the way in which we interact with the internet and written information as a whole.</p><h3>Demonstrate-Search-Predict</h3><p>A framework for composing searches using language models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*QslZHeOal9sPiqPJLlkKhA.png" /></figure><h4>Thank you for reading! I hope this was helpful. Please let me know if you have any questions or anything isn’t clear so I can clarify and also improve this document.</h4><h3>RESOURCES</h3><h3>Technical Papers</h3><p>The following papers explain how ChatGPT came into existence. It’s a list of (arguably) the most seminal research that allowed ChatGPT (and similar models) to be built. They are in chronological order, and it’s best to study them in such order.</p><ul><li><strong>Transformers </strong>— <em>Attention is all you Need</em> <em>(2017)<br>- </em><a href="https://arxiv.org/pdf/1706.03762v5.pdf">https://arxiv.org/pdf/1706.03762v5.pdf</a><br>- Breakthrough: Revolutionary method to contextualize meaning via transformer layers</li><li><strong>Large Language Models Training</strong> — <em>Policy Optimization (2017)<br>- </em><a href="https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf">https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf</a></li><li><strong>GPT</strong> — <em>Improving Language Understanding by Generative Pre-Training</em> <em>(2018)<br>- </em>by OpenAI<br>- <a href="https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf">https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf</a></li><li><strong>BERT</strong> — Pre-training of Deep Bidirectional Transformers for Language Understanding <em>(2018)<br>- </em>by Google Brain<br>- <a href="https://arxiv.org/pdf/1810.04805.pdf">https://arxiv.org/pdf/1810.04805.pdf</a></li><li><strong>GPT-2 </strong>— <em>Language Models are Unsupervised Multitask Learners</em> <em>(2019)<br>- </em><a href="https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf">https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf</a></li><li><strong>GPT-3</strong> — <em>Language Models are Few-Shot Learners) (2020)<br>- </em><a href="https://arxiv.org/pdf/2005.14165.pdf">https://arxiv.org/pdf/2005.14165.pdf</a></li><li><strong>ChatGPT<br>- <em>NOTE: </em></strong><em>OpenAI hasn’t published a ChatGPT paper, but most of the important tweaks from GPT-3 to ChatGPT are captured in the following papers<br>- Learning to summarize from human feedback</em> <em>(2022)</em><a href="https://arxiv.org/pdf/2009.01325.pdf"><em> </em>https://arxiv.org/pdf/2009.01325.pdf</a><br>- <em>Training language models to follow instructions with human feedback</em> <em>(2022)</em><a href="https://arxiv.org/pdf/2203.02155.pdf"><em> </em>https://arxiv.org/pdf/2203.02155.pdf</a></li><li><strong>Chinchilla</strong> — Training Compute-Optimal Large Language Models (2022)<br>- by DeepMind<br>- Lesson: scaling the number of training tokens (the amount of text training data) is as important as scaling model size<br>- <a href="https://arxiv.org/pdf/2203.15556.pdf">https://arxiv.org/pdf/2203.15556.pdf</a></li><li><strong>Demonstrate-Search-Predict </strong>(Stanford 2023)<br>- <a href="https://arxiv.org/pdf/2212.14024.pdf">https://arxiv.org/pdf/2212.14024.pdf</a></li></ul><h3>Semi-Technical Explanations</h3><ul><li><strong>BERT</strong> <strong>Explanations<br>- </strong>What is BERT?: <a href="https://www.youtube.com/watch?v=FWFA4DGuzSc&amp;list=RDCMUCobqgqE4i5Kf7wrxRxhToQA&amp;start_radio=1&amp;rv=FWFA4DGuzSc&amp;t=298">The Transformer neural network architecture EXPLAINED. “Attention is all you need” (NLP)</a><br>- What are Transformers?: <a href="https://jalammar.github.io/illustrated-transformer/">The Illustrated Transformer</a></li><li><strong>ChatGPT Explanations<br>- </strong><a href="https://www.assemblyai.com/blog/how-chatgpt-actually-works/">How ChatGPT actually works</a><br>- <a href="https://www.youtube.com/watch?v=VPRSBzXzavo">How ChatGPT was trained</a></li></ul><h3>Additional Resources</h3><ul><li><strong>Prompting ChatGPT like a pro:<br>- </strong><a href="https://github.com/f/awesome-chatgpt-prompts">GitHub — f/awesome-chatgpt-prompts: This repo includes ChatGPT prompt curation to use ChatGPT better.</a></li></ul><h3>Appendix</h3><h4>Vectors</h4><p>If I say to an alien from a far away galaxy “meet me at [48.85, 2.35]”, it wouldn’t understand. First because it probably doesn’t speak English, but more importantly, because those are Earth coordinates. Do they look familiar? They too are vectors. And by themselves they don’t mean much, but in context they do. Coordinates contain knowledge because we know that there is a place on Earth with coordinates [0, 0]. So when I say [48.85, 2.35] other people understand that I need to move 48 degrees North and 2.35 degrees East. It’s the relationship, or distance, between one coordinates vector and another that is helpful to us. So I’ll be meeting the alien at Paris, France.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*G_5RboTCr1mANlM5lsXdLg.png" /><figcaption>Source: Wikipedia</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=226c87480772" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Dance of the Disagreeing Masses]]></title>
            <link>https://daniel-bejarano.medium.com/the-dance-of-the-disagreeing-masses-f1884bd1fc89?source=rss-348694cf2191------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1884bd1fc89</guid>
            <dc:creator><![CDATA[Daniel Bejarano]]></dc:creator>
            <pubDate>Sun, 14 Feb 2021 03:24:41 GMT</pubDate>
            <atom:updated>2021-02-14T03:24:41.440Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*20uu4w7N2tGHLe3E" /></figure><p>Liberal vs Conservative. Left vs Right. Us vs Them.</p><p>Society puts a lot of effort, it would seem, in splitting itself into groups. More often than not we find ourselves falling into one of two groups. The tendency to form two groups, not three or four, may be for simplicity, or a coincidence. But that’s unlikely. Otherwise we could form one group, that’s simpler. What if this tendency does not depend on the subject of discussion, but is rather inherent to how humans form opinions? If our opinions depend on the process itself, how much of your beliefs came from you versus a reaction to the other side? ​</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/0*vUNWO5KMjpXa20CQ" /></figure><p>I don’t have all the answers to the questions above, but I may have some. Here they are for you to judge and come up with your own. Grab some warm coffee or fresh whiskey and sit comfortably. You’ll be here for 10 minutes.</p><p>For as long as there is reason, there will be confrontation, there will be discourse. I used to think that disagreement was the spoken representation of clashes between people’s internal nuances. You were born and grew up a certain way and I did another way. You believe X and I believe Y. We’ll agree on many things, but also disagree on many others.</p><p>All that is true. What I had failed to notice though, was that disagreeing is an anticipatory act. It’s a mechanism to manage change, and just like our very human nature, disagreement is predictive and it’s social. While differences in opinions come from our past experiences, the spoken or acted representation of our opinions is our attempt to preserve our world view into the future. If the world was to end tomorrow, I think we would all find ourselves not disagreeing much. Let’s explain with an example.</p><p><strong>Liberals, Conservatives and Superman</strong><br>Liberalism and conservatism are two ideologies represented in most modern socio-political-economic structures [throughout this essay I’ll use ‘liberal’ and ‘conservative’ based on the U.S.-based contemporary popular definition, which is not technically correct and represented an entirely different set of people in previous centuries. Here, liberal means progressive and conservative means, well, conservative]. Although their behaviors and beliefs fluctuate from place to place and in time, there are general principles that tend to apply to each. Liberals are progress-oriented. Usually looking for what’s next and with a loose regard for what came before. Conservatives support tradition and a preservation of pre-existing order, thus tend to oppose change, especially when it’s radical.</p><p>Just like there are liberals and conservatives now, there were so 200 years ago. Both groups have evolved. Both are tracking society’s thought progress like a needle in a compass. As humanity moves in time, both liberals and conservatives adapt their beliefs and thoughts accordingly. If the collective of humanity’s thoughts could be squashed into a ball of clay, and you grabbed it with both hands, stretching it until you had one half of the mass in one hand and another half in the other hand, with a bridge of thinner clay in the middle, that would represent human’s collective culture — conservative on the right hand, liberal on the left. But that’s an over simplification. Inside the two masses of clay, there are internal masses that represent more and less radical philosophies of liberalism and conservatism.</p><p>Imagine that 27 year-old Superman lands on earth for the first time. He doesn’t get adopted by any farmer family. Instead he navigates our world by himself. Also, one of his many powers is that when he is flying high up he can discern how humans think based on the clay spectrum we identified previously. He can see a person and immediately identify if he/she is a liberal or conservative. Moreover, this Superman dude grew up in a farm in his native planet (which wasn’t destroyed in this alternative universe) where he would herd Super-sheep. His passion is to be the best Super herding dog there ever was.<br>​<br>To practice his herding skills he begins arranging people spatially based on their location in the liberal-conservative spectrum. Liberals on the left. Conservatives on the right. On the far left there are radical liberals. On the far right there are radical conservatives. And in the middle, people who are undecided or neutral.</p><p>Superman notices something interesting. As time goes by, the circles change in sizes and also move further up, down, left and right. They are not static! He wonders, “What would happen if I help a leader on the far left establish a communist state?” So, he publicly announces his support for Mrs. Communist. The masses on the far left start to grow in size with people joining from all spheres in the spectrum. After all, if Mrs. Communist has Superman’s support then who are you to disagree? Except, not everyone supports this. Superman notices that some of the spheres of people are shifting to the right slightly AND are merging with other nearby groups. Turns out that those who don’t support Mrs. Communist observe the momentum she is gathering and begin to oppose her movement; ever more fervently and ever more organized. These groups agree to temporarily forget trivial differences that marked the boundaries between them and nearby groups. They team up to oppose the newly created left force. People who never thought about communism before are now in disagreement with it because it seeks to create a change to their comfortable lives. Like most people, you too don’t like change, or at least are slightly bothered by uncertainty, so you oppose Mrs. Communist. Your neighbor, however, supports this new movement because, as he puts it, his life isn’t that great and he’s looking for change. [Cough] Russia [cough] Cuba [cough] Venezuela.</p><p>The dance of the masses goes on. Eventually the result is a new arrangement: not too different from the previous one but not the same either. Humanity emerges an evolved civilization with, hopefully, some lessons learned and an improved, more unified philosophical stance. What is this new order (a.k.a. new equilibrium) though?</p><p><strong>Dancing Masses = Individual Psychology + (Social Perception)²</strong><br>To understand the new order, we need to understand how we perceive ourselves as individuals in a social world. We are constantly monitoring where we fall in society. Individually we are looking to position ourselves where we are comfortable. I personally want to be a progressive thinker with balanced but slightly edgy views. Where do I position myself? Well, I survey the landscape first to get a sense of the spectrum (meaning, I look around when I’m with fellow humans). I then make a somewhat informed decision. Aaaand I position myself here! Here will do (think of me standing somewhere in the spectrum of circles shown above). If Superman brought a bunch of new people and dumped them into our social group the spectrum would shift based on their views. I would adapt and find my sweet spot again. You observe this even on daily interactions. If you are an 8 on the scale from 1=calm to 10=energetic and are meeting a friend at a coffee shop who you know is a hyperactive 10, then you will probably lower your intensity a little to counteract her exaggerated high levels of energy. Bring the average to an 8 by lowering yourself to a 6 maybe. After all, you want to enjoy your time without causing a frenetic scene. You are pleased being at an 8 atmosphere. So you do what you can to bring the collective behavior thermostat to your comfort level — forcing your friend down has not worked in the past, so you lower your intensity level instead.</p><p>Similarly, imagine that someone from ancient times was dumped into our current culture and asked to find his place. He would be an outcast. He would stab people for food, throw rocks at prostitutes, shower once a month and would not give a fuck about our political correctness. Eventually he would learn though, for we might be animals, but we are social animals for _____ (chose a God of your liking) sake! He would gauge what’s acceptable and what’s not. Most importantly, he would make some mistakes when testing or jumping over the “what’s acceptable” boundaries, and in doing so he would stretch those boundaries (picture an elastic membrane surrounding our area of acceptable behaviors). Others would observe, and they will learn that a new boundary has been created: maybe you CAN walk without a shirt on the streets after all (assuming he wasn’t punished for that) but you definitely can’t eat your neighbor’s pet (Caveman dude was in fact put in jail for this action). #freecavemandude.</p><p>The same is true as a collective. Being that we are all monitoring our thoughts and behaviors in relation to those of others, collectively humanity is trying to achieve homeostasis. As a whole we perpetually aim to find humanity’s place by figuring out what’s acceptable, making some mistakes and correcting to then find balance based on newly defined boundaries. To illustrate with a real life example, think that at one point women educating themselves was outside of that boundary. Contemporary liberals pushed the elastic membrane (to contemporary conservatives’ dismay) so that it now encompasses women’s right to an education. Today, opposing women to go to college is deemed discriminatory and outside the norm (and rightly so). If tomorrow a trend emerges where people fight for protection of both animals AND plants feelings (there are people currently promoting this), you bet a group will emerge to counteract this trend fearing that in 15 years we won’t be able to eat neither animals NOR plants and we will instead drink water and swallow nutrient pills. In the end, plants’ advocated don’t win, but during the process both groups compromise and agree that animals are out of reach at least, thus making the world vegetarian. At that point what used to be acceptable no longer is. We have moved the needle. The end result is a function of some initial movement to one side, followed by disagreement turned into resistance pulling the other way. Where did we end up? That depends on how persuasive, rich, powerful each side was. In this way, disagreement is the first step that is part of our mechanism to achieve the order we would like to enjoy, based on the dance between the eagerness of some to evolve and the efforts of others to keep things the same.</p><p>Going back to the liberals and conservatives conversation, both are required in a balanced society. To over-simplify it, liberals are the wheels that drive us forward, and conservatives are the breaks that keep us grounded and prevent humanity’s vehicle from flying off a cliff. They are both trying to achieve a greater good, in general, but have different approaches on how to get there, and different ideologies on what “greater good” is.</p><p>Keeping all this in mind, it’s easier to comprehend (not necessarily support though) drastic behaviors from other groups: they are reacting to what they believe are drastic behaviors from my group. I personally identify myself as more in tune with liberal trends. However, I caution both sides to be more moderate in their public discourse and actions (not in your thoughts though, keep those), as they will be met with resistance proportional to the strength of their drive forward. Give me one view you have and I’ll find someone who thinks it’s too radical of a view . Whether that opinion is right or wrong, if your goal is for them to share your view, then their interpretation is what matters. For instance, as understanding as I hope I can be, if the plants-have-feelings movement starts to gain traction, they would turn me into a pseudo-conservative fighting back because their proposed change it’s a big leap from where my views currently stand: plants are food. But if they came up and said we can slowly and progressively reduce the number of plants we eat by doing X, Y and Z, then I might start listening.</p><p><strong>It Takes 2 to Play</strong><br>At last, this all brings us to analyze the tendency to form not three, not four, not one, but two groups. My theory is explained as follows: There is a natural disagreement, because of the reasons we just looked at, and others. There are personal and group interests in having the world be just like we imagine it to be. Moral, monetary, status and many others. But your view can’t be proven necessarily true if there are other views out there, right? If someone is challenging my opinion, then it’s hard to argue that my view is 100% correct. So, to prove mine to be “necessarily true” I have to to prove the other view is wrong. But there are many different views to any given topic. So which view do we attack? Pick one randomly, sometimes it’s the one you disagree with the most, sometimes is the one with the largest support, sometimes is the most controversial one. Pick one. You bring up arguments against it, and whoever supports that view defends it. At that point you realize you might need backup, so you bring someone else into the conversation. The opponent (let’s call him Contrarian) does the same. Now you’re both playing a numbers game. Whoever gets the most people on their side wins. After all, views are a human product, so the more humans voicing support for my view the more real my view is. Hey, look at that woman over there! We disagree with her on this and that, but definitely not as much as we both disagree with Contrarian, so let’s team up. After all, the world I envision is closer to what she envisions than the one Contrarian envisions. What magic ratio do you reach when both sides have the most number of people they can get? 50–50. Meaning, two groups. The tendency to form two groups is therefore the optimal outcome to the dance of the disagreeing masses. Disclaimer: this is a thought experiment more than an actual formal theory.</p><p>Whether consciously or not, we are all trying to protect our views while also protecting the clay of disagreeing masses from over-stretching. As long as keeping it together in some form of harmonic disagreement is better than the chaos of tearing it completely. Who is to say how much of a stretch is too much? Maybe Caveman dude knows.</p><p><strong>TL:DR</strong><br>Our disagreement is not only shaped by our nature and nurture, but by our anticipation of what the future will bring. Individually, we are constantly trying to find views and actions that we are comfortable with and that fall inside social norms. When the norm changes we might support or oppose, but eventually we adapt. Collectively, the new norm is a function of where each individual was, plus how much we moved in which direction. The magnitude and direction of movement is shaped by what is happening at the moment, but from the lens of where that will take us. To support or oppose the direction we focus the most on, we gather people that share our views. Others do the same and eventually we converge to the simplification of 2 groups. These two groups would do each other a favor by understanding that their views appear to be radical from the other side’s perspective, and should moderate their message to achieve a common ground first.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1884bd1fc89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Turning 30]]></title>
            <link>https://daniel-bejarano.medium.com/turning-30-b0cb2e4bfaf2?source=rss-348694cf2191------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0cb2e4bfaf2</guid>
            <dc:creator><![CDATA[Daniel Bejarano]]></dc:creator>
            <pubDate>Sun, 14 Feb 2021 03:23:18 GMT</pubDate>
            <atom:updated>2021-02-14T03:23:18.646Z</atom:updated>
            <content:encoded><![CDATA[<p>A three followed by a zero, and it’s time to think. Time for introspection, or the attempt at least.</p><p>Thirty years is the longest I’ve been doing anything. Right or wrong, consistently doing it. As I give myself a slightly out of breath congratulatory slap on the back, I realize that the years have been many, but the living maybe hasn’t been enough…</p><p>​I got some trophies I value, people I am glad to have met, and some scars. Those scars are what I am proudest of. The trophies were at worst not earned but given, and at best are simply the culmination of repeatedly falling, cutting my knees, and standing back up. They are an outcome, but don’t necessarily tell tales about the struggle or about the worth of it all. Relationships have been part of the motor to stand back up, but I can hardly claim any of them as mine. I was lucky to find, and lucky to keep. Scars though, those are the experiences lived. Evidence that bad in the advent of good tilts the balance positive. Evidence that bad things happen and that living through and past them is life. Physical scars give you good stories to tell. But emotional scars… those give color to your stories; they paint the walls of your perspective. Like most things, they start accumulating when we’re young.</p><p>I miss being a kid. Eating unhealthy amounts of pizza. Not worrying about my unhealthy eating habits while my parents probably did worry but were too tired to put much of a fight. Learning through play. Playing to avoid learning. What I miss the most though, is the genuineness of it all. Don’t like something? You say it. You scream it even. Like something? Again, screams, happy screams. Have a question? You ask, right away, unknowingly insulting someone in the process. Like someone? You play with them.</p><p>Kids know how to live. Because life is too precious and short to put up with some shit and to not enjoy other shit. We know that as kids, but then we become used to living, because we get a new day every morning, and the wonder of it all is lost in its abundance. We prefer to forget that it can end at any point. The alternative is too much of a burden to carry. Denial is comforting. We focus on the routine and miss the unique. For the magic to be real you must believe in it, but we grow up and Santa isn’t real and you can’t fly and you need to study at school and work a 9 to 5 and just like that your daily planner has no space left for magic.</p><p>Possibilities were infinite. Consequences were either unknown or irrelevant. You acted, then (sometimes) you thought. You asked for forgiveness instead of permission. You did not have an agenda, let alone a secret one. You were as transparent as glass and as strong as metal, or so you thought. What people saw is what they got. No room for much planning or plotting.</p><p>Back then, as a kid, dreams were dreamt and pacts were made. That life would be an adventure. That life would be fun. That I would grow up as fearless as I was then. But dreams fade with the alarm clock, and pacts were abandoned to make room for a paycheck. I brought that paycheck to the negotiation table with future-older-me. “Security! Financial security and its allies are the new deal. Forget adventures”, I said. Adult-me had realized that it wasn’t feasible to live life under terms dictated by a 10-year old. We needed to get things in order. That’s what adult-me tells me. But little-kid-me, in its T-Rex pajamas and head full of curly hair and wild ideas, knows better: Adult me rationalized that it wasn’t feasible to dream the big dreams and walk the grand walks. But, what if it is possible? “Not feasible” really meant that most other people were not doing it. Fear is not at the bottom of why most people aren’t doing it, but it is smeared all over the crime scene. Complacency and the abandonment of childhood dreams is life’s ultimate bank robbery, where we are all holding each other hostage, fearful. A robbery stealing life to gain conformity. Don’t be too different. Don’t stir the pot. Don’t, don’t.</p><p>Not for a second would I place all blame on others and remove it from myself though. Oh I will hold myself with eyes wide open against that mirror and cast the grandest of judgements. But it takes two to know one, so let’s start with number two: others.</p><p>Most of life’s injuries are emotional, and social, and only some are physical. It’s unfortunate that our suffering is often an internalization of what others think or do, but it’s true. You look at the stars, contemplate the vast universe and think “that’s fucking dumb”. But those social ties that lift and hurt are worth a penitence. Ask any inmate battling the demons in his mind in solitary confinement. While social ties keep us from falling, they too often keep us from flying. Correction: we let them. Like that story of the baby elephant tied to a stake, who could have pulled it with ease once an adult, but stopped trying when she was little; we too are born brave, capable and curious. We see the blue above and extend our arms to find winds below. Then you accidentally hit Ernest there, standing next to you, with your wing. “My bad, sir” you say as you lower your arms and hide those now ugly wings. We don’t fly not because we’re afraid to fall, but because we’re afraid to take off. What if I hit someone? What if they see me fail? The road to mediocrity is paved with what ifs.</p><p>We’re clever demons though. Yes we are. At least me. I dress up and disguise that fear of failing, of “what will they say”, of “what next?”, in a costume of responsibility. “I will limit enjoyment now so future me can enjoy some”. I tell those lies to myself, then I believe them. I say it’s better to be safe and work for the man to get that retirement he’s been promising me since before I was born. I don’t trust the man, never have, but at least that way I’ll have something and someone to blame if it all fails. Someone who isn’t me, of course. Ah, yes, comfort again. Time passes, as it likes to do, and night after night I turn off the lights, cover myself with those blankets made of excuses and go into a dreamless sleep. I sort of wake up in the middle of the night but quickly force myself back to sleep. Thirty years later, I wake up for good. Now I can retire and do what I dreamed of. And what was it I dreamed of? I can no longer find it. The magic, the mystery, those went with the night. So did the impetus and part of my health.</p><p>This is what I probably did over those 30 years of sleep. I got out of college and found a job. A decent, but not great job. Stayed there until I could not take it anymore, then stayed for a while longer because it was comfortable. Just five more minutes, I said. Then I met someone my family approved of, got married, bought a house because from all the places in the world, I am certain I want to be here in this zip code forever. Then we had 1.5 children and put my bucket list on hold because I can always do that later. I love my kids, so of course I immersed myself completely in their lives. That’s what parents do, right?</p><p>Thirty years later though, I’m ready! But just like I couldn’t find those dreams, I can’t even find myself anymore. A wise man with a long beard sees me confused sitting in my minivan and approaches. He says “Every time you gave up agency, every time you gave up what was yours to control, every time you gave up a dream, you gave more of yourself than was yours to give”. Apparently with the freedom of being an individual comes the responsibility of preserving that entity. That starts with building ourselves up enough, then learning where the line is between giving from ourselves and depleting our self. Because how can I put to good use the infinite possibilities packed inside my head and heart if there’s nothing there? No wonder I was looking for external fulfillment all this time. After thirty years of wasting myself, I damn the old man for not visiting with his lessons earlier and forget to thank him for coming in now. Then I ask the universe “can I get a redo?” and it doesn’t answer. It’s almost like it doesn’t care, so I convince myself that it is laughing at me. What would I do without my insecurities? I now condemn the universe for its indifference and go to bed.</p><p>That life and that ending, I don’t want it. I cannot be 90 years old and look the kid I made pacts with in his eyes, he wearing a Superman costume under his shirt, me wearing a tasteless color-neutral oversized shirt, and say “That’s it kid. We did it, and it was… ok”. We did what? Survive? Lived a sedated life? We know we have one life because of that YOLO thing that went viral (it’s beyond me how people knew before then), and we mistake <em>one</em> to mean <em>the</em> <em>same</em> for everyone. We get one, but if we live it right, one is enough. Forget the “right” part. If we live it, one is enough. Yet we don’t live it anywhere near its fullest potential nor we live it in our terms. At least I haven’t. Part of that is the fear of facing others. Part of it is the fear of facing me. Yet another part is that I was never taught how to live. I knew it as a kid, but then it got buried in layers of senseless papers brought to your desk by life’s bureaucracy. Yes we hear all those things about how to live your life fully in Hallmark cards and bumper stickers and inspirational videos, but then we look around and the message isn’t consistent with the world. Monkey see, monkey do.</p><p>Homo sapiens, turns out, aren’t that sapien after all. If we were, we would actively dedicate our lives to the constant adventure of learning how to live. Instead we sit in the classroom of life watching an old powerpoint hoping to passively absorb some of the material while we get distracted looking at the window and envying those birds who learned how to fly. Want to learn how to fly? Go build yourself some silly wings and throw yourself from the nest you’re comfortably awaiting food from. What? It didn’t work and you fell <em>all</em> the way down and injured yourself? Good. Lesson 1. Now go seek Lesson 2.</p><p>Unfortunately, we see more people living as the average people than those living as outliers. Mathematically, that checks out. Then we feel like we are doing just fine by staying in that average. Hey, at least you avoided the below-average life! No. I would argue that average is below average when it comes to living. Mathematically, that doesn’t check out. But screw math. Who invented it anyways? A mathematician probably, and if that’s not conflict of interests I don’t know what is.</p><p>Either that or math is the means by which god and the universe communicate with us. So do listen to math. But whatever you do, whoever you listen to, live life like the Sinatra guy said he did: “I did it my way”. If you do that, always in the understanding that you aren’t an island in a sea but a node in a network and that you don’t exist if not because someone or something else acknowledges that existence, then be at peace to live life your own damn way. Don’t disappoint that inner kid. Love it or hate it, you’re all he’s got.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0cb2e4bfaf2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do You Really Feel Informed?]]></title>
            <link>https://daniel-bejarano.medium.com/do-you-really-feel-informed-86ed185e5ed0?source=rss-348694cf2191------2</link>
            <guid isPermaLink="false">https://medium.com/p/86ed185e5ed0</guid>
            <category><![CDATA[misinformation]]></category>
            <category><![CDATA[media-literacy]]></category>
            <category><![CDATA[news]]></category>
            <category><![CDATA[trump]]></category>
            <category><![CDATA[capitol-riot]]></category>
            <dc:creator><![CDATA[Daniel Bejarano]]></dc:creator>
            <pubDate>Tue, 19 Jan 2021 18:56:44 GMT</pubDate>
            <atom:updated>2021-08-17T22:13:26.369Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z5DZHNWovZcbDxxmKsmjwQ.jpeg" /><figcaption>image by <a href="https://www.shutterstock.com/g/dewwa">DW2630</a></figcaption></figure><h4>Mapping today’s media sh*#storm</h4><p>If you’re here, reading an article no one forced you to read, on your own time, it’s likely you’re someone who wants to be informed.</p><p>It’s also likely that you read the news.</p><p>But, do you really consider yourself informed? Do you cover enough ground to truly understand what’s going on? Chances are, not really.</p><p>It’s not all your fault though. Let’s let you off the hook with an example. Two weeks ago, a group of patriots entered the Capitol to stop the culmination of a rigged election…. At least that’s what they think they are, and that’s why they, and many others, claim they did it.</p><p>Maybe you disagree, and in this case all evidence points to you being right. <strong>But something is obviously wrong in democratic countries worldwide: we live under different truths, kept alive by differing and conflicting information.</strong></p><p>Our stream of information is a living organism that morphs constantly. As such, it <em>requires</em> our constant vigilance. Ideally, under <em>our</em> own terms<em>. </em>But this is complicated because we’re only shown a portion of reality, and who has time to investigate all the rest? True, but what is also true is that we find comfort in consuming content that aligns with our worldview. So there’s some blame to be shared after all.</p><p>Blaming aside, what we need is to expand our view.</p><p>So we did. Here’s how the news from 300+ different sources in the U.S. looked “from above “ on January 2nd, 2021. Each dot is a news article, and they group themselves by similarity to form pretty clusters of topics. We can see the topics you would expect: <strong>COVID</strong>, <strong>Biden</strong>, <strong>Trump</strong>, and others. It’s somewhat diverse and spread out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZqgiHTKUD8VwjshF.jpeg" /><figcaption>Source: <a href="https://www.mediabrew.io/">MediaBrew</a></figcaption></figure><p>Let’s fast forward to mid-day of January 6th, the day after of U.S. Senate runoff elections and the day president-elect <strong>Biden</strong> was to be confirmed by the <strong>Senate</strong> (see below). There is a big cloud of articles about and related to the elections. Makes sense. Our dear <strong>COVID</strong> is not at the center anymore. Finally! And then there is this little cloud of <strong>reports</strong> about the <strong>Capitol</strong> making its way into the action… O. M. G. what could that be?!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ghbT84hnHIOvi7Kk.jpeg" /></figure><p>An hour later (see below), the clusters related to the elections went full Pangea and left our Capitol cluster alone, far away on the bottom-right, and dense af. At this point, of course, the news about Trump supporters breaking into the <strong>Capitol</strong> started to gain attention. At this point reports became confirmations, and at this point the <strong>police</strong> was getting involved. And what happened next?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7_r_uBSmr4bCk2_-.png" /></figure><p>A poop show. By night, the news became about Trump (what else is new) and the Capitol riots. A new cluster was born and took over the action.</p><p>More interestingly,<strong> there are two main types of coverage about this event</strong>. One type covered the news in the context of <em>why</em> it happened, which are those aqua-colored dots above the purple, orange and red clusters. The other type focused mostly on the events that took place, and formed its own dense aqua cluster away from the rest, right below the “Today’s News” legend at the top of the image. It seems like different sources choose different angles. Who would have thought?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MGsrDlAXL0huDVQq.png" /></figure><p>What do we learn from this besides that a bunch of people broke into the Capitol?</p><ol><li>News are messy and have a life of their own.</li><li>We are leaving a lot on the table in how we consume news if our objective is to truly be informed.</li><li>What we choose to consume perpetuates what we get fed. Are we making our own choosing or just seeing what has been chosen for us?</li></ol><p>If we can see the news from above, along with useful metrics, we can simplify the news, understand what’s going on better and faster, and more intelligently choose what deserves our attention. In a time when every company and their mother track our moves, maybe it’s time we know what they do too.</p><p>For more tools to analyze diverse sets of text data, like the news, check out <a href="http://www.mediabrew.io/"><strong>MediaBrew</strong></a>!</p><p>Oh, and how is the conversation a week after the <strong>Capitol</strong> events? Naturally, different media outlets picked different spins, which we see as sub-clusters within the <strong>Trump/Capitol </strong>cluster. It’s almost like some have an agenda 🤔</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ez3QSvTQ3ugiqCv7.png" /></figure><p>Happy exploring and thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86ed185e5ed0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>