Agentic AI DevOps: Introduction to AI & ML

Recap of the previous session

  • DevOps is shifting from doing the work by hand to building agents that do it, with a human approving the risky steps.
  • The learning path: DevOps foundation, GenAI, AIOps, agentic AI (MCP, harness engineering), a capstone, and MLOps as a bonus.
  • An agent works in a loop: understand the request, pick a tool, run it, report, and ask for approval before write actions.

In this session

  • Why the course starts with AI and ML basics
  • Where machine learning and NLP sit inside AI
  • How a machine learns: pattern, algorithm, prediction
  • Prediction systems vs. recommendation systems
  • Structured vs. unstructured data
  • Training and inference, with the spam-classifier story
  • What an ML model is, and why training is repeated

In one sentence: machine learning finds the pattern in past data, turns it into a math equation, and uses that equation to predict the next answer.

1. Why start with the basics

You could jump straight to LLMs and build agents. But without knowing what happens under the hood, you would not understand how an LLM “thinks” like a human. The basics are the foundation for any AI role, DevOps or not, and they take only two to three sessions.

The course then builds on them in order: embeddings and transformers, LLMs and prompt engineering, generative AI and RAG, AIOps use cases, agentic AI with MCP and harness engineering. MLOps is a separate track and comes at the end.

2. Where machine learning sits in AI

Artificial intelligence (AI) is the broad idea of putting human-like intelligence into machines. It is used in four main areas:

Area What it means Examples
Robotics Autonomous machines that act on their own Self-driving cars, delivery robots, cleaning robots
Computer vision Machines that see, learn and act on what they see Face unlock on a phone, a car detecting lane lines
Machine learning (ML) Machines that learn from data and apply it Stock price prediction, loan approval
Natural language processing (NLP) Machines that work with human language: text or voice Chatbots, email filters

Most IT work deals with data (retail, banking, healthcare, pharma), so ML and NLP are where most of our use cases fall. NLP is where you build chatbots and DevOps assistants that answer questions about infrastructure, logs and root causes. This session focuses on ML first, and NLP comes later.

3. How a machine learns: pattern, algorithm, prediction

ML systems learn from historical data, find the pattern, and use it to predict what comes next. Think of how you would solve this:

2, 4, 6, … what comes next?

  1. Look at the data: 2, 4, 6.
  2. Find the pattern: each number is the previous plus 2.
  3. Turn the pattern into an algorithm, which is just math: next = last + 2.
  4. Apply it: 6 + 2 = 8.

You did not guess. If the pattern is right, the prediction is 100% right. If the pattern is wrong, the prediction is wrong. So the quality of a machine’s prediction depends on how well it finds the pattern. The same steps work for 1, 3, 5, 7 and for go, stop, go, stop (the pattern alternates, so the next word is go).

Milk, bread, butter … what comes next?

Here the pattern is “things related to milk”. Cheese fits, but so do other dairy items, so there is more than one possible answer. The machine gives each possible answer a weight (probability), and picks the one with the highest weight. Cheese is made directly from milk, so it gets a high weight.

4. Prediction vs. recommendation

Prediction Recommendation
Answer One correct answer from a small set Many possible answers, the best few are shown
Example A loan application is approved or rejected At checkout, “buy this product too, 50% off”
Same as Pattern with a single correct result Pattern with weights, highest weight wins

Classic ML is used mainly for these two kinds of systems. LLMs and agents are covered later in the course.

5. Structured vs. unstructured data


Structured data in rows and columns, unstructured data such as images, audio, video and text
  • Structured data is tabular, with rows and columns. A house has features (area, bedrooms, age), and the model predicts the price. A loan application (credit score, amount, term, assets) and a credit card transaction (time, amount, vendor) are the same kind of data.
  • Unstructured data has no fixed rows and columns: images, audio, video, articles and social media comments. For example, a model that is given a picture and decides if it is a car or a bus.

Each type is handled differently:

  • Statistical machine learning mainly handles structured data.
  • Deep learning mainly handles unstructured data. Reading images or text is hard, so deep learning goes “deeper” to find patterns.

6. Training and inference: the spam-classifier story


Training with labelled emails, then inference on new emails

You want to sort emails into spam and not spam. Imagine you hire a new engineer for the job. Where does their knowledge come from?

  1. Training. You give them thousands of emails. Each has the input (the email text, the feature) and the answer (spam or not spam, the label, also called the truth or actual). They study why each email got its label and learn the patterns.
  2. Testing. Before putting them in the real job, you give them a new email and ask: spam or not? It is like an exam. Their answer may be right or wrong.
  3. Inference. Once they are good enough, you use them on real emails. This stage, where the trained engineer predicts on new data, is inference.

In the real system, a machine learning program replaces the engineer. You write a Python program, feed it the training data, and it finds the patterns. The result of training is the ML model.

ML model: the trained machine learning algorithm, with the learned patterns stored in it. At inference you give it new data, and it applies those patterns as a math equation to produce a prediction.

7. Why training is repeated

  • The accuracy depends on data quality (wrong labels teach wrong patterns) and training quality.
  • There is no fixed rule for how much data you need. Start with a sensible baseline, train, test, and if the results are not good enough, retrain with more or better data or a different approach. Every model goes through several rounds.
  • Each round costs compute and money, so use some common sense. One email is not enough data to train on. A few thousand is a reasonable start.
  • A data science team usually prepares the data, checks its quality and recommends how to train. As an ML or AI engineer, you follow their recommendations instead of inventing everything from scratch.

Summary

Key takeaways

  • AI covers robotics, computer vision, ML and NLP. ML and NLP are our focus.
  • ML finds a pattern in past data, turns it into an algorithm, and uses it to predict.
  • Prediction systems give one answer (loan approved or rejected). Recommendation systems rank many answers by weight.
  • Structured data (tables) suits statistical ML. Unstructured data (images, audio, text) suits deep learning.
  • Training learns from data with labels. Inference predicts on new data. The product of training is the ML model.
  • Data quality and training quality decide accuracy, and models are retrained until they are good enough.

Quick revision

Term Meaning
Feature An input that describes the thing (area, credit score, email text)
Label The answer in the training data (price, spam or not spam). Also called truth
Pattern The rule hidden in the data
Algorithm The pattern expressed as math
Training Learning from labelled data
Inference Using the trained model on new data
ML model The trained algorithm with the patterns stored in it

Remember: pattern, algorithm, prediction.

0 Shares:
You May Also Like