Episode 127: From Algorithms to Agents and What It Means for Data Science

Download MP3

[00:00:00] Dr Genevieve Hayes: Hello, and welcome to Value-Driven Data Science, where data professionals become strategic experts. I'm Dr. Genevieve Hayes, and today I'm joined by Dr. Imran Ahmad. Imran is a data scientist and president of data consultancy Cloudinum. He is also the author of 30 Agents Every AI Engineer Must Build and 50 Algorithms Every Programmer Should Know.
[00:00:29] In this episode, we'll explore the evolution of the data science toolkit from algorithms to agents and what it means for how data scientists solve real business problems and position themselves for what comes next. Imran, welcome to the show.
[00:00:47] Dr Imran Ahmad: Oh, glad to be here.
[00:00:48] Dr Genevieve Hayes: The first course I had to take as part of my computer science master's was a compulsory course on computer algorithms. Regardless of whether you were a data scientist, like myself, specializing in machine learning, or a software engineer specializing in computer systems, everyone had to take it, and for good reason.
[00:01:07] Because algorithms are the building blocks of everything technology professionals do, much like how protein bases are the building blocks for all things biological. The AI era hasn't changed this, but it has brought with it a new set of building blocks in the form of AI agents. These agents represent a fundamental shift in the data science toolkit, taking data scientists from writers of passive code to developers of autonomous systems.
[00:01:37] And Imran, this is a shift that's reflected in your two books. According to Amazon, the latest edition of 50 Algorithms Every Programmer Should Know was published in September 2023, while 30 Agents Every AI Engineer Must Build was published in March of this year, 2026. That's only a two-and-a-half year gap.
[00:02:02] What has fundamentally changed in the two and a half years between the publication dates of your two books?
[00:02:09] Dr Imran Ahmad: Oh, that's an excellent question. So two and a half years it looks not that much on timescale, but for technology it's a lot of time. Lot has changed. So one analogy that I will give is that when you use a car, you can either build a car from the beginning or you can just drive it, so you just sit in the driving seat, you turn it on and off you go. You don't need to look under the hood that how the engine works and whether it's perhaps an EV So those technology you shouldn't know that, you just drive it. So AI In 2026, it's more becoming like this, where it's an end product where the solution is there.
[00:02:52] You need to orchestrate your workflows. So you do not need to look into the algorithmic part of it, especially when LLM, large language model, is the center of universe. So LLM, in most cases, that is provided as a service to you. So it means that you are not supposed to look under the hood and you just need to use it.
[00:03:15] So thi-this is the shift. Two and a half years ago, when I wrote the first book, that was not the case. Each problem that you will solve,
[00:03:23] you were supposed to look at the business problem, then you need to look into whether the data is available or not, then you will understand the data, then you'll prepare the data, then you will choose your uh, algorithm, and then you will test the algorithm, then you will try it again, if the evals doesn't pass, and then you'll deploy the solution, now the whole process is, in many cases, that is the LLM. It is offered as a service to us. In ninety percent of the cases, you're not using a localized solution, you are not creating your own embeddings. You are using off-the-shelf solutions. But it does not decrease the role or complexity of your architecture, so you need to spend time into using that off-the-shelf solution in a way that can solve large scale problems. It means that you need to pay attention to the other modules, into the agentic workflow, into the memory, into different types of provenance layer that you need to provide making sure that it's compliant,
[00:04:19] you are aware of the risks as well. So it means that the emphasis, the methodology, and your cognitive sophistication needs to focus somewhere else. This is what I am saying. And it's a lot of change that has happened in the last two and a half years.
[00:04:35] Dr Genevieve Hayes: So it sounds like the algorithms are still there, but they're embedded within the agents, and the data science profession has just moved up one level of abstraction. Does that sound right?
[00:04:47] Dr Imran Ahmad: This is what I was thinking and you almost spoke my mind. Yeah
[00:04:52] Dr Genevieve Hayes: Was there a specific moment or project where you started to observe this shift from algorithms to agents in your own work?
[00:05:00] Dr Imran Ahmad: Yes. I can give you an example here. So we were building a website that can help people preparing for exams, for certification exam, for example the idea was that can we use machine learning so that we can adjust the difficulty level based on the user's background, and we can also match the contents with the requirements, so recommendation engine or demand and supply matching, that need to happen. Now in that case you can see that you need to do item matching as well as user matching item matching means that similarity between items and the similarity between users, so that based on that, we can recommend the end product to the person who is using the system.
[00:05:44] In two and a half years ago, those times twenty twenty-three, you were supposed to build your recommendation engine. You were supposed to choose the algorithm. You were supposed to process the data that you have. You have to suppose, for example, you will choose cosine distance metrics or some other to find the similarity and dissimilarity between contents.
[00:06:03] You will use again, distance measure to find similarity and dissimilarity between people come up with with all those for your choice, now, if you look into twenty twenty-six, the same project, for example, LLM can do all of that. LLM can give you those numbers, and it means your scope is different now, but at the same time the expectation has increased as well, whatever you would deliver in two thousand twenty-five, Claude can build that, in less than couple of hours, so that is the starting point, now, If you look at systems like this just delivering what we delivered in twenty twenty-three, that is the baseline expectations.
[00:06:41] That's the starting point, one point that I want to make here is that when you use these LLMs-- Now, LLM is very effective, no doubt about it, but there are three ways you can use an large language model to create these solutions, number one, you use these LLMs from a chat. So in that case, LLM can give you suggestion, it can write code, but it is hundred percent dependent on the endpoints that is exposed by the vendor. Now, second way you can use that is that you can give it access to your computer by using something like Coworker and Claude or other things, where it can partially take over your computer.
[00:07:20] It can run some of the systems or processes on your computer. It's a hybrid setting. The third one is you use it within a harness. For example, you use a Claude harness, and you can use Kimi 3 within that. In that case, it can take over your computer. It can take full advantage of all the programs that are installed in your computer.
[00:07:41] It can install if something is needed. It can orchestrate that with something that is on the vendor end, and together it can create something that is very powerful. Coming back to the example I was talking about, that website that we were developing for learning. Now, if you use that harness, everything is push button, so if you run that in automated mode Claude or Kimi 3, they are capable of finishing that in four hours.
[00:08:07] You go for biking, and you come back, and everything will be ready. And I've done that, So that is your baseline. That is your starting point. That is changing the careers these days. That is why soft engineers that are graduating from the USTs, they cannot find the jobs, because whatever is taught in USTs, that is basically all done in that four hours that I talked about.
[00:08:27] It's a push-button solution now. So it means that this whole sort of career is shifting now. The expectation is shifting, and the way we should strategize and navigate through this is different now.
[00:08:40] Dr Genevieve Hayes: What you're saying there is the agents are taking care of most of the algorithmic aspects of data science now,
[00:08:48] Dr Imran Ahmad: Yes
[00:08:49] Dr Genevieve Hayes: and yet universities are still teaching algorithms courses. The university where I got my master's, I checked the webpage for that program just before this recording, and Introduction to Graduate Algorithms is still alive and kicking and is still a requirement for all computer science students.
[00:09:08] And just about every data science student would have to take a course in machine learning algorithms at some point during their program. But these algorithms are becoming relatively less important because the LLMs are taking care of things for people. Is it necessary for data scientists to still understand those algorithms just to have that background knowledge? And even if that is the case, obviously they're relatively less important. What should they be focusing on instead?
[00:09:44] Dr Imran Ahmad: Okay. So I will make two points here, and I will expand on that, but let's mention, I will say it. Number one prompt engineering is dead. I will come back to it. But the second point that is more important, directly relevant to your question, that is about algorithms, and al-algorithm are still very important, and I'll tell you the reason.
[00:10:00] So when you talk about AI, as we know that there are two types of AI: broad and deep. Broad AI is that if your asset can do anything, just like an LLM, it can generate a summary, it can generate data for you, it can test your system, it can brainstorm.
[00:10:18] It's a jack of all, master of none. It works, but for critical use cases. Let's assume that it's a doctor who wants to differentiate be-between benign and malignant tumor.
[00:10:29] So in that case, we need a deep solution. Or let me give you a couple of more example. It's A bank manager wants to approve or reject mortgage application.
[00:10:39] Or it's a real estate agent want to predict that how much will be the price of this house for sale, now, all of these cases that I talked about, we do not want any hallucination.
[00:10:51] We do not want a probabilistic model working here, lLM, doesn't matter how you describe it, it's a probabilistic system, and one way of looking at that is that I'm writing a new book, and I started with a cartoon. In that cartoon, there are three personalities.
[00:11:07] One is a poet, one is a philosopher, and third one is an accountant, aI solution has all these three personas, all these three dimensions, aI solution, poet represents basically the creative dimension of an AI solution, it is probabilistic in nature, poet on their own, they think a lot. They come up with some new creative ideas. Not all of them are achievable, but this is where creativity or new ideas come from. Accountant, what they do is that they cannot create new regulations, new rules, new process. They need to follow whatever is there, but that is important as well.
[00:11:43] Philosopher, the third one, it basically talks to both of them and justifies that. In the case of all these critical use cases, we do not want any probabilistic model. We want something that is reliable, and we need to have that transparency that how it came up with that decision.
[00:12:02] So it means that in another way, I will negate myself what I said in the early part. So- There are two ways of looking at that. For example, a brain surgeon, the center of universe is the solution that can differentiate between a brain that is healthy and the brain that is showing some sign of disease.
[00:12:20] He doesn't care about anything else. He want a solution that can solve only one problem at a time in the best possible way. , If A data scientist is working on that, that person needs to have the access to the algorithm, knows the knobs in the algorithm, knows that when to fine-tune that algorithm, how to e-eval that algorithm,
[00:12:43] if you're using LLM, you have none of those things available. So this is one thing I was talking about. Second thing in universities in the effort to become modern, they have started using LLMs, and they have started with prompt engineering, and I said that prompt engineering is dead.
[00:12:59] It's a big statement. I know that I teach courses on prompt engineering. I've written a five-day course on prompt engineering, and I proudly teach that. But why I say prompt engineering is dead, I had talked about basically an architecture where you have a harness.
[00:13:12] In harness what you do is that harness is the hosting platform where you have agents or you have model running. If you use harness, you just write a plain statement, and agents will take over, and they will get things done. You just need to have context. You need to have three types of memories, and once the harness is properly set up and it's well created, then a simple English sentence as two of us are talking, that is needed. You don't need that structured prompt engineering. In my book I have written that PTCF, it needs to have persona, it need to have a task, it need to have context, it needs to have format. None of that is needed anymore.
[00:13:48] Dr Genevieve Hayes: Okay. I'm gonna pick up from the first part of your answer just then when you were talking about the building models for brain surgeons, for example, and the deterministic versus the stochastic solutions it seems like if you're looking for absolute control over the solution that you're building, then you still want to be working in that algorithmic space.
[00:14:10] Whereas if you're... have a bit more flexibility around the answer and don't need it to be as precise as a brain surgeon or an accountant might, then you have more leeway to allow an LLM to come up with a creative answer to your problem. Is that what you was trying to say?
[00:14:31] Dr Imran Ahmad: This is what I'm trying to say. And there are certain verticals where you need transparency. Healthcare, financial domain, government, and unfortunately, AI is also being used in military, all of these different verticals where you need transparency, justification for a decision, so for example, if someone's mortgage has been refused, that person goes to a court and says that AI refused or the bank refused my mortgage due to my race or religion, so can bank defend that this was not due to race or religion? Your mortgage was refused because you didn't have enough income or you were involved in a fraud, we need that transparency, that lineage with each of the decision. LLM does not give you that, So two things, first of all, yeah, for those critical use cases, you need complete control. We want to make sure that our AI solution can do one job perfectly.
[00:15:25] We don't care about the width; we care about the depth. And when we care about the depth, when we want AI to do only one thing, but do it as perfect as possible, then you use these algorithmic deep solutions. Then you do not want to use wide AI, this is what I'm saying. And the second thing is that when you need transparency, it's mandated by the regulatory framework you are in.
[00:15:48] In that case, again, you need something where you have the ownership of the complete ML life cycle. In LLM, you don't have an ownership. Someone has trained the model for the solution for you. You do not know which data was used, you do not know which model was used, you do not know whe-whether data was biased or not.
[00:16:06] You have no control over that
[00:16:07] Dr Genevieve Hayes: I understand this now. One of the forerunners to LLMs were the cloud APIs that cloud services such as AWS, GCP, Azure provided, and they were very much general machine learning models. So you might have a translation model or a transcription model or something. They are generalized AI APIs,
[00:16:30] and they were great if you wanted to translate something from English to French, but you couldn't just use them for a very specific use case. Whereas if you had to have a very specific use case, like doing something within your specific organization, you had to build your own model.
[00:16:46] It sounds like this is just the equivalent of that, but taken to the LLM age.
[00:16:52] Dr Imran Ahmad: Yeah, that is correct. First of all these days, if you look into these agentic solution, LLM-based solution the biggest surprise that these companies get out of it is that once they deploy it, is the cost. It's such a big surprise that if you look into the news, even the companies like Facebook, Meta, for example and other companies as well, and they don't know how to control it.
[00:17:14] Dr Genevieve Hayes: It's become a running joke
[00:17:16] Dr Imran Ahmad: Yeah. So Here's the thing, I live in Ottawa. In Ottawa, as the joke goes, what is the fastest way of meeting a PhD doctor? And the answer is,
[00:17:26] call a Uber. And so it means that in Ottawa at least, you can hire a PhD doctor for a re-receptionist job. If there's a very simple receptionist job, a PhD doctor may be willing to do that. But do not hire that. You are over-designing the system. The poor doctor will get bored, and he will just mess up things, so sometimes we over-design systems, sometimes we under-design systems, if you use LLM for doing everything, over-designing the system. Many of those deterministic part are done much faster, they are done much cheaper and with much less resources if you use algorithmic solution.
[00:18:04] It's a lazy approach that you use LLM for everything. It's an easy approach and lazy approach. It can do that. But If you want to do one step ahead, if you want to create a solution that is performant and cheaper at the same time, if you want to buy a Ferrari at the cost of Toyota Corolla, not the other way around.
[00:18:22] So what you can do is that you need to spend some time, first of all, looking into different modules, different requirements, and mapping that with its c-cognitive sophistication. There is a mapping with Bloom's taxonomy that you said, "Okay, now only for the higher ones where you need lots of cognitive sophistication, you need a reasoning model or you need a model that is really expensive.
[00:18:46] And for the lower ones, you try to find a case where you use those deep algorithmic solutions. You will spend more time on architecture, but in the long run, your solution will be performant, and it will be much, much accurate, as well as it will be cheaper as well.
[00:19:00] Dr Genevieve Hayes: So basically match the solution to the problem. And this is getting into that whole idea of being a strategic data scientist. It sounds like you need to have that strategic judgment as to what is the best tool for this, and pushing back on your stakeholders if they're trying to insist on an, LLM solution to something
[00:19:21] Dr Imran Ahmad: Yeah. In North America, for senior management AI is gen AI.
[00:19:26] So senior management tend to think that gen AI is a silver bullet that can solve problem. Now it is the duty of a data scientist to educate the senior management because they are not technical people, usually they are not technical peop-people.
[00:19:39] So they need to tell them what are the risks associated with that and what is the cost associated with that as well. So i'll give you an example here. We were doing sentiment analysis on the chats that were basically coming from the customer, and someone was using LLM, , the frontier model for that, and the cost was quite considerable, so I looked into that and I said that, "Why don't you just use this Naive Bayes algorithm?" Naive Bayes is a famous algorithm that can be used. And so they said "Can we use that?"
[00:20:10] I said, "It's a very simple, chat. It's just try to use it." So they used Naive Bayes algorithm, and it was faster, it was cheaper, and the cost was zero because we own the algorithm, right? So the cost from thousands of dollars, it reduced to zero.
[00:20:23] And to my surprise the results were better. The confusion matrix was better, and this is what I'm saying using LLM is a lazy solution, using LLM everywhere is a la-lazy s- It will work. Of course it will work, but that may not be the best choice.
[00:20:39] Dr Genevieve Hayes: If a data scientist wants to position themselves as a strategic expert in the agentic AI era and not just a highly skilled technical implementer what do they need to start doing differently today?
[00:20:51] Dr Imran Ahmad: Oh, work on a problem. That's the thing, So you will learn by solving a problem. There is no other way around that. Doesn't matter how many courses you take, how many books you read, so this is one of the areas where you have to build something, you have to try something.
[00:21:07] So find a problem for yourself and solve it using agentic AI. Create your own special sauce while doing that. Create your own solutions. And while you're doing it, pay attention to something that is reusable. So we use a term that is called performance excellence, and what it means is that we try to create assets that are reusable.
[00:21:30] The low-hanging fruit is that you just hard code everything and move on. Even if you are using prompts, Parametrize everything and create templates and create workflows and once you create that, then display them, bring them to GitHub or somewhere else so that you can showcase that,
[00:21:47] and that's the only way you will, first of all learn yourself and you will be able to communicate to others that what you are capable of doing.
[00:21:56] Start with something and keep building on that.
[00:21:59] Dr Genevieve Hayes: For listeners who wanna get in contact with you, Imran, what can they do?
[00:22:03] Dr Imran Ahmad: Oh, so they can just use my LinkedIn page and from there just message me, connect on the LinkedIn. I'm quite active on LinkedIn, so I think this is the best way of getting in touch with me
[00:22:13] Dr Genevieve Hayes: And that's it for today's episode of Value Driven Data Science but if you want more from Imran, next week you can catch our Value Boost episode where you'll learn what memory actually means in AI agents and why getting it wrong could prove disastrous for those building them. And if you found today's episode useful and think others could benefit, please leave us a rating and review on your favorite podcast platform.
[00:22:40] That way we'll be able to reach more data scientists just like you. Thanks for joining us today, Imran.
[00:22:46] Dr Imran Ahmad: Thank you very much. Thanks, and see you next week
[00:22:49] Dr Genevieve Hayes: And for those in the audience, thanks for listening. I'm Dr. Genevieve Hayes, and this has been Value-Driven Data Science.

Episode 127: From Algorithms to Agents and What It Means for Data Science
Broadcast by