Prompt engineering

Prompt engineering is the process of structuring an instruction that can be interpreted and understood by a generative artificial intelligence (AI) model.[1][2]

A prompt is natural language text describing the task that an AI should perform.[3] A prompt for a text-to-text language model can be a query such as "what is Fermat's little theorem?",[4] a command such as "write a poem in the style of Edgar Allan Poe about leaves falling",[5] or a longer statement including context, instructions,[6] and conversation history. Prompt engineering may involve phrasing a query, specifying a style,[5] choice of words and grammar,[7] providing relevant context,[8] or assigning a role to the AI such as "act as a native French speaker".[9]

When communicating with a text-to-image or a text-to-audio model, a typical prompt is a description of a desired output such as "a high-quality photo of an astronaut riding a horse"[10] or "Lo-fi slow BPM electro chill with organic samples".[11] Prompting a text-to-image model may involve adding, removing, emphasizing, and re-ordering words to achieve a desired subject, style,[1] layout, lighting,[12] and aesthetic.

  1. ^ a b Diab, Mohamad; Herrera, Julian; Chernow, Bob (October 28, 2022). "Stable Diffusion Prompt Book" (PDF). Retrieved August 7, 2023. Prompt engineering is the process of structuring words that can be interpreted and understood by a text-to-image model. Think of it as the language you need to speak in order to tell an AI model what to draw.
  2. ^ Ziegler, Albert; Berryman, John (July 17, 2023). "A developer's guide to prompt engineering and LLMs". The GitHub Blog. Prompt engineering is the art of communicating with a generative AI model.
  3. ^ Radford, Alec; Wu, Jeffrey; Child, Rewon; Luan, David; Amodei, Dario; Sutskever, Ilya (2019). "Language Models are Unsupervised Multitask Learners" (PDF). OpenAI. We demonstrate language models can perform down-stream tasks in a zero-shot setting – without any parameter or architecture modification
  4. ^ "Introducing ChatGPT". OpenAI Blog. November 30, 2022. Retrieved August 16, 2023. what is the fermat's little theorem
  5. ^ a b Robinson, Reid (August 3, 2023). "How to write an effective GPT-3 or GPT-4 prompt". Zapier. Retrieved August 14, 2023. "Basic prompt: 'Write a poem about leaves falling.' Better prompt: 'Write a poem in the style of Edgar Allan Poe about leaves falling.'
  6. ^ Gouws-Stewart, Natasha (June 16, 2023). "The ultimate guide to prompt engineering your GPT-3.5-Turbo model". masterofcode.com.
  7. ^ Wahle, Jan Philip; Ruas, Terry; Xu, Yang; Gipp, Bela (2024). "Paraphrase Types Elicit Prompt Engineering Capabilities". In Al-Onaizan, Yaser; Bansal, Mohit; Chen, Yun-Nung (eds.). Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing. Miami, Florida, USA: Association for Computational Linguistics. pp. 11004–11033. arXiv:2406.19898. doi:10.18653/v1/2024.emnlp-main.617.
  8. ^ Greenberg, J., Laura (May 31, 2023). "How to Prime and Prompt ChatGPT for More Reliable Contract Drafting Support". contractnerds.com. Retrieved July 24, 2023.
  9. ^ "GPT Best Practices". OpenAI. Retrieved August 16, 2023.
  10. ^ Heaven, Will Douglas (April 6, 2022). "This horse-riding astronaut is a milestone on AI's long road towards understanding". MIT Technology Review. Retrieved August 14, 2023.
  11. ^ Wiggers, Kyle (June 12, 2023). "Meta open sources an AI-powered music generator". TechCrunch. Retrieved August 15, 2023. Next, I gave a more complicated prompt to attempt to throw MusicGen for a loop: "Lo-fi slow BPM electro chill with organic samples."
  12. ^ "How to Write AI Photoshoot Prompts: A Guide for Better Product Photos". claid.ai. June 12, 2023. Retrieved June 12, 2023.

From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne