AI App Development Guide for Business Owners

2022-07-14
关注

Illustration: © IoT For All

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.' -MobiDevClick To Tweet

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 Project Classification

AI projects can be classified into four groups:

  1. Straightforward projects: The typical examples include production-ready models that can be implemented with the application of public datasets and well-known technology. For example, ImageNet is suitable for projects aiming to classify images.
  2. Well-known technology projects: In these cases, we know the appropriate technology needed for the project, but we still need to put in the effort to collect and prepare data.
  3. Thorough-research-requiring projects: In principle, we can figure out how the model works and how to apply existing data or what steps should be taken to train the model for specific tasks. Experience alone won’t allow us to make any predictions because we don’t know how the model behaves. The process of launch requires additional testing and handling of cases.
  4. Extra effort required for production projects: Cases from this group envisage difficulties both with data and models that haven’t been sufficiently tried in practice.

Why Are AI Projects So Unpredictable?

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.

AI App Development vs. Regular Apps

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:

  1. Apps built from scratch
  2. AI component integrated into existing apps

Building an AI App from Scratch

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:

Chat App Features

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.

Integrating AI Component into an Existing App

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:

  • Text processing
  • Recommendation systems
  • Chatbots
  • Time series forecasting

Non-DB Based Projects:

  • Image / video processing
  • Voice / sound processing

Main Stages of AI App Development

Let’s go over an overview of how a typical AI app development process grows in five stages.

#1: Business Analysis

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.

#2: Machine Learning Problem Determination

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.

#3: Data Collection

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.

  1. A treasure trove of open-source data that enables lots of projects to start with public datasets.
  2. Scraping helps to implement AI projects with text data. Web pages like Wikipedia contain textual information or specific data. For instance, a database of vacancies, without regard for AI, may be useful for recruiting departments.
  3. Data annotation carried out manually or automatically. In the case of manual data annotation, a third-party company can be involved to collect and label pictures or other data.
  4. Data acquisition by means of a collection with a simpler product. A typical case point is chatbot development.
  5. Specific data is the fifth source of information and plenty of work should be done to collect it.
  6. The last source, synthetic data, appears when we generate something like graphs, charts, or diagrams on our own. AI engineers generate graphs or diagrams with Python and use them as a dataset for starters. Subsequently, more realistic production data is being added here.

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.

#4: PoC Development

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.

Developing AI PoC for New Projects

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.

Developing AI PoC for Existing Projects

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:

  • Making DB dump
  • Collecting image/video/audio samples
  • Labeling collected data or getting relevant data sets from open source libraries

2. Build an isolated AI environment with the use of the data collected earlier for:

  • Training
  • Testing
  • Profiling

3. Deploy the successfully trained AI component:

  • Changes in preparation for the current application architecture
  • Codebase adaptation for the new AI feature

Depending on the project type, adaptation of the codebase may lead to:

  • Changes to the database architecture for simplification and speeding up the AI module’s access to it
  • Changes to the microservice topology for video/audio processing
  • Changes to mobile application minimum system requirements

PoC Stage Estimation

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.

PoC Estimation

#5: New Iteration and/or Production

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.

Get Started!

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.

Tweet

Share

Share

Email

  • Artificial Intelligence
  • Data Analytics
  • Machine Learning

  • Artificial Intelligence
  • Data Analytics
  • IoT Business Strategy
  • Machine Learning

参考译文
面向企业主的AI应用开发指南
要开始深入研究AI应用程序开发过程,首先要了解这些项目与常规应用程序开发项目有何不同。在AI领域,每一个问题都需要一个独特的解决方案,即使该公司已经开发了类似的项目。一方面,有各种预先训练的模型和验证的方法来构建AI。此外,AI的独特之处在于它基于不同的数据和业务案例。正因为如此,AI工程师往往从深入研究业务案例和可用数据开始,探索现有的方法和模型。由于这些方面的原因,AI项目创建更接近于科学研究,而不是经典的软件开发。让我们探讨一下为什么会这样,以及理解这一现实如何帮助您准备执行这些过程和项目预算。人工智能项目可以分为四组:人工智能项目开发环境可以被可视化为一个由技术和现成的解决方案组成的三层金字塔。上层包含适合AI使用的现成产品——比如第三方库或经过验证的公司解决方案。例如,谷歌用于检测支票欺诈、面部识别和对象检测的解决方案就是很好的例子。第二个层次包括描述业务挑战的新利基。我们可能有合适的模式来解决这一挑战,但这项技术需要稍加修改或调整,以证明其在实施过程中的有效性。该模型被认为是针对其特定的用例而专门的,这导致了AI使用中的一个新利基的出现。科学研究是底层。在这里,我们可能会发现一些论文和新的模型——让我们以GPT-3为例。科学研究还没有准备好生产,因为我们不知道这些模型的结果会证明什么。这是人工智能系统的一个深层层面,尽管我们可以朝这个方向努力。使用人工智能的应用程序开发与非人工智能应用程序没有本质上的区别,但包含了PoC(概念证明)和演示。当演示和AI组件准备好时,BA阶段和UI/UX阶段就开始了。当应用程序开发公司接到创建人工智能应用程序的任务时,首先要做的是询问客户的需求和数据:人工智能是产品的核心还是一个额外的组件?这个问题的答案将影响解决方案的复杂程度。客户可能不需要最准确和最现代的解决方案。因此,重要的是要找出缺乏AI组件是否会阻碍成熟的产品开发,以及在没有AI组件的情况下创造产品是否有任何意义。这件事解决后,我们就可以继续了。一开始,我们可以将AI项目分为两个子类:因此,您决定从头开始开发一个新的AI功能应用程序。正因为如此,你没有任何基础设施来集成AI应用。这里我们来到了最重要的问题:AI功能开发是否可以像处理普通应用功能(如登录/注销或发送/接收消息和照片)一样处理?乍一看,人工智能只是一个用户可以与之互动的功能。例如,人工智能可以用来检测一条消息是否应该被认为是垃圾邮件,识别照片中人脸的微笑,以及通过人脸和语音识别实现基于人工智能的登录。然而,人工智能解决方案的发展还很年轻,而且是基于研究的。这导致我们认识到,应用程序的AI功能是整个项目中风险最大的部分,特别是如果业务目标需要提出一个创新和复杂的AI解决方案。 让我们考虑一个小例子。您想建立一个聊天应用程序与登录/注销屏幕,消息系统,和视频通话。视频通话应该支持类似snapchat的过滤器。这是一个风险表和不同功能的应用程序的复杂性的概述:很明显,从风险最小化策略的角度来看,从复杂性和风险最低的任务开始开发过程是不合理的。你可能会问,为什么类似snapchat的滤镜风险最大?这里有一个简单的答案:要创建一个类似snapchat的过滤器,你必须涉及到许多前沿技术,如AR和深度学习,将它们适当地混合在一起,并将它们安装在计算资源较低的手机上。要做到这一点,你必须解决很多非凡的工程任务。这就是为什么从头开始的AI应用程序开发有一个非常具体的PoC结构,这将在本文的“PoC开发阶段”一节中进一步讨论。将AI功能整合到现有项目中与从头构建AI应用有一些不同。首先,通常情况下,我们必须用AI来增强的现有项目都是在没有任何架构上考虑AI功能的情况下开发的。考虑到AI功能是数据管道的一部分,我们得出的结论是,AI功能的开发肯定需要至少对应用程序架构进行一些更改。从AI的角度来看,现有的应用可以分为以下几种:DB Based Projects:Non-DB Based Projects:让我们回顾一下典型的AI应用开发过程是如何在五个阶段中成长的。在第一阶段,我们获得客户的输入或愿景,这可以作为一个文档与总体想法概述。在这里,我们开始业务分析流程。为了准备输入,我们需要考虑业务问题。业务解决了应用开发公司的业务问题,后者的工作是找到业务和AI能力的交叉点。例如,在餐馆或杂货店连锁店,企业主对减少食物浪费感兴趣,并通过分析采购和销售达到平衡。对于AI工程师来说,这个任务变成了时间序列预测或关系分析任务,其解决方案可以让我们预测具体的数字。下一阶段是确定应该讨论和解决的ML(机器学习)问题。这必须考虑到人工智能子领域的技术能力,如计算机视觉、自然语言处理、语音识别、预测、生成人工智能等。数据是机器学习的燃料,是人工智能应用开发的关键一步。有两种主要的数据类型—特定的和通用的。一般的数据可以从开源数据网站获得,所以我们所要做的就是缩小目标受众的范围,把重点放在特定的地区、性别、年龄或其他关键因素上。大量的通用数据可以简化这个过程。因此,如果客户端有一个基于健身手环活动的app,我们可以应用数据和迁移学习,以最快的速度开始实施。同样的道理也适用于图像分类,因为一开始就有大量的集合。另一种情况是缺乏可用数据,数据与目标受众不可调和,或者需要特定业务生成的数据—例如,特定业务的销售统计数据或装配线的缺陷检测列表。如果客户端没有数据,却打算实现AI组件,该怎么办?有六个来源可以提取数据。数据在人工智能项目中的作用不应被削弱。一个算法的工作效率取决于数据,所以输入的巨大量使它更准确。 下一步是概述可以显著不同的业务和技术指标。企业所有者可能会怀疑项目的准确性是否足够。人工智能工程师并不总是准备好回答这个问题,因为它可能是一个新的利基。这就是PoC发挥作用的地方,它显示了可以获得的最小精度。最引人注目的是,二元决策的准确率为50%,就像抛硬币一样。让我们来看看客户需要减少食物浪费的第一个例子。通过将业务问题转化为技术解决方案,我们得出了需要预测购买的结论,因此度量MAPE(平均绝对百分比误差)将是最优的。第二个例子是安全登录,相等的错误率(EER)是业务度量。EER对应于误接受率和误拒绝率相等。第三个例子是一个分类问题,对于这个问题,正确识别的实体的准确性可以作为一个业务指标。通过对实体进行分类,我们可以考虑带有垃圾邮件的文本、带有猫的图像、员工是否戴着面具等。工程师们可以自由地使用相同的度量标准,或者让任务稍微复杂一点,并为演示目的应用F1分数。在开始使用PoC之前要定义的下一个点是限制。这是非功能性需求,可以在以后的实现过程中变得清晰。PoC必须基于一个假设并解决一个特定的任务。安全限制的说明是必须模糊背景中人物背后的一切。一旦输入准备好了,AI团队就开始进行PoC、指标、结果测量和演示。报告可以与演示并行,描述调查,陷阱,确认或否认假设。PoC中包含的每一项研究都附有一份报告:已经发现了什么,未来可以做什么,以及哪些信息已经变得清晰,应该在下一次迭代中考虑。虽然与产品类似,但PoC实际上还没有准备好使用。如果演示适合客户,可以将其转换为产品。重要的是要意识到,除了AI工程师之外,对于成熟的产品开发,我们需要其他专家——前端、后端和移动开发人员,等等。一个全新AI项目的PoC阶段应该以AI为中心。这是什么意思?为了实现风险最小化策略,我们应该从项目中最具风险的部分开始,即AI功能,如果可能的话,不要触及项目的任何其他功能。根据CRISP-DM, PoC阶段可以重复多次以获得合适的结果。在取得满意的结果后,我们可以自由地进入MVP/工业化阶段,开发应用程序的所有剩余功能。为了让最终用户能够使用AI功能,我们首先必须开发该功能,然后将其与现有的应用程序集成。即,使用应用程序代码库、体系结构和基础设施。AI功能最吸引人的地方在于,它们可以在不触及主应用程序的情况下进行研究、开发和测试。这让我们想到,我们可以启动人工智能隔离的PoC,而对主要应用没有风险。这实际上是风险最小化策略的本质。以下是三个步骤:通过以下方式从现有应用程序收集数据:3.使用之前收集的数据构建一个隔离的AI环境:部署成功训练的AI组件:根据项目类型,代码库的调整可能会导致: 业务所有者经常询问软件供应商关于预算、时间表和PoC阶段可能需要的工作。正如我们上面所展示的,与常规开发过程相比,AI项目的特点是具有高度的不可预测性。这是由于任务类型、数据集、方法和技术的高度可变性造成的。所有这些条件解释了为什么对一个假设的项目进行评估是一项相当困难的任务。尽管如此,我们已经根据项目的复杂程度展示了上述AI项目的一种可能的分类。下表显示了对不同复杂程度的项目的粗略估计。请记住,表中的估计可能会因项目类型和数据集属性的不同而有很大的差异。这些数字是针对一次CRISP-DM迭代给出的。第一次PoC之后的下一步可以是新的PoC迭代,并进行进一步的改进或部署。创建一个新的PoC意味着数据添加、案例处理、错误分析等。迭代的次数是有条件的,并且取决于项目。任何人工智能项目都与风险直接相关。我们可能面临来自数据适用性的风险,以及算法或实现的风险。为了降低风险,只有当AI组件的准确性满足企业的目标和期望时才开始产品开发是明智的。
您觉得本篇内容如何
评分

评论

您需要登录才可以回复|注册

提交评论

提取码
复制提取码
点击跳转至百度网盘