From the course: The New AI Tech Stack: AI Literacy for Tech Leaders
Connecting AI models to systems
From the course: The New AI Tech Stack: AI Literacy for Tech Leaders
Connecting AI models to systems
- Many people think building AI solutions is just about training a model, but it's much more than that. You see, data science models are prediction mechanisms that come back to you with a set of numerical estimates, product names, generated text, or a categorization. The outcome can be served in a form of a table, single line, generated picture, or something that on its own may not make much sense. Imagine a client churn prediction being returned to a sales team as a raw spreadsheet with employee IDs and percentage from 1 to 57% next to them rather awkward and not intuitive to use. What we need to have a fully functioning system is three things. A backend, meaning the logic of the IT system where all the logical dependencies are described that is the heart and brain of a system. A front end or the so-called interface that can be seen and explored by users that is the face and body of the system. And a data science model, a prediction that is the outcome of the AI model. If we already have a system in our company, let's say an offer generation system, and we'd like to add the price prediction or a recommendation model to be a part of the system, our model must be connected through the backend to input the prediction into the system, and this connection is called API or application programming interface. Imagine an API is like a server in a restaurant. When you go out to eat, you don't go into the kitchen and make your own food, right? Instead, you tell the server what you want from the menu and they bring it to you. API works exactly like that as a communication pipeline that allows the system to communicate. If AI applications are connected with the system by API, the system will usually ask the model for a prediction and then the same API will deliver the prediction answer. This way, you can have many models that do not need to be a core part of the IT systems, and you can update them without interfering with the core. This is very important for model retraining and all models need retraining at some point. If you don't have an IT system that you want to connect your model to, you need to build the whole system together with your model including the backend and interface. I've been asked many times by clients why there are more developers in the project than data scientists. Now you know why. Okay, one more point about the importance of this API connection. Let's assume that the model is served as a SaaS solution, software as a service, or actually MaaS, model as a service, and it's on someone else's server. To use it, you need to exchange your data with the system, meaning that somehow you lose control over the data input to the system. It is just like using a standard ChatGPT version where you input a question and it's being sent to OpenAI system before returning the answer. It isn't necessarily a bad thing as long as you do it consciously. We'll come back to this later, but at this point remember that securing your data flows is extremely important.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.