NIUBOYI»Home › › Explore AI, Master AI › 中文 | English
微信扫一扫 分享朋友圈

已有 1323 人浏览分享

了解AI 玩转AI    A Self-Study Manual for LLM Prompt Engineering: From Beginner to Expert

2024-11-30 13:19:531323 0
The prompts for a host of natural language large models—ChatGPT, Doubao, Baidu Wenxin, and other LLMs (language large models)—are all universal. Therefore, as long as we learn the principles of prompt engineering, we can apply them well in any LLM. Learning prompt engineering well is not about how many techniques you learn, but about how much you understand LLMs. The whole usage process is just a conversation.

So using an LLM well boils down to two questions: first, what it knows; second, making it understand and expressing yourself correctly.

I. What It Knows
The most powerful product among LLMs is ChatGPT. It already knows 60% of human knowledge, so it really knows a lot. Whether you can use it well depends on how you guide it. The other 40% it does not know, and what it doesn't know is non-public data, such as companies' money-making secrets, industry secrets, and practical industry experience.

Your cognitive gaps include the four situations shown in the figure below, so you need to master four communication methods.

160904txwyfy1x5zd9dq11.png

The open area is knowledge you both know; you mainly discuss the application of knowledge.
The knowledge-seeking area is what you don't know but it knows, so how you ask becomes extremely important; you must first be able to describe the problem accurately.
The private area is what you know but it doesn't; if you want it to help you, you must first teach it.
The exploration area is what neither of you knows; then you must use what is known to deduce the unknown together.

II. Make It Understand
The capabilities of LLM large models are relatively limited. It has no IQ. Therefore, it won't be like communication between humans, where even if I say something wrong you still know what I mean, and even if I fail to express myself clearly you still know what I mean. Human-computer interaction can only work when you express accurately and express completely for it to understand. Only by doing these two things well can you ensure it understands what you say.

Let's take article writing as an example
I have a student who sells milk powder. He wants to use a WeChat Official Account to acquire customers, but he doesn't know how to write articles. He knows AI can write articles.

His prompt was: Help me write an article titled “Should a Two-Year-Old Baby Still Drink Milk Powder?”
微信截图_20241130160803.png
At first glance, it seems okay, but if you were a user, would you read it? If you read it, would you follow him? Would you contact him to buy milk powder? Obviously, it doesn't meet expectations. Such articles are everywhere, and no one reads them at all. So how do you keep users reading, how do you make them follow you after reading, and make them want to contact you to buy milk powder? Only professional copywriters know. For any form of copy or article, the writing order must be: first have a theme, then confirm a framework template, and refine within that framework; only then can it have a good guiding effect.

Improved prompt: I want to write an article to publish on a WeChat Official Account. The theme is “Should a Two-Year-Old Baby Still Drink Milk Powder?” The purpose of the article is to attract the attention of mothers. Pay attention to making the title and opening attractive, with a clear overall framework that looks very clear and pleasing. I need to use this framework to guide mothers step by step to keep reading, ultimately follow me and become my fans, and contact me to buy milk powder. My milk powder brand is XXX, the selling point is XXX, and the basic product information is XXX. Now please conceive a copy framework for me and tell me what method you use at each step to achieve the goal.

微信截图_20241130163104.png
微信截图_20241130163153.png

The result came out. Obviously, it designed according to my method, but the implementation was very outdated. Take the title in the example: it wanted to arouse curiosity through a question and use experts to enhance trust and arouse readers' interest. Obviously, this method has long stopped working for us.

微信截图_20241130163438.png
This is the private area I mentioned earlier. It has no practical experience and doesn't know which methods are really good. This content already counts as a traffic code and belongs to industry secrets, so it doesn't know which methods will really be effective and really attract readers to keep reading.
So the communication method in the private area is: you need to teach it; you give it the method. Next, let's give it a try.
Optimized prompt: The title doesn't work; it's not attractive enough and is a bit outdated. Now I'll tell you a new method: the first half describes the problem and hits the pain point, and the second half is the solution and effect. Try generating 10 titles first, with a down-to-earth and sharp style.
微信截图_20241130165251.png
  • WeChat Official Account

  • Scan to Visit Mobile Site

QQ|NIUBOYI ( 京ICP备17025393号 )|网站地图

GMT+8, 2026-10-30 19:45 , Processed in 0.348931 second(s), 40 queries .

POWERED BY NIUBOYIAI! 主理人:NIUBOYIAI  点亮哥

Copyright © 2001-2020, NIUBOYI AI.