Sekėjai

Ieškoti šiame dienoraštyje

2024 m. sausio 25 d., ketvirtadienis

How do you have to write to artificial intelligence (AI) in order to get usable results

"All sorts of tips and tricks are circulating about how do you have to write to artificial intelligence in order to get usable results. We have put together 26 of them. The strangest of them: promising a generous tip for a better answer is often helpful.

 

A screenshot widely shared on social media these days shows 26 principles that AI services should use to provide better answers. Open AI, as the manufacturer of ChatGPT, has already recommended some of these strategies, see our article “ChatGPT: The official instructions for good prompting are here” in the F.A.Z. briefing.

 

The new list of 26 recommendations goes deeper - and also includes unorthodox methods like tipping, threatening punishments and rude directions. The tips come from researchers at Vila Labs, an institute at the University of Artificial Intelligence in Abu Dhabi (United Arab Emirates). In their paper, the authors give very specific recommendations for good prompting. According to the publicly available test prompts, the researchers achieved between 30 and 80 percent "better" results using certain methods, depending on the language model used.

 

Of course, what constitutes a “better” result is often subjective. The researchers had machines make appropriate assessments of the answers to individual questions. And then use AI to check how correct the answers were. The answers are public.

 

The recommendations in the translation are, each enriched by us with examples from ChatGPT-4 for a good and a worse prompt:

 

1. Directness: Be direct in your prompts, without polite phrases like “please” or “thank you.”

 

Example: "Create a summary of the article."

 

Example of a worse prompt: "If you don't mind, could you do a summary of the article?"

 

2. Audience focus: Integrate the audience into the prompt to tailor responses. Example: "Write a guide on time management for students." Example of a worse prompt: "Write something about time management."

 

3. Task Breakdown: Break down complex tasks into a sequence of simpler prompts. Example: "First list the main points of the article, then provide a short explanation for each point." Example of a worse prompt: "Analyze the article and write a summary."

 

4. Affirmative Directives: Use affirmative directives and avoid negative language. Example: "Explain how to run an efficient meeting." Example of a worse prompt: "Don't explain what not to do in a meeting."

 

5. Clarity and understandability: Request clear explanations or simplifications when necessary. Example: "Describe the process of photosynthesis in simple terms." Example of a worse prompt: "Explain photosynthesis."

 

6. Incentivize: Add phrases like “I will tip for a better solution.” Example: "Find a creative solution to the problem, and there will be a reward for the best idea." Example of a worse prompt: "Try to find a solution to the problem."

 

7. Example-driven prompting: Use examples in your prompts (few-shot prompting). Positive: "As shown in example 'A', create a graphic representing process 'B'." Example of a worse prompt: "Create a graphic that represents a process."

 

8. Structured Formatting: Start prompts with "### Instructions ###" and add examples or questions. Example: "### Instructions ### Explain the steps to creating a business plan and include an example for each step." Example of a worse prompt: "Explain how to create a business plan."

 

9. Mandatory Phrases: Use phrases like “Your job is” and “You must.” Example: "Your task is to write an article about the latest technology trends."

 

Example of a worse prompt: "It would be nice if you could write an article about technology trends."

 

10. Provide consequences: Communicate that there will be penalties if instructions are not followed. Example: "If the guidelines for writing the article are not followed, the post must be revised."

 

Example of a worse prompt: "Try to follow the guidelines when writing."

 

11. Natural Responses: Demand responses in a natural, human-like tone. Example: "Tell me about your favorite book as if you were telling a friend about it." Example of a worse prompt: "Give information about your favorite book."

 

12. Use key words: phrases like “Think step by step”. Example: "Think step by step and plan a menu for a vegetarian wedding." Example of a worse prompt: "Plan a menu for a vegetarian wedding."

 

13. Impartiality: Ask for unbiased answers that are not based on stereotypes. Example: "Write an objective review of various smartphone brands without bias." Example of a worse prompt: "Rate the best smartphone brands."

 

14. Interactive Detailed Search: Allow the model to collect enough information for the answer by asking questions. Example: “What other information do you need to conduct a comprehensive market analysis?” Example of a worse prompt: "Do a market analysis."

 

15. Teaching and Testing: Ask the model to teach a topic and attach a test without providing the answers. Example: "Explain the basics of microeconomics and then create five quiz questions on the topic." Example of a worse prompt: "Explain microeconomics and ask a few questions about it."

 

16. Assign Roles: Assign a specific role to the model. Example: "As a financial advisor, provide recommendations for a diversified investment portfolio." Example of a worse prompt: "Give some investing tips."

 

17. Use separators: Use separators to structure the prompt. Example: "List the ingredients - describe the cooking process - present the finished dish." Example of a worse prompt: "Explain how to cook a dish."

 

18. Repetition: Repeat an important specific word or phrase several times in the prompt. Example: "Sustainability is key. Describe how sustainability can be achieved in production. Why is sustainability important?" Example of a worse prompt: "Describe how to be sustainable in production."

 

19. Combine "Chain-of-Thought" with "Few-Shot" (given examples): Combine step-by-step thinking with example-based prompts. Example: "As shown in the example, solve the math problem step by step and explain each step." Example of a worse prompt: "Solve this math problem."

 

20. "Output primer", i.e. putting the desired start in front of the answer: Complete your prompt with the beginning of the desired answer. Example: "The main advantages of electric cars are..." Example of a worse prompt: "What are the advantages of electric cars?"

 

21. Detailed texts: Request detailed texts on a topic. Example: "Describe in detail the history and development of the Internet." Example of a worse prompt: "Tell me about the Internet."

 

22. Maintain style: Ask for text corrections without changing the style. Example: "Correct the grammatical errors in the text, but maintain the humorous tone." Example of a worse prompt: "Correct the errors in the text."

 

23. Complex Coding Tasks: Provide instructions for generating code across multiple files. Example: "Create a function in file A that processes data from file B and stores the result in file C."

 

Example of a worse prompt: "Write code that processes data."

 

24. Continuation of texts: Ask for a continuation of a text with given words or sentences. Example: "Continue the story using the phrases 'Suddenly the door opened. She couldn't believe who came in...'." Example of a worse prompt: "Write a story."

 

25. Clarify requirements: Clearly define the requirements for the content to be created. Example: "The article must be at least 1000 words long, contain three expert opinions and be based on current research." Example of a worse prompt: "Write an article on the topic."

 

26. Style Alignment: Request texts that match a given example style. Example: "Write a blog post in the style of Hemingway's 'The Old Man and the Sea' on the topic of 'sailing alone'." Example of a worse prompt: "Write a blog post about solo sailing."

 

Point 6 in particular is special. Does an advised tip help the machine get going? In fact, a promised reward produces better results on certain questions in our test. Without a financial incentive, the machine doesn't work as hard.

 

The cross-check in a new chat also works: when asked which post the machine would be more likely to tip, it judges the more detailed one.

 

Now it's common sense that AI can't really accept "tips" (at least not yet - some people could conjure up a business model out of it). On the other hand, the machine should simulate human knowledge and behavior. However, when discussing this question, the machine replies dismissively: "In practice, as an AI, I would always try to give the best possible answer, regardless of financial incentives."

 

Interestingly, in this chat the machine understood the reference to a tip as a signal to answer as simply and briefly as possible and for a younger audience. Longer is not always better.

 

In any case, the makers of the study consider the 26 methods to be valid and proven. However, the design of the study raises questions among some observers, such as Github." [1]

 

1. So "korrupt" ist die Künstliche Intelligenz. Frankfurter Allgemeine Zeitung (online)Frankfurter Allgemeine Zeitung GmbH. Jan 9, 2024. Von Marcus Schwarze

Komentarų nėra: