Code Like a Girl
How We Put Human Expertise Inside a Machine
Before ChatGPT, AI had experts. Before GPT could explain a research paper. Before AI could write your emails, generate images, or answer almost any question you throw at it.
Let me take you back for a moment.There was another way of building intelligent machines. Give the machine the knowledge of an expert. But here's a question hiding underneath.
How do you actually put human expertise a computer?We now ask AI systems to explain a concept, recommend something, diagnose patterns, summarize information, or help us make decisions. The technology is very different from the rule-based systems of the 1960s and 1970s, but the underlying problem is not entirely new: How should a machine represent knowledge, reason with it, and explain the answer it produces?
So researchers tried something different. They took what experts knew: facts, experience, rules, and ways of reasoning, and turned that knowledge into something a machine could work with. And that idea gave us something called "Expert Systems."
Imagine you have a doctor who has spent decades diagnosing patients. Over those years, the doctor has learned patterns: If this symptom appears ...And this test shows this... Then this condition is present.
An expert system stores knowledge and applies rules to reason through a problem. And that's where the architecture gets interesting:
1. Knowledge AcquisitionResearchers collect knowledge from experts, documents, observation, and other resources. That knowledge is then translated into facts and rules, the system can understand.
In our doctor example, this might mean asking the doctor: Which symptoms matter? Which test results change your diagnosis? What combination of evidence makes you suspect a particular infection?
That knowledge is then translated into facts and rules the system can work with.
2. Knowledge BaseThe Memory; this is where the knowledge lives. Facts, rules, relationships, domain-specific information. If certain symptoms are present and test results match a particular pattern. Then consider a particular condition. It is essentially the system’s stored expertise.
For example:
IF the patient has symptom A
AND test result B is positive
THEN consider condition C.
The knowledge base is essentially the system’s stored expertise.
3. Inference EngineThe Reasoning: having knowledge is not enough. Something still needs to reason with it. This is the part that makes an expert system feel intelligent. It takes information given by the user and compares it against the rules in the knowledge base.
Imagine the doctor enters the patient's symptoms and test results. The inference engine compares that information against the rules stored in the knowledge base and determines which rules apply.
In simple terms, "Facts+Rules= Conclusion"It asks, "Given what I know, which rules apply here ?" and then it works towards a conclusion.
4. Explanation system - Why did you reach that answer?An expert system needs to deal with that same question, the explanation system helps to show how the system arrived at its conclusion. It can trace the rules and facts that were used during the reasoning process. This matters because users shouldn’t always have to blindly trust a machine’s answer. They should be able to understand the reasoning behind it.
If the system concludes that “condition C” is likely, the explanation system can trace the rules that led to that conclusion:
For Example:-Lets say Symptom A + Test B → Rule 17 → Condition C
Instead of simply saying “Condition C,” the system can show something about why it reached that conclusion.
5. User InterfaceWhere humans meet the system, all of that knowledge and reasoning would be useless if humans could not communicate with the system. That’s where the user Interface comes in. The user provides information. The system processes it, and the result comes back. It’s the bridge between human input and machine reasoning.
Some expert systems that made history :- MYCIN — at Stanford University in the 1970s, MYCIN was designed to help diagnose certain bacterial infections and recommend appropriate treatment. It wasn’t a modern machine learning model. Instead, it relied heavily on rules representing medical knowledge. The system could also explain the reasoning behind its recommendations.
- DENDRAL — Developed at Stanford University in the 1960s, DENDRAL was designed to help scientists analyze mass-spectrometry data and determine molecular structures. The machine wasn’t simply "learning everything ", it was working within a specific domain, using specialized knowledge to solve a difficult scientific problem.
- COMPASS — Company Office Management and Personnel Alternative Selection System, or COMPAS, was one of the earliest and most notable examples of an expert system used for industrial troubleshooting. Developed in the 1980s by NYNEX (a major telephone company that later became part of Verizon), COMPASS was specifically designed to analyze error messages and maintenance logs from large telephone switching systems.
When we hear "AI" today, we usually think about: ChatGPT, Neural Networks, Deep learning, Large language models.
From Rules to LearningSo what changed?Expert systems largely followed a knowledge-first approach: humans supplied the knowledge, and the system applied rules to reason over it.
Modern AI often works differently. Machine learning systems can learn patterns from large amounts of data rather than requiring humans to write every rule explicitly. Neural networks and large language models can represent complex patterns that would be extremely difficult to encode as a traditional collection of if–then rules.
The architecture and methods are different. But some of the questions remain surprisingly familiar:
What does the system know?
How does it arrive at an answer?
How do we know when we should trust it?
Can it explain its reasoning or limitations?
Those questions did not begin with ChatGPT. Expert systems forced researchers to confront them decades earlier.
Why Expert Systems Still MatterExpert systems did not become the foundation of today's AI in a simple, straight line. Their limitations helped reveal something important: intelligence is not just about storing knowledge or following rules.
We also need ways to handle uncertainty, changing information, learning, context, and situations that were never explicitly programmed.
Modern AI approaches these problems differently, but the questions raised by expert systems are still with us. When an AI system gives us an answer today, we still want to know:
Where did this answer come from?
What information shaped it?
Can I trust it?
And what happens when the system encounters something it doesn't know?
Understanding expert systems gives us a glimpse into an earlier attempt to answer those questions and helps us understand why AI evolved beyond rules.
The other side of the theory is that the AI we know today didn’t appear out of nowhere. It has a history, and sometimes understanding the older ideas makes the newer ones make a lot more sense.
♦How We Put Human Expertise Inside a Machine was originally published in Code Like A Girl on Medium, where people are continuing the conversation by highlighting and responding to this story.