How to create an AI

Learn how to build real artificial intelligence that has practical applications in your business and can take the strain off human employees.

Senior Content Marketing Specialist

Dave Hitchins

Senior Content Marketing Specialist

For business leaders looking to introduce AI into their operations and customer service, it is important to understand the options that are available and to choose one that balances requirements, budget, and the resources that are available.  

There is then a process that needs to be stepped through to ensure that the AI technology solves the specific business problem that it was created for, and that it delivers actual value. The adage ‘using a hammer to crack a nut’ is very relevant here.

The diagram below demonstrates how you can drill down from the overarching field of data science right down to the specifics of deep learning.

Depending on the business problem or use case, the solution could come from any of the four areas. Always keeping the original business problem in mind during AI projects ensures that the final solution is fit for purpose and isn’t over engineered or unnecessarily complex (and expensive).

If we borrow a concept from lean manufacturing and Agile development methods, then creating a ‘minimum viable solution’ becomes the aim. Once the concept is proven, it can then be enriched and expanded to cover the entire use case.

Before we actually step through the process of creating an AI, it is well worth looking at each of the four concepts in a bit more detail and thinking about which business use cases they are best suited for.

Data science

Data science is a broad term for the study of data in all its forms in order to uncover patterns and insights that increase our understanding of the world. It combines machine learning, statistics, business intelligence, and computer programming to extract meaning from both structured and unstructured data. In the business context it helps people to organize and analyze data from a huge variety of sources to help make more informed decisions and provide customers with a better experience.

As a result of the digital revolution, data science professionals have become key assets for any business. Data engineers, machine learning specialists and AI data scientists are crucial to enable organizations to understand and capitalize on the data that they have at their disposal.  

Artificial intelligence

AI is the development of models and computer programs that are able to process and extract meaning from data, human language, images and video.  The ultimate aim is to enable machines to make informed decisions based on the information at hand, much like a human would. AI can be trained to recognize patterns, solve problems, and in the case of chatbots to communicate with people to provide a service.

You may not consider rule-based chatbots to have true intelligence, but a well-designed chatbot can take over many of the tasks in a business that were previously done by humans. Their strength is that they guide people to the information that they are looking for by applying a set of predefined rules. This ensures 24/7 availability and instant responses for customers.

More advanced bots that incorporate machine learning to adapt and improve over time as they get access to more data can undoubtably be classified as AI. Together with the speech recognition capability of our phones, the recommendation engines that direct our online shopping, or the autonomous vehicles that will soon be delivering our parcels, machine learning is becoming a normal part of our everyday lives.  

Machine learning

Machine learning as a concept really isn’t complicated. If you watch any toddler trying to walk for the first time they use the exact same process. After seeing their parents and older siblings doing it, they try to stand up, and if they fall, they will adjust their position and try again until they find their balance. They then move to the next stage of putting one foot in front of the other, unconsciously using the lessons that they have learned already.

Machines learn in the same way – by adapting and learning from any source made available and from their successes and failures until they have achieved their aim.

This learning can be categorized into three different types:

1. Supervised learning

In this type of learning the AI is ‘told’ how to classify data so that it can then classify it on its own. A bit like the toddler watching someone else walk to learn how to do it themselves. For example, if you provide the AI with a set of labeled images, for example cats, dogs, and hamsters, the model can be trained to identify the animals on its own from future unlabeled images. The more images the AI has access to, the better it will get.

2. Unsupervised learning

With this type of learning the AI analyzes data on its own and uses a variety of techniques to group data based on the patterns and similarities that it finds. If you feed our bunch of pet photos into the model it should be able to distinguish between dogs, cats, and hamsters – even though it doesn’t know the name for each animal. Unsupervised learning includes:

  • Clustering: Discovering distinct groupings in data (e.g. animals with a tail, or customers that have bought product x in the past).
  • Association: Finding patterns in data that can be used to form rules, for example people that buy product X always buy product Y too.

Just because images are clustered, doesn’t mean they are the same. More training required!

3. Reinforcement learning

Just like a bruised toddler trying to master walking, the AI learns from previous mistakes or successes. With no training dataset, problems are solved by the AI by taking inputs from the environment. Imagine it like a person learning to master a new open world video game. After getting killed by an Orc, the player learns to avoid taking the shortcut through the Orc Forest.

Deep Learning

Deep learning is a fascinating subset of machine learning that is enabling groundbreaking advances in fields of scientific research that require the analysis of huge and complex data sets.

It aims to simulate the human brain’s learning process using complex computer algorithms called neural networks to break down data step-by-step, and layer-by-layer. This enables computers to process vast amounts of data in near real time in order to make decisions, just like humans do without even realizing it.

Imagine them as interconnected networks of tiny decision-making units called artificial neurons. Information flows through the network, with each neuron receiving signals from connected neurons. The neuron processes these signals and sends an output to its neighbors. Just like synapses in our brain, these connections play a crucial role in learning and decision-making.

How to create AI in six steps

Whether you are creating artificial intelligence as part of your studies, or implementing an AI project to benefit your business, there is a proven process that you can follow to maximize your chances of success. We can summarize this in six steps:

1. Define Your AI project

Start by clearly defining the problem that you want the AI to help with. What are your goals and what would success look like? Just as important, define what will be excluded from your objectives. This helps you to avoid scope creep and increases the chances of getting actual benefits from the project.

Here are some examples of good starter projects with business applications or just a bit of fun to help you learn the concepts and process.

  • Build a chatbot: Create a conversational chatbot that can be deployed on your website or on a messaging app like WhatsApp or Messenger to answer frequently asked questions from customers. This will help you master the concepts of natural language processing (NLP) which is a subset of artificial intelligence concerned with using machine learning to help machines process and understand human language.
  • Create a product recommendation system: Implement a simple recommendation system that uses your customer database to predict the types of products that people browsing your website might be interested in. For example, people who bought X also bought Y, or people who may be looking to renew or upgrade a subscription.
  • Sentiment analysis tool: Build a tool that analyzes text inputs like customer emails or online reviews to determine the sentiment and trigger an appropriate automated response like an email or comment. Text analysis and natural language processing have many applications within a business setting so are well worth exploring.
  • Simple game AI: Design a game that uses gamification concepts to engage with customers by challenging them to compete against AI to complete a task. This is an excellent way to get an understanding of decision-making and game logic and their role in marketing.
  • Image recognition: Once you have mastered the basics why not challenge yourself to create an image recognition system that can classify products, objects or even animals. You’ll get a deeper understanding of the intricacies of computer vision and how image processing works.

Legs or hot dogs? Can your AI model tell the difference? (Hint: Sausages don’t normally have knees..)

2. Choose a suitable AI framework

Your use case and the type of AI that you are building will dictate the framework that you select. If you are building an NLP chatbot then you could choose a no-code chatbot building solution like our own Answers product. For more advanced use cases that require GenAI to formulate responses we can also help via our partnership with Azure OpenAI Service.  

For deep learning use cases, popular open-source AI frameworks that provide tools and libraries for creating and training AI models include TensorFlow, PyTorch, and scikit-learn.

3. Source and prepare data

Just as people need to go to school and university to learn and be successful at their jobs, so AI needs access to data in order to do the role it has been designed for. Again, the use case, type of AI, and the selected framework will dictate the type of data that is required. The better the quality and quantity of data that you can feed into your model, the more reliable and successful your AI system will be.

However, on a cautionary note – we have learned from brands that have been early adopters of GenAI technology that giving a model access to unlimited and unverified data might result in it providing incoherent, inaccurate and even offensive answers.

Broadly, there are two types of data that are used in the creation and training of AI models.

  • Structured data as the name suggests is neatly organized and indexed and is usually easily searchable. For example, a spreadsheet with columns for each data point would be considered structured. The same goes for standard relational databases which provide unambiguous and clear inputs for AI models.
  • Unstructured data is less easy to organize and may require some work to become usable as an input for an AI model. However, it is no less valuable and includes things like transcripts from audio calls, email trails, social media comments, or even CCTV video footage. Unstructured data will reflect the many variances in language, sentence structure and vocabulary used in a multi-cultural society and is crucial to create AI that is inclusive and a true reflection of the people it serves.

Before data is used it should be ‘cleaned’ to remove incomplete or nonsense data and to check for large scale duplication that may skew results.

4. Train your AI model

Unless you are a data scientist trained in AI modeling then you should use the tools provided by your chosen framework to train your AI model. Training takes time, and many iterations, but it’s a critical step in the process of creating an effective artificial intelligence.

5. Test your AI model

Before you start testing your AI model, you need to define what you want to achieve and how you will measure it. This will help you align your testing activities with your business objectives and user needs and avoid wasting time and resources on irrelevant or unrealistic tests.

Establish a baseline and a target for your metrics, such as accuracy, precision, recall, or error rate, and track your progress over time.

Here are a few tips for accurately evaluating your model’s performance:

  • Use test data that the model hasn’t seen before. Include outliers and nonsense data to see how the AI will respond. In the real-world people love to try and ‘trick’ AI into providing bad responses so make sure you have this covered.
  • Automate as many of your tests as much as possible so that they can be easily re-run so that you can both monitor improvements and trap any regression errors.
  • Get as many different people involved in testing as possible. In addition to getting people invested in the project, getting input from a variety of sources helps you to build AI that is representative and inclusive.
  • Make sure to document your tests so that you have a point of reference and can share processes, data, and test outcomes with other team members.

6. Deploy and monitor

Once you are comfortable to deploy your model in a real-world setting, you should come up with a plan for how you will monitor its behavior and make improvements over time. This is crucial for AI systems as they learn from real data and evolve over time.

Here are some factors to consider when creating your monitoring plan:

  • Data shifts: The world is dynamic – over time your model will see data that it hasn’t been trained to deal with. This can cause model performance to degrade over time in a process called model drift.
  • Bias: Ensure that all sub-groups and minority segments get fair and appropriate treatment by the model. You might need to alter your training data to cover a more diverse set of demographics.
  • System/operational health: Monitor the performance of the model in terms of speed, memory and CPU usage. A lot of this process can be automated with notifications generated when there is an anomaly.
  • Costs: This factor is often neglected, but it is crucial to ensure that your project doesn’t become more expensive than it is worth. AI projects can be heavy on human resources and along with all the new tools that are required for training and testing and the hosting costs – this can quickly ballon.

Learn more about creating AI from these free web resources

Check out our curated list of the best free AI courses available on the web.

Create your own chatbot with no coding required.

Sign up for a free trial.

Start now
May 1st, 2024
11 min read
Senior Content Marketing Specialist

Dave Hitchins

Senior Content Marketing Specialist