AI App Development Guide for Business Owners
MobiDevMobiDev
To start deeply investigating the AI app development process, it’s important to first understand how these projects differ from regular app development projects. When it comes to AI, every problem requires a unique solution, even if the company has already developed similar projects. On the one hand, there are a variety of pre-trained models and verified approaches for building AI. Also, AI is unique as it is based on different data and business cases. Because of this, AI engineers often start the journey by diving deep into the business case and available data, exploring existing approaches and models.
'AI project creation is much closer to scientific research than it is to classic software development.' -MobiDev
Due to these aspects, AI project creation is much closer to scientific research than it is to classic software development. Let’s explore why this is and how understanding this reality can help you prepare to execute these processes and budget for your project.
AI projects can be classified into four groups:
AI project development environments can be visualized as a three-layer pyramid consisting of technologies and ready-to-use solutions.
The upper level contains ready-made products suitable for AI usage – like third-party libraries or proven company solutions. For instance, Google’s solutions for detecting cheque fraud, facial recognition, and object detection serve as good examples.
The second level consists of new niches describing business challenges. We may have the appropriate model to solve the challenge, yet the technology requires a slight modification or adaptation to prove its effectiveness during the implementation. The model is supposed to be specialized for its particular use case, and this leads to the emergence of a new niche in AI usage.
Scientific research constitutes the low-level layer. Here we may find papers and new models – let us mention GPT-3 as an example. Scientific research isn’t production-ready since we don’t know what results from such models will demonstrate. It’s a deep level in the AI system, though we can work in this direction.
Application development with AI isn’t fundamentally different from the non-AI application but incorporates PoC (Proof of Concept) and a demo. The stage of BA and the UI/UX stage start when the demo and the AI component are ready.
The first thing an app development company does when it has been tasked to create an AI-powered application is ask about clients’ needs and data: Is AI the core of the product or an additional component? The answer to this question impacts how sophisticated the solution will be.
The clients may not need the most accurate and contemporary solution. Therefore, it’s important to find out whether the lack of the AI component is blocking full-fledged product development and if there is any point to creating the product without the AI component. After this is worked out, we can move on.
In the beginning, we can classify AI projects into two subcategories:
So, you’ve decided to develop a new AI-feature application from scratch. Because of this, you don’t have any infrastructure to integrate the AI app with. Here we come to the most important question: Can AI feature development be handled the same way usual app features are handled, such as login/logout or send/receive messages and photos?
At first glance, AI is just a feature users can interact with. For example, AI can be used to detect if a message should be considered spam, to recognize a smile on a face in a photo, and to implement AI-based login with the help of face and voice recognition. However, the development of AI solutions is still young and research-based. This leads to the realization that the AI features of an application are the riskiest part of the whole project, especially if the business goal requires coming up with an innovative and complex AI solution.
Let’s consider a small example. You want to build a chat app with a login/logout screen, message system, and video calls. Video calls should support Snapchat-like filters. Here is a table of risks and an overview of the complexity of different features of the app:
It is clear that from the point of risk minimization strategy it’s not reasonable to start the development process with the tasks that have the lowest complexity and risks. You may ask, how come Snapchat-like filters have the most risk? Here is a simple answer: to create a Snapchat-like filter you have to involve a lot of cutting-edge technologies like AR and deep learning, mix them properly together, and put them on mobile phones that operate with low computational resources. To do so, you have to solve a lot of extraordinary engineering tasks. That’s why AI application development from scratch has a very specific PoC structure which will be discussed further in this article in the “PoC Development Stage” section.
Integration of an AI feature into an existing project has some differences from building AI apps from scratch. First of all, it is a common case that existing projects we have to enhance with AI were developed without any architectural consideration of AI features. Taking into account that an AI feature is a part of some of the data pipeline, we conclude that the development of an AI feature will definitely require at least some changes in the application architecture. From the perspective of AI, existing applications may be classified as follows:
DB Based Projects:
Non-DB Based Projects:
Let’s go over an overview of how a typical AI app development process grows in five stages.
In the first stage, we obtain the client’s input or vision that can function as a document with the general idea overview. Here we start the business analysis process. To prepare input, we need to consider the business problem. Businesses address app development companies with the business problem, and it’s the job of the latter to find the intersection point of the business and the capability of AI.
For example, in the case of a restaurant or grocery chain, business owners are interested in reducing food waste and achieving a balance through the analysis of purchases and sales. For AI engineers, this task turns into time series prediction or a relational analysis task whose solution enables us to predict specific numbers.
The next stage is the determination of the ML (Machine Learning) problem that should be discussed and solved. This must take into account the technological capabilities of Artificial Intelligence subfields, such as Computer Vision, Natural Language Processing, Speech recognition, Forecasting, Generative AI, and others.
Data is the fuel of machine learning and is a critical step in AI app development. There are two main data types — specific and general. General data can be obtained from open-source data websites, so all we must do comes down to narrowing the scope of the target audience, putting emphasis on the particular region, gender, age, or other crucial factors. Plenty of general data can simplify the process.
Therefore, if the client has an app based on the fitness tracker activity, we can apply data and transfer learning to start implementation as fast as possible. The same applies to image classification where plenty of collections are available to start with.
Another scenario would be the lack of available data, its irreconcilability with the target audience, or the need for data generated by the particular business - for example, the sales statistics of a particular business or the defect detection list of an assembly line. What can be done if the client has no data, yet intends to implement the AI component?
There are six sources to draw data from.
The role of data in AI projects shouldn’t be diminished. How effectively an algorithm is working depends on data, so the vastness of input makes it more accurate.
The next step is to outline business and technical metrics that can differ significantly. A business owner may wonder whether the accuracy of the project would be sufficient. An AI engineer isn’t always ready to answer this question since it could be a new niche. This is where the PoC comes to the rescue, showing the minimal accuracy that can be obtained. Most remarkably, binary decisions are 50 percent accurate, just like a coin toss.
Let’s take a look at the first example in which the client needs to reduce food waste. By transforming a business problem into a technical solution, we have reached the conclusion that we need to predict purchases, so the metric MAPE (Mean Absolute Percentage Error) would be optimal.
The second example is secure login for which the equal error rate (EER) is a business metric. EER corresponds to the equality of false acceptance rate and false rejection rate.
The third example is a classification problem for which the accuracy of correctly-recognized entities serves as a business metric. By classifying entities, we can consider text with spam, images with cats, whether the employee wears a mask, etc. Engineers are free to use the same metric or make the task a bit more complicated and apply an F1 score for illustration purposes.
The next point to be defined before starting with PoC is limitations. This is a non-functional requirement that could become clear later, during implementation. PoC must be based on one hypothesis and solve a particular task. The illustration of a security limitation is the necessity to blur everything behind the person in the background. Once the input has been prepared, the AI team works on PoC, metrics, measurement of the results, and the demo. A report can be made in parallel with a demo, describing investigations, pitfalls, and confirming or denying the hypothesis.
Every research included in PoC is accompanied by a report: what has been found out, what could be done in the future, and what information has become clear and should be taken into account in the next iterations. Although similar to a product, PoC isn’t actually ready for usage. It can be converted into a product if the demo suits the client. It is important to realize that for full-fledged product development in addition to AI engineers, we need other specialists — front-end, back-end, and mobile developers, to name but a few.
The PoC stage of a fresh new AI project should be AI-centric. What does this mean? To meet the risk minimization strategy, we should start with the riskiest part of the project, the AI feature, and not touch any other features of the project, if possible. According to CRISP-DM, the PoC stage may be repeated several times to achieve suitable results. After satisfactory results are achieved, we are free to proceed to the MVP/industrialization stage with the development of all remaining features of the application.
To make an AI feature available for end-users, we first have to develop the feature and then integrate it with the existing application. Namely, with the application codebase, architecture, and infrastructure.
The most fascinating thing about AI features is that they can be researched, developed, and tested without touching the main application. This leads us to the idea that we can start AI-isolated PoC without risks for the main application. This is in fact the essence of the risk minimization strategy.
Here are three steps to follow:
1. Collect data from the existing application by:
2. Build an isolated AI environment with the use of the data collected earlier for:
3. Deploy the successfully trained AI component:
Depending on the project type, adaptation of the codebase may lead to:
Business owners often ask software vendors about the budget, timeline, and effort the PoC stage might take. As we’ve shown above, AI projects are characterized by a high level of unpredictability compared to the regular development process. This is due to the high variability of task types, data sets, approaches, and technologies. All these conditions explain why giving estimates for a hypothetical project is quite a difficult task. Still, we have shown one of the possible classifications of the AI projects above based on the project’s level of complexity.
The next table shows rough estimates for projects of different complexity levels. Please keep in mind that the estimates in the table may vary significantly depending on the project type, and data set properties. The numbers are given for a single CRISP-DM iteration.
The next step after the first PoC can be a new iteration of PoC with further improvements or deployment. Creating a new PoC implies data addition, processing of cases, error analysis, etc. The number of iterations is conditional and depends on the project.
Any AI project is directly linked to risks. We can face risks derived from data suitability, as well as algorithmic or implementation risks. To mitigate the risks, it’s wise to start product development only when the AI component’s accuracy meets the business’s goals and expectations.
The Most Comprehensive IoT Newsletter for Enterprises
Showcasing the highest-quality content, resources, news, and insights from the world of the Internet of Things. Subscribe to remain informed and up-to-date.
New Podcast Episode
Related Articles