Skip to main content
Practice

How to Write Prompts That Get the Right Answer on the First Try

Writing inefficient prompts can result in AI not providing the desired answers, wasting your precious time.

To write good prompts for obtaining the right answer in one go, consider the following four main aspects when crafting your prompts.


1. Clearly Specify Numbers, Locations, and Timeframes in Your Prompt

Just like when giving instructions to people, you need to be as specific as possible when tasking AI with a job.

To achieve clear and accurate results, specify timeframes, locations, and the number of results you desire in your prompt.

Bad Prompt Example
Recommend a good book.
Good Prompt Example
Recommend 3 self-help books published in 2023 in the United States with high sales.

In the good prompt example, the time is specified as 2023, location is United States, and the number of results is 3 books.


2. Include Example Answers

Provide example answers to clearly convey the format and type of response you expect.

Bad Prompt Example
Plan out a website development project.
Good Prompt Example
Create a development plan for a company introduction website following this format:

1. Project Overview: Description of the project's purpose and scope
2. Major Phases: Key tasks and estimated time for each development phase
3. Resources and Budget: Summary of needed personnel and budget

Example:
1. Project Overview: Redesign the existing e-commerce website and optimize the server for a smooth user experience
2. Major Phases:
- Requirements Gathering: Conduct interviews with clients and stakeholders (1 week)
- Design: Create UI/UX design and prototype (2 weeks)
- Development: Frontend and backend development (4 weeks)
3. Resources and Budget:
- Personnel: 1 frontend developer, 1 backend developer, 1 designer
- Budget: $50,000

3. Use Separators

Enhance readability by using separators to distinguish important information or text blocks.

Bad Prompt Example
Translate into English
If this technology is successfully implemented, it can be widely used across various industries.
We hope this brings positive changes to society as a whole.
Good Prompt Example
### Instructions
You are a professional translator.
Translate the text below into English and highlight "3" key English words.

### Text to Translate
"""
If this technology is successfully implemented, it can be widely used across various industries.
We hope this brings positive changes to society as a whole.
"""

### Translation Result
[Insert translation here]

### Key English Words
[Insert key words here]

In the above example, ### separates each section, and the placeholders for the translation result and key word explanation are marked with [ ].

Triple quotes """ can be used to denote a block of quoted text or to emphasize specific words like "3".


4. Set Length Limitations or Goals

Limit the length of the answer or set specific goals to encourage clear and concise responses.

Bad Prompt Example
Explain the severity of population decline due to low birth rates.
Good Prompt Example
Explain the severity of population decline due to low birth rates in 200 characters or less.

By using these four points, you can obtain the answers you want more easily.

From the next chapter, we will dive deeper into each point.


Practice

Submit prompt examples and compare AI's responses.

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.