AI and Large Language Models: What They Are and Why They Matter

Prem KothawlePrem Kothawle
8 min read

Introduction — Why Talk About AI Now?

AI is no longer just a buzzword thrown around in tech conferences or sci-fi movies. It’s quietly integrated into our daily lives—whether you're asking your phone for directions, receiving movie recommendations, or using autocorrect. AI is transforming how we work, learn, and create. At the core of this transformation is a special type of AI known as a Large Language Model.

If you’re curious about the excitement surrounding LLMs or how they function, you’re in the right place. Let’s dive in.


What Is Artificial Intelligence (AI)?

Artificial Intelligence, or AI, is a broad field that focuses on building machines that can mimic human intelligence. That includes everything from recognizing speech and images to making decisions and generating text.

AI has come a long way since the 1950s, when it began as a simple dream: making machines that could “think.” Early systems were rule-based—good at chess, terrible at common sense. Then came Machine Learning, where algorithms learned from data. But the real leap happened with Deep Learning, unlocking breakthroughs in image recognition, voice assistants, and language models. Now, with LLMs, AI can write essays, chat like a human, and even help debug your code.

Difference between AI, Machine Learning,Deep Learning and LLMs

TermWhat It IsThink of It As
Artificial Intelligence (AI)The broad goal of making machines act intelligently—mimicking human thinking.The umbrella concept.
Machine Learning (ML)A subset of AI where machines learn patterns from data instead of being explicitly programmed.A tool within AI.
Deep Learning (DL)A specialized subset of ML that handles very complex tasks—like translating languages or recognizing faces.A powerful engine inside ML.
Large Language Models (LLMs)A special kind of deep learning focused on understanding and generating human language. These models (like GPT) can answer questions, write content, and even chat with you.Language experts built using deep learning.

Examples-

  1. Machine Learning: A movie recommendation system that gets better the more you use it.

  2. Deep Learning: An app that recognizes your face to unlock your phone.

  3. LLMs: Writing an email, explaining code, or answering your questions.

If AI is the entire tech world aiming to mimic intelligence,
ML is the brain’s ability to learn,
DL is the part of the brain handling deep, complex thoughts,
and LLMs are the language center—great at talking, writing, and understanding us.


Zooming In: What Is a Large Language Model (LLM)?

An LLM is a type of AI trained to understand and generate human language. It doesn't just memorize facts—it learns patterns in how we talk, write, and express ourselves. So, when you ask it something, it predicts the best possible response based on all it has learned.

🤔 Wait, What Even Is a Model?

In simple terms, a model in AI is like a really smart formula or a set of rules that a computer creates after learning from data.

Think of it like teaching a kid with examples—after seeing lots of data, the model learns rules and uses them to answer questions, recognize things, or generate content. We will understand how models are created in a short while.

🗣️ What Is a Language Model?

A Language Model is a trained to understand and generate human language. It learns how words, sentences, and ideas are structured by reading tons of text—books, websites, articles, you name it. Once trained, it can:

  • Predict the next word in a sentence

  • Answer questions

  • Write stories, code, emails—you get the idea!

🤔 Why "Large" in Large Language Model?

The "Large" in Large Language Model (LLM) refers to two big things:

  1. Massive Amounts of Data
    These models are trained on huge volumes of text—from books, websites, articles, code, and more.

  2. Millions (or Billions!) of Parameters
    Parameters are settings the model keeps adjusting as it learns from data. The more it has, the more complex patterns it can understand. More about it, later!

So there exist Small Language Models also?

Yes, these are compact versions of LLMs, built with fewer parameters and trained on smaller datasets. They’re designed to perform specific or lightweight tasks—like text classification, sentiment detection, or predictive typing—quickly and efficiently. Because of their smaller size, SLMs can run on mobile devices or edge systems without relying on powerful cloud infrastructure.


How Do LLMs Work? (Simple View)

At a high level, Large Language Models (LLMs) work by predicting the next word in a sentence—over and over again. That’s it. They’ve read billions of words during training and learned patterns in how we use language.

Imagine you're playing a game where someone starts a sentence:

“The cat sat on the…”

You instinctively think, “mat!” — and boom, you just did what an LLM does.

LLMs are trained on billions of sentences and learn patterns like this. They don’t know what a cat is, or what a mat feels like — but they’ve seen this phrase so many times during training that they’ve learned: “mat” usually follows.

This process is called next-token prediction. A “token” is usually a chunk of text — it might be a word, part of a word, or even punctuation.

Learning form Lots (and Lots) of Text:

This massive collection of text is called the training data.

Here’s how it works (in simple terms):

  1. The model starts as a blank slate — it knows nothing.

  2. It’s shown a sentence with a missing word, like:
    “The sky is ___.”

  3. It makes a guess (like “blue”), compares it to the actual word, and learns from the mistake if it was wrong.

  4. This happens billions of times, across billions of sentences.

Each time, it tweaks its parameters (tiny internal settings) to get better at guessing. Over time, it becomes an expert at recognizing patterns in language.

🛠️ Training = Repetition + Feedback + Gigantic Amounts of Data

🧱 Tokens, Not Words:

When you type something into an LLM, you're thinking in words — but the model is thinking in tokens.

Tokens → Token IDs

Each token is mapped to a unique number using the model’s vocabulary. These numbers are called token IDs.

Embeddings:

Once tokenization is complete, the next step is to convert those tokens into numerical representations. This process is called embedding.

Embeddings are learned representations of tokens in a continuous vector space. A vector space is a way to represent words (or tokens) using numbers — specifically, using high-dimensional vectors.

Think of it like this:
Imagine a 2D graph where you can plot words. You might place "king" in one spot, "queen" in another, and "man" and "woman" somewhere nearby. But instead of just 2 dimensions, these vectors typically exist in hundreds or even thousands of dimensions. This high-dimensional space allows the model to capture much more complex relationships between words.

Each token is mapped to a high-dimensional vector where the position of the token in this space encodes its meaning and relationships with other tokens. These embeddings are not manually defined; rather, they are learned during training. The model adjusts these embeddings to capture useful linguistic features, such as syntactic relationships (e.g., word order) and semantic meaning (e.g., similarity between words).

For example, similar words like "king" and "queen" will be represented by vectors that are closer in the vector space compared to words like "king" and "apple", which are less related.

The Architecture: Transformers

Transformers are the backbone of modern natural language processing (NLP) models and are designed to handle long-range dependencies and process entire sequences of data simultaneously.

At a high level, the Transformer architecture consists of two main parts: the encoder and the decoder. The encoder reads the input — like a sentence — and tries to understand what it means. It does this by looking at all the words together and figuring out how they relate to each other. The decoder takes what the encoder has understood and turns it into the final output — like a translated sentence or a continuation of a thought.

✅ Embeddings go into the encoder as input.
✅ Embeddings are also used in the decoder for generating output.

So, in between encoding and decoding, the Transformer connects the two by:

  1. Passing knowledge: The encoder gives the decoder a deep understanding of the input sentence — like its meaning and structure.

  2. Helping focus: The decoder doesn’t just guess the next word randomly. It pays close attention to specific parts of what the encoder understood. This is done through something called attention — which helps the decoder know which words in the input are most relevant at each step of output generation.

Think of it like this — the encoder reads a book and writes a very detailed summary. The decoder reads that summary and uses it to tell the story in a different language (or complete a sentence). Between the two, there’s a strong link of shared understanding.

(More on this in upcoming articles)


Why Do LLMs Matter?

Here’s why:

1. Better Human-Computer Interaction: LLMs allow machines to understand and respond to us in natural language—making tech feel more intuitive and human.

2. Boosting Productivity: They help automate writing, summarizing, coding, and brainstorming—saving time and effort across industries.

3. Expanding Access to Knowledge: LLMs break down complex topics, translate languages, and answer questions—making information more accessible.

4. Rapid Prototyping and Innovation: Developers and creators use LLMs to quickly test ideas, build tools, and innovate faster than ever before.

5. Personalized Experiences: They tailor responses based on context, enabling smarter assistants, recommendations, and adaptive learning.


What’s Next?

As we delve deeper into the world of AI and Large Language Models, it's clear that these technologies are not just shaping the future—they're actively transforming our present. In upcoming articles of this series, we will take an in-depth look at how LLMs work and explore each aspect thoroughly.

0
Subscribe to my newsletter

Read articles from Prem Kothawle directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Prem Kothawle
Prem Kothawle