Artificial Intelligence vs Machine Learning
Machine learning (ML) and artificial intelligence (AI) are closely related fields, but they are not identical.
- Artificial Intelligence (AI) is a broad field of computer science focused on creating systems capable of performing tasks that typically require human intelligence. These tasks include reasoning, learning, problem-solving, perception, and language understanding.
- Machine Learning (ML) is a subset of AI that involves the development of algorithms and statistical models that enable computers to learn from and make predictions or decisions based on data. Instead of being explicitly programmed to perform a task, ML systems improve their performance through experience.
Artificial Intelligence - Retrieval Augmented Generation (RAG)
In this first example we consider a RAG system and one of the key underlying components is a large language model (LLM). An LLM, or Large Language Model, is a type of artificial intelligence model that is designed to understand and generate human-like text. These models are trained on vast amounts of text data from various sources, allowing them to learn patterns, structures, and nuances of human language. Some well-known examples of LLMs include OpenAI’s GPT-3 and GPT-4.
A company may be rich in information, much of it is proprietary, and is distributed across many thousands of documents, such as email, Word, PowerPoint and PDF files. The challenge here is that although it is rich in information it lacks the ability to readily retrieve such information in response to a query from a user. Although RAG has some similarities with keyword searches it has a number of advantages as it:
- Can handle natural language queries, making it more user-friendly.
- Capable of synthesizing information from multiple documents to provide a comprehensive answer.
- More effective in dealing with complex queries and nuanced information needs.
As a practical example, a RAG system had ingested a number of technical documents in pdf format concerning the operations of several software products. The user subsequently asked the question: “Give me two examples of a raw data query”
The RAG system responded with:
Example #1: Retrieving All Bad Samples Over the Last Day (Interpolated Data)
SELECT timestamp, tagname, value, quality FROM ihRawData WHERE samplingmode=rawbytime AND Quality NOT LIKE good* AND timestamp>=Now-24H
Example #2: Retrieving All Bad Samples Over the Last Day
SELECT timestamp, tagname, value, quality FROM ihRawData WHERE tagname=dFloatTag5 AND samplingmode=trend AND intervalmilliseconds=24h AND timestamp>=’1/01/2003 07:00:00′ AND timestamp<=’1/10/2003 12:00:00′
Supervised Machine Learning - Process Automation
In this example we will consider a supervised machine learning model in which we are monitoring a process with the intention of either predicting or classifying an outcome.
It is assumed that there is significant process history available in a historian which can be used for training purposes. Once the model is trained its learning can be supplemented by the addition of process rules provided by the SME.
Thereafter it can be deployed in an advisory capacity to make recommendations concerning process control parameters with values being direct read from the control system via OPC. Alternatively its output can be directly linked into the automation system. In a further enhancement it could be combined with an optimiser with constraints. For example, maximise a product output whilst ensuring that a quality specification was achieved.