Skip to Content
Generative AI in Action
book

Generative AI in Action

by Amit Bahree
November 2024
Intermediate to advanced
464 pages
14h 38m
English
Manning Publications
Content preview from Generative AI in Action

6 Guide to prompt engineering

This chapter covers

  • Basics of prompt engineering and core concepts
  • Various prompt engineering techniques, including image prompting
  • New threat vectors called prompt hijacking
  • Challenges and best practices for prompt engineering

Many of the generative AI models described in previous chapters are prompt based—the large language models (LLMs) from OpenAI, text-to-image models, Stable Diffusion, and others. We interact with these models using a prompt, and at least at the base of LLMs, they respond with a prompt. Prompts are the main modality of talking to these models, which makes understanding and crafting prompts quite important.

Prompt engineering is a new technique that optimizes the performance of generative ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Generative AI with LangChain

Generative AI with LangChain

Ben Auffarth
Introduction to Generative AI

Introduction to Generative AI

Numa Dhamani, Maggie Engler

Publisher Resources

ISBN: 9781633436947Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link