How Does Prompt Engineering Direct an AI Model?
Experts say that getting better answers out of AI requires a basic understanding of how large language models work. LLMs are platforms that can recognize and generate text and are educated by consuming enormous data sets and assessing past performance.
“An LLM is a computer program that has been fed enough examples to be able to recognize and interpret human language or other types of complex data,” says Cloudflare. “Many LLMs are trained on data that has been gathered from the Internet — thousands or millions of gigabytes’ worth of text.”
Central to the technology is the concept of foundation models, which are rapidly broadening the functionality of AI. While earlier AI platforms were trained on specific data sets to produce a focused but limited output, the new approach throws the doors wide open.
In simple — and somewhat unsettling — terms, a foundation model can learn new tricks from unrelated data.
“What makes these new systems foundation models is that they, as the name suggests, can be the foundation for many applications of the AI model,” says IBM. “Using self-supervised learning and transfer learning, the model can apply information it’s learnt about one situation to another.”
Given the massive amounts of data fed into AI models, it isn’t surprising that they need guidance to produce usable output.
“Machine learning is a mathematical parlor trick,” says Mike Miller, director of product management for Amazon Web Services. “Prompt engineering may seem simple on the surface, but it requires quite a bit of nuance.”
READ MORE: Officials turn to synthetic data to train AI.
How to Write Better Prompts
Experts agree that the keys to a successful prompt are clarity and precision.
“It’s like telling high school students what to do,” says Yoon Kim, an assistant professor at the Massachusetts Institute of Technology. “Give them as much instruction as possible.”
Though popular AI platforms can respond to “zero-shot” queries (with no examples or context), the results can be underwhelming. A “one-shot” command that provides a key piece of information helps focus the result.