A.I. CODING
Matt Holder spends some time discovering how AI, ML and LLM can be used to help us with our programming – and, yes, he explains what the acronyms mean as well…
Science fiction has been dreaming up stories about artificial intelligence for decades now, covering everything from robots performing household chores through to the
computer systems in
Star
Trek. Meanwhile back on Earth, scientific research within the vast field of artificial intelligence has been ongoing for the past 60 years or so.
One of the best-known applications of artificial intelligence and machine learning is the digital assistant, as launched with the iPhone 4S in the early 2010s. Over the last few years, though, we have seen an explosion of tools that use various aspects of artificial intelligence. These cover a vast range of areas, from image recognition, audio processing, the creation of deep fake videos and digital assistants all the way through to the coding tools we are going to discuss today.
We are looking at artificial intelligence (AI), machine learning (ML) and large language models (LLMs), and how they can be used to improve our professional lives. Programming is a vast field, with a huge range of languages, each of which is best used in a different area. For example, JavaScript is used to add interactivity to websites and can also be used for server-side code, using Node. Python is incredibly popular in data science, while C is excellent for work that needs to interact directly with kernels. The tools we are going to discuss here are designed to help programmers write code and test it for security issues. They are not, however, infallible and care needs to be taken when using them, as we’ll discover…
What is AI?
Discover exactly what AI, ML and LLM are.
Before we start looking at specifics, let’s examine B 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.