← Back to TechCut
AIMachine LearningLLMTechCut

From Code to Cognition: The Foundations of AI Before the Generative Era

Muze breaks down the real mechanics of AI — why rule-based systems fail, how Neural Networks actually learn, what Transformers changed in 2017, and lessons from real projects.

Now that “Generative AI” and “ChatGPT” are words everyone uses daily, it’s easy to forget that this seemingly magical technology didn’t appear overnight. In TechCut EP.1, Bee - Peeranat Thoonsaengngam from Muze and Moo - Nattavudh Pungcharoenpong go beyond the surface — not just “how does AI work” but “why does AI work this way.”


1. The Origin: When Computers Started Learning on Their Own

From Code to Cognition: a rule-based flowchart on the left transforms into a Neural Network on the right — visualizing the journey from code to cognition

In the early days, making a computer do anything meant writing instructions in “If-Then-Else” form — if you see this, do that. For simple tasks it worked fine. But the real turning point came when we entered the era of Machine Learning (ML).

What is Machine Learning? Instead of specifying every step, we shifted to providing “data” and “desired outcomes” — letting the computer find the patterns itself.

Deep Learning: A step beyond ML, Deep Learning models the structure of the human brain through Neural Networks. This is what allowed AI to classify images or understand speech at near-human levels.

But why wasn’t If-Then-Else enough? The answer is combinatorial explosion — the number of possible situations grows faster than any team can write rules for. Chess has 10¹²⁰ possible positions — more than the number of atoms in the observable universe. Writing if-else statements for all of that is impossible.

Spam filters made this most visible. The moment a rule blocked the word “free,” spammers wrote “fr33” or “f.r.e.e.” Rule-based systems couldn’t keep up — accumulating thousands of conflicting rules that were impossible to maintain.

Machine Learning solved this not by learning the rules we write, but by learning representations from data. Early layers of a Neural Network learn small patterns like word relationships; later layers learn increasingly complex patterns, until the final layers understand concepts.


2. Understanding “Generative” — How It Differs from Earlier AI

Bee and Moo laid out the distinction clearly so anyone could visualise it:

Predictive AI (earlier generation): Focused on “predicting” or “classifying” — look at an image and identify whether it’s a cat, or forecast next month’s sales.

Generative AI (new generation): Creates something new — text, images, even code — by learning from vast amounts of data to predict “what should come next.”

A useful analogy: Predictive AI is a music critic who can tell you whether a song is good or bad. Generative AI is a composer who writes an entirely new song. Both need to learn from many songs — but what they produce is completely different.

Rather than learning which category each input belongs to, Generative AI learns the distribution of all the data — then samples from that distribution to create something that didn’t exist before.


3. Large Language Models (LLMs): The Intelligence Behind the Magic

TechCut Knowledge Layer — LLMs learn from multiple knowledge layers: from raw text to semantic understanding to contextual reasoning

The core of what makes Generative AI like ChatGPT so capable is the LLM — Large Language Model.

  • It takes in nearly all the text data on the internet so that AI can understand “the context of language” and “the relationships between words.”
  • The power of context: LLMs don’t just memorise vocabulary. They understand that when you use the word “bank” in a sentence about “fish,” it means something very different from “bank” in a sentence about money. That’s Semantic Meaning.

What makes this possible is the Transformer + Self-Attention mechanism, introduced in the 2017 paper “Attention is All You Need.” Rather than reading one word at a time like earlier AI, a Transformer “sees” every word in a sentence simultaneously — and learns which words matter for which other words.

When processing the word “it” in “the cat ate the fish because it was hungry,” the Transformer learns to attend to “cat” rather than “fish.” This happens for every word at the same time — enabling far deeper understanding of context.

Then came Scale = Emergent Capabilities — something researchers didn’t fully anticipate: GPT-2 could continue text coherently → GPT-3 began few-shot learning → GPT-4 can explain code errors, draft legal documents, and analyse images. None of this was explicitly programmed. These abilities emerged from scale alone.


4. Why This Matters for Business Today

CH3+ User Journey — technology must be designed around the real user journey, and AI applied where it actually works

At Muze, we believe understanding these foundations isn’t just for engineers — it’s essential knowledge for modern business leaders.

Prompt Engineering: When you understand how AI learns, you can instruct it precisely to get the results you actually need.

Efficiency: Bringing AI into workflows isn’t about replacing people — it’s about Augmented Intelligence: giving humans the ability to handle complex work several times faster.

A concrete example from Muze work: KTC’s search intelligence — a product and promotion search system built with Elasticsearch to understand user intent, not just match keywords. A keyword search for “cash card” won’t surface “personal loan” results — even though they’re essentially the same product. But semantic search understands the relationships between concepts, surfacing what users actually need even when they use different words.

Understanding AI foundations also helps evaluate AI vendors accurately. A team that knows how much data a Transformer needs to perform well will ask the right questions when a vendor says “we have AI” but can’t explain what it was trained on or with how much data.

Teams that understand AI mechanics make better vendor choices, set more accurate expectations, and design solutions that use AI where it actually helps — rather than buying AI and hoping it works on its own.

Conclusion from Muze

Understanding the foundations of AI from the beginning helps us see the big picture and the direction this technology is heading. At Muze, we don’t stop at following trends — we go deep into the core of technology to apply it where it creates the most value for our clients and partners.

Whatever direction technology takes, the key is applying it to solve the right problems — understanding which tasks AI is suited for, what kind of data it needs, and what level of expectation to set.

Read more: How Muze designs real AI workflows in organisations →

Talk to the Muze team →


Insights from TechCut EP.1 — “Before It Became Generative AI — What Did We Call It?”