Latest / Agentic Conversations (formally mlops.community) / MLOps for GenAI Applications // Harcharan Kabbay // #256
Transcript
- 0:00I'm Hassam Kabe, go by Harry, work with worldwide technology
- 0:04as a lead ML engineer. I'm really more like a tea fan,
- 0:10but whenever I take coffee I usually go with the black coffee
- 0:14and like whatever regular brand is there, not not having a
- 0:19particular affinity to anything. What is up ML OPS community?
- 0:23We are back with another episode of the ML OPS Community Podcast
- 0:28and as usual, I'm your host, Dimitri OS.
- 0:32We're going to get right into it with Harry because this is an
- 0:35episode all about reliability. If you are trying to do anything
- 0:40in production, you know how important it is.
- 0:43He breaks down all the ways that things can go a wire and how he
- 0:48goes about stopping them. I will give you a little hint,
- 0:52he talks a lot, a lot, a lot in this conversation about
- 0:56templatizing things and also processes.
- 1:01Let's get right into it. But before we do, I want to
- 1:03share with you one song that I have found.
- 1:07In fact, it's a whole album. But since we do not have time to
- 1:10listen to the whole album, I'm just going to share this
- 1:13beautiful first song off of the album.
- 1:18And if you know anything about me, you know that I adore
- 1:22Gregorian Chance and jazz music. Specifically jazz music with
- 1:28Chet Baker and Bill Evans and a little bit of Stan Getz and Tom
- 1:34Jabeen. But the reason I want to play
- 1:37this song with you is because it merges my 2 loves of Gregorian
- 1:45Chance or this very traditional, almost like cathedral music with
- 1:54the new cool hip jazz. And it has some saxophones in
- 1:59there. The song or the album is
- 2:02officium. The song that we're listening to
- 2:06here is called Perezi Miji Dominil.
- 2:12Anybody that speaks Italian can correct me on that.
- 2:16What a beautiful song. Let's just bring this up a
- 2:19little bit, bring it into focus. So much emotion, so good.
- 2:57Let's get into the conversation we had with Harry.
- 3:01Wishing you all such a beautiful and wonderful day.
- 3:06I just can't help myself listen to this type of music.
- 3:19Dude I got to start with this. What do you have against local
- 3:23LLMS? It's it's not like, you know,
- 3:26hard stance. It's more like the value out of
- 3:29that, like, you know, local LMS, good for experimentation.
- 3:32But The thing is people are more excited about, you know, they
- 3:36can run those things like on Mac, like you can, you can spin
- 3:39it up like this and that I'm thinking about the bigger
- 3:42picture. That is how do you get these
- 3:44things operationalize? How do you get value out of
- 3:46those? Right?
- 3:47And I have experience working on Kubernetes like a more hardcore
- 3:54guy, part of the team who actually took it all the way up
- 3:59to writing our own operators. So I understand how these things
- 4:02work. And when I think from that
- 4:04angle, I feel like, OK, local testing is good up to a point.
- 4:08But even then, I don't want to make it like, you know, that
- 4:11everyone is doing on their own. You have no control and little
- 4:15bit of control or at least the manner how you are accessing
- 4:19makes a difference. If we can deploy it in a way
- 4:23like a like AAPA kind of thing right from the beginning, it
- 4:26makes more sense to me. So it's almost like you're
- 4:31afraid that people are creating bad habits by getting used to
- 4:36these local LLMS, Almost like we did with Jupiter notebooks where
- 4:41you do things. All of a sudden it becomes
- 4:44standard practise to do everything in your Jupiter
- 4:46notebook and then you throw it over the fence and you say OK
- 4:49now figure this out because I got some cool working on my
- 4:53local drive and now it's an OPS problem.
- 4:56Yeah, you said it more accurately.
- 4:59Well, one thing that I, I think you've got a lot of insight into
- 5:03is really operationalizing this from the Cicds perspective.
- 5:09And so let's take the classic 2024 use case of rag.
- 5:15I don't care if it's naive rag, graph rag, advance rag, I'm
- 5:19going to make a rag rap song and put all of these different types
- 5:23of rags into it. But you want to be able to make
- 5:29sure that it is battle tested when you are doing it.
- 5:34And CICD and testing integration tests, all the different kinds
- 5:39of tests that you can have is a great way of doing that.
- 5:42I know you've got some cool things to say about that, so I'd
- 5:46love to hear your perspective. Sure.
- 5:49So already lot of stuff has been talked about lag, I'm not going
- 5:52to go into that. What it is people already
- 5:55understand. But one thing that has changed
- 5:57with the the coming of the other lenses like no, people start
- 6:02thinking like AP is that there's some APA model that you can hit
- 6:05and get the results back, right. So when it comes to RAG or
- 6:09operationalizing RAG, you have to you have to think about like
- 6:13in a microservices way. You have your embeddings or
- 6:18vector stores somewhere stored could be on premises or in the
- 6:22cloud. Then you have the other land.
- 6:26Most of the companies, I think people are using the
- 6:30Lamborghinis out there like TPT 4 or other things.
- 6:33I mean, they're having some latest a lot of claims around
- 6:37that. But how do you run those things
- 6:38on process is still not questionable.
- 6:41But The thing is you most, most of the data scientists are the
- 6:45MLA engineers. They used to call those rules,
- 6:47but now it's more like EA engineers or AP ensemblers say
- 6:50like that orchestration engine, right?
- 6:56So basically now you are making call, you get a query from a
- 6:59user, you make a call, you do search, do retrieval, right, get
- 7:03some results back, send it to LLM after with their
- 7:08augmentation in the prompt and you get the result back, right.
- 7:12You have different hops there. So before we jump on to CACDI,
- 7:17really put some emphasis on resilient architecture like all
- 7:21of these could be single point of failure.
- 7:22So you have to think about how would you not fail on any of
- 7:27these as a single point, right? Like LLMS, or you can have a
- 7:31pool of LLMS and you overcome the 420 nines or the rate limit
- 7:35errors. Same thing for the databases,
- 7:38like if an instance is unavailable, set those in a
- 7:41cluster format, right? And then you start thinking of
- 7:45these like as deployments and then your CICD come into
- 7:49picture. Right now the orchestration
- 7:52engine that we talked about, which is responsible for that
- 7:56blue thing, like you're talking different pieces.
- 8:00How I have seen I've been working upon is more like a
- 8:03Kubernetes setup. And in Kubernetes you have the
- 8:08different concepts like deployments or Statefulset.
- 8:11These are more like stateless apps.
- 8:14So a simple deployment could work, but it's it's multiple
- 8:18replicas in there. But then how do you bind
- 8:22everything like, you know, people are developing that or
- 8:24the ML engineers are doing the development work.
- 8:26How does that get get to the Kubernetes or some CID around
- 8:31that right CACD around that Argo CD is one of the ways you can do
- 8:35that. There are other options as well,
- 8:37but I like it super easy to consume.
- 8:39You can set it up like, you know, keep listening to this
- 8:43GitHub. Whenever you see updates, you
- 8:45can perform a sync on to the other side.
- 8:48So that also provide you the option to rollback if you want
- 8:52to. But if you take one step back,
- 8:55like when you do the core development itself, right, how
- 8:58can you make sure that you are following some kind of standard
- 9:02there? Like you containerize your code,
- 9:06right? So that way you keep track of
- 9:10all your libraries. You have the image version now
- 9:13that image version or creating the image, you'll not be running
- 9:16Docker Compose. If you are operationalizing
- 9:18these things, you'll have some automation like in set up some
- 9:21Jenkins kind of job that you know listens to your GitHub like
- 9:25activities there. And whenever you have a merge,
- 9:28it's going to run or create an image for you.
- 9:30And then you'll see you'll need some images stored like you know
- 9:34where you're keeping your artefacts.
- 9:36We don't keep it in GitHub, right?
- 9:38GitHub is not meant for those things.
- 9:40So the bits and pieces of automations are here and there,
- 9:44but the bigger picture is once you have the Argo CD set up, so
- 9:49container is just the code. Now you have to also think about
- 9:53that you'll not be running it just directly in production.
- 9:56You'll have those dev test environments or maybe stage or
- 9:59pre prod depending upon how the companies are using.
- 10:02But then you'll not be creating separate images either, right?
- 10:06So with image, you'll have two pieces of configuration, one
- 10:10that is non confidential, right? Like your URLs that you're
- 10:14hitting or some parameters that you're tuning, right?
- 10:18But then you have the secrets as well, like APA keys, you'll not
- 10:21be keeping it in the code. So those kind of things in
- 10:26Kubernetes, you have the concept of secrets.
- 10:28You can use secrets, right? But then you can announce it
- 10:31further, like going to think about external secrets stored in
- 10:35Hashi Corp or you know, Azure keyboard.
- 10:38You can set up those operator that keep on syncing those
- 10:42things for you and make sure that you have the latest secret.
- 10:45That way you can implement like more segregation of duties as
- 10:50well. Like you know I have the
- 10:51engineers who are just responsible for rotating the
- 10:55keys. They do that in keyboard.
- 10:57It automatically gets synced in there and applications are
- 11:00consuming those. The other configuration we
- 11:03talked about is like non confidential, like, you know,
- 11:07API endpoints or I want to do tweak a little bit of
- 11:11temperature here and there. I don't want to put it into the
- 11:14code because that way I'll be recreating my images, right?
- 11:17I don't want to do that. So those kind of things you can
- 11:20manage via config maps and Kubernetes.
- 11:23So that way when you have these things super easy, you upgrade
- 11:26your code. Most of the things when you're
- 11:29testing, you may not be touching your images or regenerating the
- 11:32images. You are just changing your
- 11:35config maps, which is all your configurations, how you're
- 11:37tweaking it, right? For example in your retriever
- 11:41you have been say considering like 10 top 10 results.
- 11:45Now someone says OK let us try it with 15 results, right?
- 11:49If you have that saved in your config maps, all you need to do
- 11:52is just update there, sync it up, restart your port, and
- 11:55you're done. And hopefully people are going
- 11:58from 4:50, not ten to 15 because.
- 12:02That's. Going to just kill your output.
- 12:06But I guess every use case is different.
- 12:09No, I think about Kubernetes being such a beast and you're
- 12:17able so it's on one hand it's a beast, but you want that, you
- 12:23want that capability and you want that power.
- 12:26And so from my side, I'm thinking about, OK, how have you
- 12:34been seeing differences from the LLM side and just grabbing these
- 12:40commoditized models and having a different rag architecture
- 12:46versus I'm doing some kind of recommender system.
- 12:51I have the model that I created. Am I baking it into the Docker
- 12:55image? Am I like because you don't need
- 12:58to have that config map necessarily or it's not as
- 13:02important. So there's some, it's almost
- 13:04like there's these, these differences, but at the end of
- 13:08the day, it's not so different. Yep.
- 13:12I mean, even if you go to the primitive MN models, right, Once
- 13:17you start thinking like, no, I want to sell these as like
- 13:21API's, not just, you know, passive and fresh that it is
- 13:25running like a Chrome job. I tried something with the key
- 13:28server key native serving. It used to be called like that,
- 13:31right? It's more like a sort of this
- 13:33kind of thing is super cool. It has as a like a preprocessing
- 13:38then your main thing and then you can do post processing.
- 13:41It's super cool. And you see, similar to key
- 13:44server, there's a racer about there that I'm going to play
- 13:47around a little bit with. But yeah, those kind of models
- 13:51you don't you, you select accurately there.
- 13:54You don't need to bacon into a Docker image.
- 13:57You can create those apps like using some inference APA setup
- 14:02there. That can also reduce some work
- 14:04because you don't want to, you know, create DNS entry for each
- 14:08and every app you deploy. So I think the knowledge of
- 14:12Kubernetes like like you said this, it's a beast like the lot
- 14:16of possibilities to know what you need makes a big difference.
- 14:21You don't want to apply the same rule of pump everywhere, right?
- 14:25You'll be creating a lot of work for yourself.
- 14:28Yeah, that's such a great point. And I find it fascinating how
- 14:37people with different backgrounds or coming into the
- 14:40ML space reach for the tools that they know, and they are
- 14:47trying to figure out how to make this tool that they're very
- 14:50familiar with work with this new paradigm that they're now
- 14:54getting themselves into. So if you talk to a data
- 14:58engineer, it's almost like, yeah, well, Airflow's what I go
- 15:01with, and it's not necessarily the best.
- 15:04It's kind of a pain in the ass sometimes.
- 15:06But then maybe if they're progressive, they'll use some
- 15:11more data engineering new age type of tool, like a mage or a
- 15:16prefect or something like that. But then if you talk to the dev
- 15:20OPS folks, it's like, yeah, Kubernetes all the way.
- 15:24We're using Argo workflows or Argo CD also, or maybe they're
- 15:29saying we'll use a bit of cube flow if they somehow got conned
- 15:36into having to use cube flow, which pour out a little bit of
- 15:42drink for everyone out there that is using cube float and
- 15:47having to suffer through it. But that is, it's always
- 15:51interesting to me on how you approach these different sets of
- 15:56problems by knowing what your background is and having the
- 16:01comfort of saying, I'm really skilled in Kubernetes, so I'm
- 16:06going to make Argo CD work with it.
- 16:08And you also understand inherently what is important
- 16:14and, and for you, it's probably really easy to just reach for
- 16:17some kind of infrastructure as code.
- 16:19I imagine you're going for Terraform right off the bat.
- 16:22And whereas if you tell a data scientist that it's almost like
- 16:26infrastructure as what? Where are we going with this?
- 16:29You're right, you're right. I think everyone has a piece to
- 16:33play and it's a teamwork. It's not no one man
- 16:36responsibility to operationalize.
- 16:38We need that testing happen, but should not be so carried away by
- 16:43running it locally that you think about the biggest, the
- 16:46bigger picture. You, you forget about the bigger
- 16:48picture, right. Should be keeping those things
- 16:50in mind, right? Yeah, yeah.
- 16:53We'll, we'll touch upon that form.
- 16:56So the the other cool part that you were saying and specifically
- 17:00on that to your point, you having the dev OPS background
- 17:08and chops, of course you're going to be looking at something
- 17:13from the bigger picture and saying this is great, but how do
- 17:18we get it into production? How do we make sure that when
- 17:21it's in production, it is checking all of the boxes?
- 17:24Because it's not just like we can have it in production and
- 17:27you can cover the output side of things.
- 17:31You also have to have that security and you have to make
- 17:33sure that you have no vulnerabilities.
- 17:35And you have to. There's so many different pieces
- 17:38that you're seeing from your vantage point that potentially
- 17:43others who don't have this type of background aren't looking at
- 17:48or aren't even thinking about. Yeah.
- 17:50You're right, I I think that that's related to what I was.
- 17:54Oh nice. Thinking about at that point,
- 17:56right. So you mentioned Q flow.
- 18:01I, I had my to operationalize Q flow and you know, having coming
- 18:07from that Kubernetes background, it helped me a lot.
- 18:10But then we have to think about the security and other aspects,
- 18:12right? I, for example, like a tiny
- 18:16little things here and there. You don't want to share the
- 18:20database passwords or other things with everyone, right?
- 18:23Are there ways that you can make it available if someone needs
- 18:26that, right? But then you have to we, you can
- 18:30implement some of those things right from the beginning, like
- 18:33in queue flow when you create the notebook, you can create
- 18:36configs. So like pod defaults.
- 18:40I, I wrote something about that a couple of weeks back.
- 18:46So you can, you can set those up.
- 18:47It basically matching the label of your pod.
- 18:51It can make certain things available to it, right?
- 18:54For example, you say credentials tell you didn't find your own
- 18:58tag. It'll make those credentials
- 19:00available because you defined it that way in the port defaults.
- 19:03It's the power of port defaults to get it done in Kubernetes you
- 19:07have to be thinking about mutating webhook.
- 19:10You'll be setting up your own server.
- 19:12But The thing is, you may not need to overengineer if there
- 19:16are some tools available. I'll rather save my time and use
- 19:20those tools other than, you know, showing off my knowledge
- 19:23there because it also creates a lot of LCM for me.
- 19:26If something something gets updated in future, right?
- 19:30It's unpleasant. I I don't want to take that all
- 19:32work, right? Unnecessary work.
- 19:34I'll be rather spending my time on something newer or cooler.
- 19:38Yeah, yeah, totally. You're you should start trying
- 19:41to give yourself a job exactly. Or give yourself more work.
- 19:46Really the whole idea is, hey, let's automate as much as
- 19:50possible so I don't have as much work where I can have less work.
- 19:55So you mentioned about teleform earlier.
- 19:58If you want we can dive a little bit into that one would love to
- 20:02perfect. That's the topic that is very
- 20:05close to my heart. Even after all the shit went
- 20:08down with Hashicorp and the. For those who don't know, can
- 20:14you school us a little bit? I think what happened was
- 20:16Hashicorp, who is the the lead maintainer or basically the
- 20:23company behind Terraform, they changed the open source licence
- 20:29for Terraform and people who were using it after a certain
- 20:32version had to start paying a licence or an enterprise fee or
- 20:37something along those lines. And it just made the community
- 20:40that was built around Terraform revolt and people were pissed.
- 20:44So pissed that they did a hard fork.
- 20:46Anyways, I digress. Talk to me about terraforms.
- 20:49Yeah, I mean Terraform or, or you know, NC world or any other
- 20:54thing that the the point is that no one in your eyes creating
- 20:59these things manually. Like, you know, when something
- 21:02got released on Azure, like Azure open AI models site,
- 21:06everyone was super excited and you know, jump on to that and
- 21:10start doing that. So one of my friends and mentor
- 21:13from my current org, he told me like, you know, five years back,
- 21:18I, I was learning how to use and see what at that point he
- 21:23mentioned that, you know, while logging into servers, if you
- 21:26don't need to, if you have the configuration in there, right?
- 21:29So when you start thinking about those things, those are very
- 21:32helpful when you are operationalizing, you'll think
- 21:34about all, OK, if I need to go there and create a storage
- 21:39account like, you know, now a new member is onboarded, I
- 21:44assign that work to him. I'll be passing on several
- 21:48things. One, this is the naming
- 21:50convention. This is how you should create a
- 21:52resource group. You know, these are the tags you
- 21:54need to put on and these are the network firewall rules you need
- 21:59to enable, right? Or any additional configuration
- 22:01like you can think about 11:50 points that you need specific
- 22:05about that. And that is an example of one
- 22:07resource. Now think about open AI or any
- 22:11search or you know database instance there.
- 22:14So when all these configurations is multiplied it gets out of
- 22:19control. So that is where like Terraform
- 22:25is super handy. I feel like anything you are
- 22:27doing like provisioning in cloud super useful.
- 22:32You just set it in a correct way and you can have a good version
- 22:37control that way. Everyone is responsible.
- 22:41If like I published a post sometime back about how I
- 22:46created a modular approach like having each of those resources
- 22:49in its own module and then create inventory for each of
- 22:54those resources. For example, resource groups
- 22:57create a CSV so it is going to loop through that and read and
- 23:01you can have the parameters. However you want to apply like
- 23:03set of configures that you want to apply.
- 23:06Now if I need to create those resources like I want to go from
- 23:1010 to 20 resource group now, right, I was on 10 so I can ask
- 23:15anyone to just add those to that CSV create a PR someone gets
- 23:19reviewed. They are not changing the
- 23:20configuration. They are just adding to the
- 23:22inventory file. The configuration is going to
- 23:25loop through that create those for me every everything is
- 23:29defined in set of rules that I want to apply on top of those so
- 23:32breezy. And the other thing I learned
- 23:35over the years is like when you, when you go through GitHub
- 23:38route, you create a PR, you need to educate a little bit.
- 23:41Like, you know, people should not be approving it just for
- 23:44sake of approving. I get it.
- 23:45And I do that like little things make big difference.
- 23:51If you put some like a template for APR, right?
- 23:54It gives you a number of options.
- 23:56Then asking people, OK, just review that, you know, making
- 24:00sure I haven't added anything confidential.
- 24:03Do that. I did my due diligence to test
- 24:05certain things. I think everyone feels
- 24:08responsible and they make sure you know the code that we are
- 24:12pushing. It is reviewed.
- 24:15It's definitely better than how what a like if you assign it to
- 24:19a person would do right? And doing your QA on top of
- 24:22that. Wait, say that again.
- 24:24So basically just giving almost like a check box, check boxes
- 24:29that people can look at and say, did it go through all these
- 24:32things? And not like a reminder list
- 24:36like, you know, you can create your own template.
- 24:38I'm big fan of templatizing. Yeah.
- 24:41I actually listed on something that we should talk a little bit
- 24:44on that You can templatize the different things like in
- 24:47operationalizing or helping the teams out there.
- 24:51I tried to templatize my dating with my wife.
- 24:55I didn't go over that well. I think that's taking it a
- 24:57little too far. Man, you have two separate
- 25:01things. So anyways, yeah, so you
- 25:05templatize the PR in a way that you're getting like, basically
- 25:15you're getting everyone to look at it, not just one person to
- 25:20own it. That, that that's the value of
- 25:23PRS, right? If you and I are collaborating
- 25:25on a project, you developed something, you said, OK, you
- 25:28know, go ahead and make these changes.
- 25:31I do that, I create a PR, but I don't want to create too much
- 25:36work for you. Like there's certain things that
- 25:38I should be double checking on my behalf, right?
- 25:41So that is the PR template. As far As for my so when I
- 25:45create a PR, it's going to prompt me with all those things.
- 25:48Make sure your code is following, you know, the
- 25:51standard camel keys or other things, naming convention,
- 25:55whatever you have, make sure you don't add any confidential
- 25:58information. And they're right, I'm going to
- 26:00do that. Or maybe, you know, make sure
- 26:01that you tested these things locally, then I submit that PR
- 26:05and then you're going to review. When you review this, it's not
- 26:08just, you know, checking that, OK, I, I got a PR, I just
- 26:11clicked that you're going to verify the things that you are
- 26:15supposed to verify. So that way it's not just I
- 26:18don't the code, but it's a shared responsibility when we
- 26:21push those changes to the next level.
- 26:24Yeah, I like the idea of the shared responsibility and
- 26:28getting everyone on board, but I my mind instantly goes to what
- 26:35do you do in a retro or what do you do when shit hits the fan.
- 26:38Everybody probably does the Spider man meme and just points
- 26:41it somebody else. It depends from org to org, The
- 26:47organisation that I'm currently part of a really super cool,
- 26:52very high test score. Yeah.
- 26:55And, you know, there are honest mistakes that happen.
- 26:58So we should not be like no going to the blame game.
- 27:02It's more like, OK, what are the lessons learned out of that?
- 27:06First thing, it's not going to happen overnight, right?
- 27:09You have to shift your like a design patterns from people
- 27:16oriented design to more process oriented that you have things
- 27:21properly documented. Wherever you need to automate,
- 27:24you automate. But it is it should not be like
- 27:26that. I automated my now no one knows
- 27:28because I don't have a read me right.
- 27:31It's all in my mind. So there's a, there's a very
- 27:35thin gap when it comes to a subject metrics part and a
- 27:39blocker because you know, once you start working as a subject
- 27:42metrics part, you cross into a line where you're blocking
- 27:45everyone else now because you created a dependency.
- 27:48So I'm more towards advocating open it up, you know, get the
- 27:54things out there properly documented, have knowledge
- 27:58sharing sessions, involve others, mentor others.
- 28:02One youth, you should be learning you, there should be
- 28:05people in your team or your company that you should be
- 28:07learning from. Then there should be that who
- 28:12are you are mentoring? You should be spreading that
- 28:14knowledge out. And there should be someone who
- 28:17should be double checking your facts, right?
- 28:20Like I have something on LLM. Then I can ask you, OK, what do
- 28:24you think about that? And you say, OK, that doesn't
- 28:26make sense at all, dude. Like we need those things if it
- 28:30is just all mean there is no learning.
- 28:37So this idea of making sure that you don't become the subject
- 28:41matter expert, you're talking principally in the code base.
- 28:47It's not necessarily how we might think about it in the ML
- 28:51world of, oh, you have the subject matter expert that is
- 28:54one of the stakeholders in this use case and you want to get
- 28:58them to label some data or do something tell you about the use
- 29:01case. It's more you saying, if I am
- 29:05the only one that knows how this application runs, I am the
- 29:09subject matter expert on this application and all of the
- 29:13questions are going to have to come through me and that's going
- 29:15to no doubt slow things down. Yeah.
- 29:21Yeah, you are right. So it's not see you need subject
- 29:25metrics parts, but it's more about how you put those things
- 29:28into operations. You should not be blocking other
- 29:31that people don't have any clue how this thing is running,
- 29:33right. I mean, and the way you
- 29:37implement the thing you how do you write code with proper
- 29:40commands or read means that is very necessary.
- 29:42So you need to set up those things more process oriented,
- 29:46not people oriented that that. That was the point I was trying
- 29:48to make. Yeah.
- 29:50Well, it's funny you say that because I've been on this kick
- 29:53recently on how dev OPS specifically, right?
- 29:56It's talks about people, process and technology.
- 30:00And I make the point that a lot of people forget in that group
- 30:08of three, technology comes last. And so, but people tend to put
- 30:14technology first, especially when it comes to ML OPS or the
- 30:19LLM phase craze that's happening.
- 30:23It's very much about, here's the tools that you can use to solve
- 30:27your problems, not necessarily about here are the types of
- 30:34people you need and what your team should look like, what kind
- 30:37of experience they should have. Here's the processes that you
- 30:40should be thinking about. And then last but not least, you
- 30:44can go and dip into the technology section.
- 30:48What you're saying? Yeah, people shouldn't be first.
- 30:51There should be processes first. I think people have a role.
- 30:55I'm not saying that anything with the process you have, you
- 30:59need people, right? But I'm saying is you should not
- 31:01be stuck with, OK, there is someone who knows about it, but
- 31:05we don't know how that thing works.
- 31:07There's no knowledge around that, right?
- 31:09So when you implement why the designs are poor in my opinion
- 31:12is people keep most of the things in their mind and you
- 31:18know, they implement thing or they get the things working, but
- 31:22you have to think about, you know, you don't want to be stuck
- 31:24with that. Like I'll be supporting all the
- 31:26tickets around that thing. I have to open it up so that I
- 31:30can get on to the newer things and let someone you know, learn
- 31:33and help with the the day-to-day task or the support generated by
- 31:38those things. All right, real quick, I want to
- 31:40tell you about our virtual conference that's coming up on
- 31:42September 12th. This time we are going against
- 31:45the grain and we are doing it all about data engineering for
- 31:49ML and AI. You're not going to hear rag
- 31:53talks, but you are going to hear very valuable talks.
- 31:56We've got some incredible guests and speakers lined up.
- 32:02You know how we do it for these virtual conferences.
- 32:04It's going to be a blast. Check it out right now.
- 32:07You can go to home dot ML OPS dot community and register.
- 32:14Let's get back into the show. There's a fascinating piece to
- 32:18me changing gears now when it comes to the idea of monitoring
- 32:22and how you would approach monitoring being more of a dev
- 32:26OPS person. But then in this LLM slash ML
- 32:31world, you need to be monitoring so many different things than
- 32:34just the system, right? And the logs and traces are
- 32:37great, but what other things are you monitoring?
- 32:41And especially with ML, you're going to be monitoring the
- 32:46predictions and how they're doing and the business metrics
- 32:51that they're going against, but you are potentially going to be
- 32:55monitoring the data and the data flows.
- 32:58And so having somebody with a dev OPS background, I imagine
- 33:03when you're starting to think about data monitoring, you're
- 33:07trying to fit it into this box of, all right, I'm coming from
- 33:11dev OPS, I'm looking at logs and traces.
- 33:14Now I should, are there logs and traces for like the data
- 33:18monitoring? Talk to me about that and how
- 33:21you how you approach that problem or tackle those problems
- 33:24too. Sure, we have a really strong
- 33:26team of reliability engineering here at the liberty.
- 33:32So when I when I think about logging and monitoring, I would
- 33:36say the, you know, the the next version or how we Quan these
- 33:40this term these days is observability.
- 33:43You don't want to, you know, digging into logs or doing
- 33:46monitoring, looking at the things you should be aware of
- 33:48the the accurate things coming out of that.
- 33:51Right. I'll, I'll talk a little bit
- 33:54like a before rather than think, right, the permit of ML models
- 33:59like you run pipelines maybe in in any ML OPS platform, right.
- 34:06But if you think about you are actually replacing the business
- 34:09processes. Someone was you doing their work
- 34:11manually, they were maintaining things in Excel and here you
- 34:14come with the knowledge of EIML data science.
- 34:18You said, OK, I understand your business problem.
- 34:21Let me create a model for you. OK, so I replaced whatever they
- 34:25were doing, but at that time when we replaced, we took a sign
- 34:29of that. OK, I commit that my model will
- 34:33be delivering this much of accuracy.
- 34:36Now there was someone had to knowledge that you've replaced
- 34:39with your model over the years. People are going to rely on your
- 34:43model more and more if you do not have observability, like,
- 34:47you know, this is the the limit I committed to, but you're not
- 34:50measuring yourself. You're marching towards a
- 34:53failure because you're not keeping an eye on the data
- 34:57drift. If the underlying data is
- 34:59changing, there's no way that you're monitoring someone is
- 35:02going to point out at some point and that'll be unpleasant
- 35:06because you know, when these things are monitor or auditor,
- 35:11you have no time to fix those things back, right?
- 35:14Yeah, it's too late. So I played a little bit around
- 35:18in queue flow, like how you can emit those extra metrics.
- 35:24The thing is, if there's a packaged model, there are a lot
- 35:28of things already out there. But if you have understanding of
- 35:31Prometheus exporters or you're creating your own model, it
- 35:34could be a simple linear regression model.
- 35:37You have your training pipeline, you can think about, OK, let me
- 35:39emit these metrics when I'm running, when I whenever I'm
- 35:43running the training, right, I want to emit these metrics like,
- 35:47you know, for example, the runtime, this is my environment,
- 35:51the number of rows I processed and these are the metrics coming
- 35:54out of that, right? And you can easily though these
- 35:57things to graph on our dashboards or a similar kind of
- 36:00a like, you know, UI set up alerts on top of that.
- 36:06You can see things beforehand when it actually, you know, dips
- 36:09down. All the accuracy is not what you
- 36:11promised, but the same time you already touched upon all the
- 36:15important parts you like you talked about the data pipelines,
- 36:18right? So if you have something based
- 36:22out of the spread of the data already, right?
- 36:25So rather than relying on just the model, because model is the
- 36:30last stage where you're running those things, but the data
- 36:33change has already happened or it is happening over week,
- 36:35right? So if you keep an eye on that in
- 36:38a way like, you know, visually getting things out of that,
- 36:41creating some cool visualisation on top of that or maybe some
- 36:45logic that you are saying, OK, it is going beyond the standard
- 36:49deviation, you know, the range that is permissible.
- 36:53I should be later, I should start working on that.
- 36:56So that way it is, it is super important.
- 36:58Now when it comes to LLMS, it is, it's like, you know the, I
- 37:06would say it's a free range of metrics that you need to now
- 37:09think about you, you cannot say, OK, I have this number, I'm
- 37:12good. Now you talk about RAG, right?
- 37:14You take a step back, you are doing basically three things
- 37:19there. You, you are getting the results
- 37:21back and then you are having augmented import, right?
- 37:25That is you use your prompt, you go to your retrieve results in
- 37:29there and you send it to LLM for final response.
- 37:33So if you say I'll just get the final response evaluated, that
- 37:38is half picture because if you retrieved results are not up to
- 37:42that quality, you'll not get the final response right.
- 37:46So now that evaluation has to happen at that step as well.
- 37:50And then you have to think about, OK, how do I do that?
- 37:53Like you provided me a list of questions.
- 37:55I run it, I get the results from my vector store, but how do I
- 38:00evaluate if it is actually accurate or getting the things
- 38:03back? So you can think about, you
- 38:06know, different approaches. LLMS can be used to donate
- 38:10question answers as well. People have been trying that.
- 38:12You provided a, a document, you say give me a list of question
- 38:16and answers out of that. You can use those credits to
- 38:19then do a search and see if your document pieces show up there,
- 38:24right. And that is the piece on the
- 38:26retrieval side. Then you can see the order where
- 38:28they're coming up. Do you need a good read anchor
- 38:30over there? But you need to measure those
- 38:34things at separate points and see how they differ.
- 38:38So that goes back to our point where we were talking about the
- 38:42CACD as well, or how you deploy these, you know, separating
- 38:45things in config maps and the secrets out there.
- 38:49If you don't have it set up properly, then you'll be doing a
- 38:52lot of work regenerating those images.
- 38:54So think about, you know, I, I might be playing around with
- 38:57these parameters. I need these APA endpoints like
- 39:01instead of getting just the final response back my image or
- 39:05the application that I'm designing, it'll have another
- 39:08endpoint that will just give me the search results.
- 39:10So that way it'll be easy for me to do the evaluation of those
- 39:15retrieved results as well as the final results if I want to do
- 39:18that. And the the other piece that
- 39:23comes to my mind is the inference latency.
- 39:26So when you use LLMS or any APIs, right, you have to think
- 39:31about is it a batch processing or is it a real time.
- 39:36So in the batch you can think about pops up hub model, you
- 39:39have something like a queue mechanism.
- 39:41You know your applications are publishing to that and then you
- 39:45know slow and steady you are picking from that.
- 39:48You keep your not huge compute footprint, but you keep it up to
- 39:53a level where you keep on, you know, reading from that queue
- 39:56without creating too much of backlog.
- 39:59But when it comes to real time, like most of these chat bots,
- 40:03whatever we are doing with the LLMS, these are all real time.
- 40:06You don't want your users to be waiting in minutes to get a
- 40:09response back. It doesn't make any sense,
- 40:10right? So in those you should be
- 40:12capturing or measuring, not capturing the measuring the the
- 40:16end press time lag there. How much time does it take?
- 40:20And that is where the things we discussed like, you know,
- 40:24resilient architecture. If your client is doing a retry,
- 40:28like I hit a LLM gave me a rate limit, what do I do next?
- 40:33Right? How can I reduce that time?
- 40:36Like if I know my limits already, I can beep up the rate
- 40:39limits for the LLMS, but it is not always possible.
- 40:42You have to think about. I'll create a pool so there are
- 40:45different products available there.
- 40:47One of the things that I explored a little bit is Azure
- 40:51API Management. I'm going to write a something
- 40:54on that very soon like proxy. Yeah.
- 40:58The thing is you can capture all those metrics out there and
- 41:04without measuring I think you cannot improve, right.
- 41:07I mean you need to measure 1st and then you are in good shape
- 41:10that you can improve upon. You can see how it makes a
- 41:12difference. You on ordered a new model if it
- 41:14is taking much time, more time or less time, right.
- 41:18And then in observable decent, you know, DevOps background, you
- 41:21mentioned already resource utilisation is also very
- 41:26important because you don't want to, you know, throw all the
- 41:30resources available. I, I remember one of my data
- 41:34scientists asked me, can you just provide me, you know, like
- 41:3724 CPU's and 48 GB of RAM to run this thing.
- 41:41I said, man, why do you need that?
- 41:43They don't. So they had a hard time to
- 41:45understand request versus limits when it comes to Kubernetes,
- 41:49right? So they said OK, I want
- 41:52everything as a request like from the beginning.
- 41:57So they just wanted it from, even though they weren't going
- 42:00to use it all the time, they're like this potentially could need
- 42:05this amount. So we might as well request it
- 42:08and make sure that we have that capability.
- 42:11Yeah, I think so, Yeah. Yeah.
- 42:15What'd you tell them? What's what did you school them
- 42:17on? Were you like?
- 42:18Maybe we could do something? Called serverless.
- 42:21Yeah, I told him, you know, the request is more like whatever
- 42:25bare minimum you need to get it started and then it can go up to
- 42:29all the way to the limits. And you know, this may be good
- 42:33enough for you to run like up to maybe 8GB of RAM is good, right?
- 42:38We'll find more as we do that. But The thing is, when you do
- 42:41the development, you're not going to do it with all the data
- 42:45available, right? You'll be doing it with the
- 42:46lesser data because it's a development.
- 42:49Now we logically have the next step.
- 42:51That is your test environment of the UAT where you'll be
- 42:54potentially running some kind of regression testing or load
- 42:56testing there, right? So that is where if you have the
- 43:00proper observability set up, you keep an eye.
- 43:02OK, I see with these many users per minute, I'm getting up to
- 43:06this level. OK, what do I need to do?
- 43:09I see a couple of crashes. I need to bump up if, if it is
- 43:12hitting, you know, OMS out of memory errors, I need to bump up
- 43:15my memory if I see it's crashing due to CPU limits, I need to
- 43:19increase that. And I personally have found
- 43:22like, you know, not every app is similar.
- 43:25Like if you are just going with a Jaguar, you might need like
- 43:29more CPU's as compared to if you are doing some summarization,
- 43:32you might need more memory. So it's not one like you know,
- 43:39the rule of thumb. I would say it's more like clear
- 43:42observability. If you have things in place, go
- 43:47through the set of processes like I'm supposed to do a UAT
- 43:50before I go to production. I realise, OK, this has a little
- 43:53bit different need I need to do that.
- 43:57So we talked about logging earlier, right?
- 44:00So you could, you could be having a lot of logging
- 44:03solutions already where your standard out or standard, right?
- 44:07Like no data dogs plunk or anything else, right.
- 44:11But the problem with the I decide what I have observed so
- 44:14far. Like I worked with six or seven
- 44:16different teams doing my position from a database
- 44:20administrator on to this side. We keep on dumping a lot of
- 44:24information, but do we actually look at that information?
- 44:28Never. That's the so classic story,
- 44:33Yeah, we may need it later, so we might as well grab it.
- 44:38I, I prefer more quality of logging.
- 44:41Like whenever you are designing right, you have different
- 44:44modules like in the modular approach, you start thinking
- 44:47about, OK, what do I need from this?
- 44:50Like when this module runs right, what do I like need as a,
- 44:55as a mandatory thing or a nice to have thing?
- 44:58You can keep those things enabled or disabled.
- 45:00Again, going back to the configuration thing, you can
- 45:03have a flag there where I say, you know, different logging
- 45:06levels, like minimal or, you know, standard or extended
- 45:11logging, whatever. And then all of my things get
- 45:13enabled or disabled based on that.
- 45:16But when you create those metrics, think about in the
- 45:19logging, not just to dump that data, maybe create an like a
- 45:23nice shape that you can easily create dashboard like, you know,
- 45:25Jason format, super easy to read later on.
- 45:29But once you roll these things out and, you know, after a
- 45:33couple of years, someone says, OK, how do we get this
- 45:36information, man? You're writing it in here now.
- 45:39It's a big thing. So it's like a lot of LCM, it's
- 45:42generated. I have to go back and look at
- 45:45the code, how I wrote, maybe some of the things I do not
- 45:48recall at all, right? It's more like these little
- 45:51things make a big difference if you bring it into your process
- 45:54like, you know, like these eight considerations when you write a
- 45:57new app. So I'll mention just one thing,
- 46:00then I'll wait for your imports here.
- 46:04I talked about temperatizing. So what I experiment a little
- 46:08bit like, you know, these applications have a broader
- 46:11design. We touched on the K native
- 46:12serving or K server. You could be running with Django
- 46:16server or you could be running with fast API, right?
- 46:19You can actually create those repository templates as well,
- 46:24like create a skeleton with all those things.
- 46:27I usually do that. So I ask people, you know, if
- 46:30you have any suggestion, upgrade that template.
- 46:32If they have to create a new repository, just create a clone
- 46:36so that way they get the bare minimum things or even the
- 46:38instruction and the read me that make sure these things are
- 46:41covered. That has helped me a little bit
- 46:44on you know, making sure like no like 55 mandatory things are
- 46:48already there. And then I get imports that
- 46:50people feel like OK, now it is easy for me.
- 46:52I realised while coding that OK, this thing is missing, we should
- 46:55make it available. They create a pull request
- 46:58against that template. Yeah.
- 47:00So then five years later you don't go back and say how did I
- 47:04structure this? What exactly was going on here?
- 47:08What was I thinking? And you save yourself a lot of
- 47:12time, which makes a tonne of sense.
- 47:14I mean you said a lot there, man.
- 47:15There is so many threads that I want to pull on.
- 47:19And one just going back to the beginning of what you were
- 47:24saying on being sure that if you set certain SL AS or SL OS
- 47:32around models, you better damn well keep them.
- 47:35And the way to keep them is especially the more products
- 47:40that are being built with that service or that model, then it's
- 47:45almost like you're getting more and more dependencies on top of
- 47:49your service. And so it becomes more critical
- 47:54now if you are not having the visibility into when the model
- 48:00isn't working, you're setting yourself up for a bit of pain
- 48:06and hurt. And so I just wanted to say that
- 48:10because it's like you gave your word or you said this model is
- 48:14going to have this type of accuracy or it's going to have
- 48:17whatever it is that you agree on.
- 48:20You have to make sure that it does that.
- 48:23And like you said, if you're not tracking it or if you don't have
- 48:26metrics around it and you're not tracking it and observing it,
- 48:29then you don't actually know. And that's where problems can
- 48:33arise. And and the other thing you have
- 48:36to think about you, you know, you lost the your stakeholders
- 48:40confidence if they report some issue, not are you aware of
- 48:45that? Like things can happen, models
- 48:47may not perform, data has changed, but you should at least
- 48:50be aware 1st and you know, it should be other way.
- 48:53OK, I'm setting up this meeting. I realise this is changing a
- 48:56little bit. We need to, you know, work on
- 48:58that. Yeah, get out in front of it.
- 49:01Because if they're coming to you and saying why isn't this
- 49:04working, it may be OK if they do it once, but if it's two times
- 49:10or three times, then it's like, I'm not going to build with that
- 49:13service. It's not reliable.
- 49:16Yeah. And and then what you do all
- 49:19that work for to get that model out into production.
- 49:23Why did you even do that if people then later aren't going
- 49:26to want to build with that service?
- 49:28So, so that was one thing that I, I found fascinating, just
- 49:32pulling on another thread that you were mentioning in your last
- 49:37answer, really fascinating when you were talking to this data
- 49:42scientist who wanted the Max allocation right away.
- 49:47And your approach to it, if I understood correctly, is saying,
- 49:53let's try and give you the most basic allocation possible.
- 49:58And then when we start to progress it through the
- 50:02different stages into production, we're going to be
- 50:07increasingly trying to break it or trying to stress test it.
- 50:12And then we're going to see what comes up and whatever comes up,
- 50:15we're going to deal with that when it comes up.
- 50:17Is that how you look at it on that road to production?
- 50:21Almost. So the example that I gave you
- 50:24was more around a Jupiter notebook, like where people are
- 50:28running and you know, in queue flow you can create your own
- 50:30notebook servers and you can also request your resources.
- 50:35So the point that I was trying to get there is, you know, if
- 50:39you're coming from a purely data science background, right, you
- 50:44don't want to run with lower resources or you say you don't
- 50:48understand the difference between request and limits,
- 50:51right? So it, it was that kind of
- 50:53scenario that I need all the servers.
- 50:56So differentiation of story responsibility, like when you
- 51:00are developing, right, you are not supposed to or you are not
- 51:04required to get all the production data and run
- 51:07everything. Like, you know, in the models,
- 51:08you can take a sample size, right?
- 51:10There are different ways you can do that.
- 51:13So it's more like education that you don't need to do that here
- 51:16in this environment. It is more for development.
- 51:19But then when it comes to request versus limit is more
- 51:22like limit is your hard limit. Request is a minimum thing you
- 51:25can start with, right? You don't need it because if you
- 51:28go with matching the request with limit, you are reserving
- 51:30all your resources and then you don't even need those right.
- 51:35But with the request and limit, then you can check it from your
- 51:38Grafana dashboards or whatever availability you have.
- 51:41How much are you reaching like no, are you actually touching
- 51:44the limits or not at all? Yes, in terms of moving it to
- 51:49production when we are developing, we are not doing a
- 51:53load testing at that point. Doesn't make much sense to me
- 51:56honestly to do a load test in a Jupiter notebook, right?
- 51:59I mean, you should be running an app, man, that that's what the
- 52:02need of the app there, right? So it's more like education and
- 52:07segregating. OK, we do it at this stage.
- 52:09And at that I would expect your, it, your notebook is shaped like
- 52:14an application at that point. It has all those, you know, 8 or
- 52:1710 things that we discussed standardising like proper
- 52:20logging or, you know, API endpoints, proper naming
- 52:23convention there. Then give it all the data and
- 52:27the resources. And when we do that testing, we
- 52:30have a better understanding how much resources we need, where it
- 52:33is hitting the limit. But at that point as well, we
- 52:37don't need the blind testing. You should have some something
- 52:40in my in your mind, right, that I want to reach like these
- 52:43number of user transactions per minute.
- 52:45I have to make it working for that.
- 52:47You can break any app if you want to write, but what value do
- 52:50you get out of that? Like if you say, OK, give me an
- 52:54app and I'll, you know, break it.
- 52:56But what do you get out of that? Your business goal is to make it
- 52:59happen for this many users. And I'll provide you the
- 53:02resources for that and for like day-to-day monitoring, getting
- 53:08patterns, anomaly detection, then you have proper
- 53:10observability. You'll be probably leaving that
- 53:12every week or every month. And you say, OK, I see a spike
- 53:16in traffic, we need to revamp our resources, right?
- 53:19So everything goes logical. And are you, when you're having
- 53:24that transition from whatever it was, whether it's LLM locally
- 53:31being run to now, it needs to be converted into an app or a
- 53:36Jupiter notebook, then now it needs to be more in the shape of
- 53:39an app. Have you found success trying to
- 53:43put that process onto the data scientists or what does it look
- 53:49like? What is the translation process
- 53:52look like? Yeah, so the beginning, it was a
- 53:55little bit of a struggle, but I I touched upon something like
- 53:59temperatizing sometime, you know, people try to push back
- 54:02because there's a too much unknown.
- 54:05If you provide them a scaffolding, OK, this is a
- 54:07skeleton. These are the files.
- 54:10So slowly and surely with combination of knowledge sharing
- 54:13session, people start feeling comfortable on then peering and
- 54:17peering like, you know, you hook up a person with someone who
- 54:19already know that. So you slowly spread that
- 54:22knowledge out. So it's not purely a technical
- 54:26solution. It's more like a timing and then
- 54:29the way we work. When you start on the project in
- 54:33Greenfield, it is easy because something new you are
- 54:36implementing. But if it is something already
- 54:39implemented and you want them to make changes, you may have more
- 54:43challenges there. Yeah, It comes back to that
- 54:48people, process and technology idea.
- 54:52Here's straight people and processes.
- 54:55No amount of technology is really going to help you on
- 54:58this, No. And so going back to the, the
- 55:00question I was going to ask you before I remembered what I
- 55:04wanted to talk about was really around the different areas that
- 55:10things can fail. And specifically we were talking
- 55:14about this RAG development and you were saying, do you have
- 55:17replicas of your vector databases?
- 55:20Do you have the LLM proxies? Do you have all the like?
- 55:26Make sure your secrets aren't on GitHub.
- 55:29What other ways have you seen or do you think about?
- 55:33What other vectors are you thinking about to make sure that
- 55:37your architecture is as robust and reliable as possible?
- 55:43That's a really great question. And especially with the LLMS and
- 55:47more and more cloud vendors over there providing all these models
- 55:51as APIs, right? Like now you're not limiting
- 55:56your traffic within your own centre.
- 55:57You're you're making a lot of hops and here and there, right?
- 56:01So it's again, you know, your personal opinion based on the
- 56:05knowledge that I have with different things.
- 56:08I feel like no security is one of the common things which gets
- 56:12overlooked. If you're creating new resources
- 56:17and your process is more like people oriented, you still rely
- 56:20on manual work. There are chances there could be
- 56:24human error, there would be some misses here and there, right?
- 56:28And that can lead to some big problem.
- 56:31But when it comes to the things they itself like what you have,
- 56:35for example, there's a newer model that come out there and
- 56:38you want to start using that, right?
- 56:43I think you need to virtually or logically segregate the task.
- 56:46Like experimentation is one thing, but when you take it out
- 56:50to like a next step, like from dev, test, prod or whatever
- 56:53you're moving, you need to have proper evaluation.
- 56:55If you're not doing that, you're bound to again or the risk of
- 56:58failure is high because you don't do the, the due diligence
- 57:02there because it's a big change in itself.
- 57:06And all the pieces in this workflow are important.
- 57:09I know we took example of RAG, we have the retrieval engine.
- 57:13Suppose, you know, tomorrow you want to switch to a new vector
- 57:16database. How do you test the the quality
- 57:20of that search results that you're getting One thing good
- 57:25and bad about the LLMS or anything that is coming across
- 57:29is people feel like OK, all I need to do is reinstall, import
- 57:33this and start using right. But behind the scene.
- 57:37These are some APA endpoints or maybe not so huge, but still
- 57:45another thing in your landscape, like a module that is providing
- 57:49some functionality. And if you're not doing AQA for
- 57:55each of those components and you start looking at just the final
- 57:59response, I think the risk of failure is very high there.
- 58:04Well, even if you go back to the classic ML example we took, like
- 58:07not keeping or keeping an eye on your data that you are so
- 58:11relaxed now, OK, my models are running fine, but that, you
- 58:15know, there's the data drift. You're not aware of that it's
- 58:19without proper observability. It'll take a lot of time for you
- 58:22because what happens over time, people start focusing more on
- 58:27the final outcome. I think it makes sense for the
- 58:31business, but if you are the one who is implementing or who are,
- 58:34who is researching, right, you should be aware of each and
- 58:38every step and and know how to do QA of each of that hop.
- 58:43Otherwise, you know, you're bound to get into an unpleasant
- 58:47situation where you say, OK, now I don't know, man.
- 58:49I have to go to square one and start analysing each of that
- 58:54thing. And you should have an incident
- 58:56response plan, like if something fails, right?
- 58:59How are you going to respond to that?
- 59:01It is not that I implemented something like generator by AI
- 59:04is relatively new. I know a lot of people have been
- 59:07experimenting, but if you roll out this app right, you may be
- 59:12seeing a different kind of situation as compared to a
- 59:15regular app or a regular model, right?
- 59:17They don't see the responses or your services unavailable.
- 59:20Your LLM starts behaving like no differently like it starts
- 59:26giving you the information that it is not supposed to or some
- 59:29error message. People start asking questions
- 59:32that you never thought they were going to ask.
- 59:34There's so many different ways they can not do it.
- 59:37That's a great point actually. One thing upon that right?
- 59:40Like use LLMS for asking those questions.
- 59:44You may consider having some kind of topic modelling on those
- 59:47questions as well. Like you know what people are
- 59:49talking about so that you are aware. 100% that's one of the
- 59:54most important pieces when it. Comes to just one more thing
- 59:57Dimitro's before it skips my mind that is about you know we
- 1:00:02talked about the libraries like people are pulling and using it
- 1:00:05but if you see the one liberty around that right we you may
- 1:00:10already remember something that happened around.
- 1:00:15Some zero day. I know, I know what you're
- 1:00:21talking about, but I can't remember exactly what you're
- 1:00:23talking about. But yeah, there was a
- 1:00:24vulnerability. Yeah.
- 1:00:25So I mean, if you don't have a proper vulnerability scanning
- 1:00:29for these libraries, right, you don't know what you're
- 1:00:31implementing, right? No one remembers over time.
- 1:00:34So I think right from the beginning you need to have all
- 1:00:37the wells and whistles when it comes to getting things to
- 1:00:40production. For experimentation, it might be
- 1:00:42OK, but I've seen situations where people start playing
- 1:00:46around and they later realise, OK, this was a licence thing
- 1:00:49you're not supposed to do commercially.
- 1:00:51Right now. It's an ugly situation because
- 1:00:54the developer is not aware and he created something that, you
- 1:00:57know, an organisation uses questionable.
- 1:01:00So those kind of things someone has to watch if a process is
- 1:01:04there. I know I've been talking
- 1:01:05process. I measured like 20 times but
- 1:01:09can't stress enough. But it's another vector to be
- 1:01:12thinking about and I appreciate that because it's not just,
- 1:01:15again, it, it doesn't just take into account how many database
- 1:01:23replicas do I have. That's a whole different type of
- 1:01:26vulnerability that you could potentially get yourself into
- 1:01:28some hot water for because you didn't check the licencing on
- 1:01:33that open source tool that you were using.
- 1:01:36And so being aware of all these different ways that things can
- 1:01:40go wrong is quite useful. And I wonder about just since
- 1:01:47we, you mentioned how you want to have an incident response
- 1:01:52plan and you also were talking about how, yeah, to bring down a
- 1:01:58service is always going to be possible if you throw enough
- 1:02:03crap at it. And what did you accomplish
- 1:02:07there by bringing it down? It's almost like, So what good
- 1:02:10job can we get back to work now? I, I think about stuff like we
- 1:02:17had on here someone who is into chaos engineering.
- 1:02:22And I imagine you've coming from DevOps, you've probably heard of
- 1:02:27the term. And for those who haven't, it's
- 1:02:31very much thinking about how can we try to really stress test or
- 1:02:37how can we have a hypothesis about if something hits the fan,
- 1:02:41what will happen from here? And then can we test our
- 1:02:45hypothesis and see if our system is reliable or not?
- 1:02:49If that thing that we like, we blow up something or we start
- 1:02:55sending 10X the amount of traffic or we start doing
- 1:02:58something like that. Have you thought about that in
- 1:03:01the machine learning world, and if so, how?
- 1:03:06It's a great point. It is is totally applicable
- 1:03:08because when you're talking about the resilient
- 1:03:10architecture, right, it cannot be compared without talking
- 1:03:13about the, the kilos engineering and but in in terms of the
- 1:03:19permitted models like before the LLMS word, we have been relying
- 1:03:23more on the regular regression testing because most of those
- 1:03:27things were either in a passive in France like like a chrono
- 1:03:31fashion. Is it and?
- 1:03:33Start opening those slowly and shortly to more and more APIs
- 1:03:38like creating the key serving etcetera.
- 1:03:42But it is important because as you are bringing in lot and lot
- 1:03:46of AAML to all these technologies or the existing
- 1:03:49solutions that you have to start thinking around those lines.
- 1:03:53I personally have not spent too much time but that is on my
- 1:03:56radar. Maybe could be a topic that we
- 1:03:58will discuss in some future broadcast.
- 1:04:01I would like that, yeah, 'cause I often think about it as how
- 1:04:06can you do this type of chaos engineering with the data as
- 1:04:09opposed to the service. So what happens?
- 1:04:13And it's, it's the same theory of I have a hypothesis and I'm
- 1:04:17going to see if my system is robust enough to be able to
- 1:04:21handle this. And so instead of saying what
- 1:04:24happens if we get 10X to traffic, what happens if all of
- 1:04:28a sudden this database goes down or if I all of a sudden start
- 1:04:33getting 10X the data going through?
- 1:04:35Are we able to handle those types of situations?
- 1:04:39And so it's bringing that same mentality, but doing it a little
- 1:04:42bit more. I guess it's a little bit more
- 1:04:43on the data engineering side of things that you want to just
- 1:04:49stress test your system and make sure that everything is is doing
- 1:04:54what it says it's going to do. But one thing I, I do like to
- 1:04:58mention here is, you know, availability of any resources in
- 1:05:03that whole landscape, right? Like a common point of failure
- 1:05:06we talked about. So when we talk about
- 1:05:08observability, right, we really rely on I have a logging and
- 1:05:12monitoring in place, right? I have a logging solution, but
- 1:05:15there are ways that you can set up some health cheques around
- 1:05:18that. Like even if you create a fast
- 1:05:20API app, right? You can create a health
- 1:05:21checkpoint on top of that or through that, you can hit your
- 1:05:25databases and get a health check.
- 1:05:27So if you, I have seen some of those like official document
- 1:05:32images, they always come with the health check, right?
- 1:05:36But when you create one, most of the time those things are
- 1:05:39overlooked. So I'm going to say that
- 1:05:43template thing again. So where with me create
- 1:05:46something that has, you know that make sure you have these
- 1:05:49health check and an example Docker file which has those
- 1:05:52things incorporated. But the point here is you need
- 1:05:57all those things right from the beginning so that you can reduce
- 1:06:01the risk. The risk is still going to be
- 1:06:04there. Like, you know, we are all from
- 1:06:06some data science and machine learning background.
- 1:06:09You can minimise the probability of something, but you cannot
- 1:06:12reduce it, right? It, it, it can still happen.
- 1:06:14It's more like if you are aware, OK, how I can be the first one
- 1:06:18to know because my team implemented, if I have proper
- 1:06:21thing in place, I might be able to have the cheques in there.
- 1:06:24Like, you know, if my database, like before making a database
- 1:06:27call or I, I know my UIAPA app that has cheques and balances in
- 1:06:33there. If my underlying APA is not
- 1:06:36performing, it'll say, OK, we are experiencing some issues,
- 1:06:40right? I'm not, I'm not going to get
- 1:06:41through the traffic, like I'm not going to get you to the next
- 1:06:45hop, right? Those are kind of a common
- 1:06:47development patterns. But The thing is if you don't
- 1:06:49have the proper health check monitoring in place like then
- 1:06:53you'll be doing some over engineering or getting into the
- 1:06:56issues. We are spending too much time on
- 1:06:59troubleshooting. Dude, this bitter, awesome
- 1:07:01conversation. I really appreciate you coming
- 1:07:03on here. Thank you.