System Level

Back to AI Hub
System Series // GenAI & LLMs

Generative AI & LLMs:
The New Era of Creation

For decades, AI was primarily a tool for classification. It could tell you if an image was a cat or a dog, or if a transaction was fraudulent. This was Discriminative AI. Today, we have entered the era of Generative AI—systems that do not just classify data, but create entirely new data that mimics the properties of the original training set.

"The shift from Discriminative to Generative AI is the shift from a machine that can 'recognize' a symphony to a machine that can 'compose' one."

1. Large Language Models (LLMs)

A Large Language Model is a type of generative AI trained on massive datasets of text. The "Large" refers to two things: the size of the training data (trillions of tokens) and the number of parameters (billions of weights in the neural network).

The Next-Token Prediction Task

Despite their apparent intelligence, LLMs are fundamentally probability engines. Their sole objective during training is "Next-Token Prediction." Given a sequence of words, the model calculates a probability distribution for what the next token should be.

Example: "The capital of France is..." $\rightarrow$ The model sees that in its training data, the token "Paris" follows this sequence 99% of the time. It doesn't "know" geography; it knows the statistical likelihood of token sequences.

2. The Training Lifecycle: From Raw Data to Assistant

An LLM is not born as a chatbot. It goes through a rigorous, three-stage evolution process to move from a raw text-predictor to a helpful assistant.

Stage Process Goal Result
Pre-training Self-supervised learning on the web Learn language patterns Base Model
SFT Supervised Fine-Tuning (Q&A pairs) Learn to follow instructions Instruct Model
RLHF Reinforcement Learning from Human Feedback Align with human values/safety Chatbot (e.g., GPT-4)

In the final stage, **RLHF**, human trainers rank several AI responses from best to worst. A "Reward Model" is trained on these rankings, and the LLM is then updated to maximize the reward, effectively "polishing" the AI's personality and safety guardrails.

3. The Hallucination Gap: Stochastic Parrots

One of the biggest challenges in GenAI is Hallucination—where the model confidently asserts a fact that is completely false. This happens because the model is optimized for plausibility, not truth.

Stochastic Parrots

Critics, such as Emily Bender, describe LLMs as "Stochastic Parrots." They argue that because the model only understands the probability of tokens, it has no internal "world model." It is simply stitching together pieces of its training data in a way that sounds correct, even if the resulting statement is logically impossible.

This is why **RAG (Retrieval-Augmented Generation)** is so important. RAG forces the AI to look at a trusted document *first* and use that as a source, reducing the reliance on the model's internal (and sometimes flawed) probability weights.

4. The Future: From Chatbots to Agentic AI

The industry is currently moving from "Chatbots" (which just talk) to "Agents" (which can act). An Agentic Workflow is when an LLM is given a goal and the ability to use tools to achieve it.

The Loop of Agency

An agent doesn't just generate a response; it follows a loop:
Plan $\rightarrow$ Act $\rightarrow$ Observe $\rightarrow$ Reflect $\rightarrow$ Repeat.

If you ask an Agentic AI to "Research a company and write a report," it doesn't just guess. It will: 1. Search Google, 2. Read 5 articles, 3. Realize it's missing a financial stat, 4. Search for the 10-K filing, and 5. Finally, synthesize the report. This shift from "Generation" to "Reasoning-and-Action" is the next frontier of AI.

GenAI Discourse