What is AI?
Discover exactly what AI, ML and LLM are.
Before we start looking at specifics, let’s examine some terminology. According to John McCarthy of the computer science department at Stanford University, artificial intelligence (AI) is “the science and engineering of making intelligent machines, especially intelligent computer programs”. This definition is incredibly broad, which goes to show what a massive field AI is. Intelligence can mean many things, of course, but the sometimes unreliable Wikipedia states: “Artificial intelligence is intelligence – perceiving, synthesising and inferring information – demonstrated by machines, as opposed to intelligence displayed by humans or by other animals. Intelligence encompasses the ability to learn and to reason, to generalise and to infer meaning.”
Ghost in the machine
The Cambridge Dictionary defines machine learning (ML) as “the process of computers changing the way they carry out tasks by learning from new data, without a human being needing to give instructions in the form of a program”. This covers the ability to ingest huge amounts of information and find patterns. The pattern discovery allows the program to improve its knowledge of a particular topic as time goes by. As human beings, we can take information from many sources and many different contexts ,and our incredible brains can make sense of it all to create a nuanced understanding of a subject. As ML algorithms become more powerful, they improve their knowledge in similar ways to humans.
Deep learning is a technique used within the machine-learning field. It uses neural networks to process information; this model takes its inspiration from the human brain and how neurons are connected.
Finally, the large language model (LLM) is a methodology used to take an input of a sentence or paragraph and use it to provide the computer with instructions. LLMs are trained on huge amounts of language data. If you ask your smart speaker, “Please can you tell me what the ingredients are in lemonade?”, what the computer processing this question actually needs to know is “Lemonade ingredients”.
Definitions out of the way, let’s have a look at some possible uses of artificial intelligence and how they can benefit us. Over the last year or two, a myriad of tools have been released that can aid a programmer’s dayto-day life. What the tools can’t do, at the moment at least (thankfully), is completely replace a programmer. First, we are going to cover how to take code that has been generated by an ML tool and work through how to debug what’s going on, so we can have automatically generated code that we can ensure works as expected.
Next, we will cover how to use Copilot to suggest changes to code and make adding simple stanzas as easy as possible. Again, we can’t assume that Copilot will be 100% correct 100% of the time, so this is for us to test and ensure we’re happy with the functionality.
Finally, we’ll look at a command-line tool that gives access to ChatGPT. This gives access to the shell, with an LLM that allows us to convert files, speed up videos and other tasks, using only natural language, and the ML algorithm will generate the necessary command-line arguments to perform the job.