2

Prompt Strategy

Introduction

In the previous chapter, we gave some historical context to how AI has developed over the years, how we’ve gone from natural language processing (NLP) to large language models (LLMs), and how the latter serves as the underlying machine learning model in AI assistants. To use these AI assistants, you use natural language prompts as input. However, to ensure you “prompt” in an efficient way, so that you get what you want, it’s important to have a strategy, and that’s what this chapter aims to give you.

How to “prompt” efficiently is commonly known in the industry as a “prompt strategy” or “prompt engineering.” It’s not an engineering practice in the common sense of the word but rather an art form where practitioners ...

Get AI-Assisted Programming for Web and Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.