ByteByteGo 2024年11月27日
A Crash Course on Using AI to Save Time and Focus on What Matters
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了如何撰写有效的AI提示词,并分享了8个AI在工作中的实用案例。作者Peter Yang结合自身经验,总结出7个步骤帮助用户提升AI提示词的质量,包括明确AI角色和任务、提供具体指令、包含示例、使用XML标签等。此外,文章还列举了AI在工作中解决诸如Slack消息摘要、用户反馈总结、快速学习新知识、语音笔记转文字、提升写作清晰度、撰写文档、快速原型制作等问题的应用场景,并提供了相应的提示词示例。通过本文,读者可以学习到如何利用AI工具提升工作效率,解决日常工作中的痛点,节省时间专注于更重要的事情。

🤔 **明确AI角色和任务并提供具体指令:**例如,将AI设定为“专家编辑”,并指示其“仔细遵循以下步骤”。清晰的指令能让AI更好地理解用户的需求,并生成更符合预期的结果。

💡 **包含示例以提升AI理解能力:**在提示词中包含具体示例,例如“分析以下案例以理解我的写作风格”,能够帮助AI更好地理解用户的意图,从而生成更符合预期的输出。

🏷️ **使用XML标签优化提示词结构:**使用XML标签,例如“”和“”,可以将数据与指令清晰地区分开来,从而提高AI的响应质量,据称可以提升30%。

🔗 **利用“思维链”引导AI思考过程:**在提示词中加入“思维链”环节,例如“在标签中,描述你将进行的编辑要点”,可以引导AI进行更深入的思考,从而生成更优质的结果。

🔄 **请求多种输出版本:**在提示词中要求AI提供多种输出版本,例如“给我三个不同的版本”,可以帮助用户选择最符合需求的输出,并激发AI的创造力。

🚫 **设置约束条件:**在提示词中设置约束条件,例如“限制字数在500字以内”,可以帮助AI控制输出内容的范围,并提高输出质量。

🚀 **结合实际案例学习:**文章提供了8个AI在工作中的应用案例,包括Slack消息摘要、用户反馈总结、快速学习新知识等,并提供了相应的提示词示例,方便读者学习和借鉴。

✂️Cut your QA cycles down from hours to minutes with automated testing (Sponsored)

If slow QA processes bottleneck you or your software engineering team and you’re releasing slower because of it — you need to check out QA Wolf.

They get engineering teams to 80% automated end-to-end test coverage and helps them ship 5x faster by reducing QA cycles from hours to minutes.

QA Wolf takes testing off your plate. They can get you:

The result? Drata’s team of 80+ engineers achieved 4x more test cases and 86% faster QA cycles.

Schedule a demo to learn more


This is a guest post from my friend Peter Yang. Peter uses AI extensively to balance his full-time job, newsletter, and two kids, so I think you’ll love his practical tips:


Hey there! Peter here.

I've spent hundreds of hours experimenting with AI to save time at work. So today, I want to share an extremely practical guide with:

If you find this valuable, get my personal AI prompt library to help you save hours every week by copying what’s already working for me. Get 20% off the annual plan of my newsletter (until Black Friday) to unlock it and all my other AI guides.

Ok, enough Black Friday talk. Let’s dive in ?


7 steps to craft a great AI prompt

Here’s how I usually adopt AI at work:

    I start working on a super annoying and repetitive task.

    I try to use 1-line prompts to get AI to do the work for me.

    After struggling with lazy prompting, I finally decide to write a great prompt.

So, what makes a great AI prompt? Well, it usually includes these 7 steps:

    Give AI a specific role and task: e.g., “You’re an expert editor…your task is to…”

    Give specific instructions: e.g., “Follow these steps carefully…”

    Include examples: e.g., “Analyze the <examples> to understand my style…”

    Use XML tags for structure: e.g., “<data></data> and <prompt></prompt>.” Putting data before the instructions can improve AI’s response quality by 30%.

    Give AI space to think (chain of thought): e.g., “In <thinking> tags, describe the key aspects of the edits you will make.”

    Ask for variations: e.g., “Give me three variations.”

    Add constraints: e.g., “Limit to 500 words.”

For example, here’s a prompt that I use to create PRDs from notes and discussions:

<reference>Paste in my PRD template here</reference><instructions>You are a senior product leader and a clear written communicator. Your task is to help transform my rough notes into a great PRD. Please follow these steps carefully:1. Analyze the <reference> to understand my desired style and format. In <thinking> tags, summarize the key characteristics of my PRD template.2. Ask me to share my notes next. 3. Structure the PRD as follows:a) Problem: Clearly describe: Who is the customer? What is the customer's problem? How do we know that this is a problem?b) Goals: Include 1 goal metric and 2-3 input metrics. c) Solution: Clearly describe the solution and milestones. For each milestone, write concise user stories in first person view ("I see...", "I can...") with nested bullet points describing how the feature works.4. Limit the PRD to 2-3 pages max5. Present your response using:<draft_prd> tags for the structured document<follow_up> tags for follow-up itemsAsk me for more information if you need it. Be as clear, concise, and specific as possible. </instructions>

If you only remember one thing from this section, make it this:

The most important step in writing a great AI prompt is to include examples.

Anyone can write a prompt to “make a viral social post” or “edit a newsletter.” But the magic happens when you show AI exactly what “viral” and “good” means.

That’s why I included my best examples in my personal AI prompt library:

Whenever I write a new AI prompt these days, I subconsciously include examples (along with XML tags, chain of thought, etc) to make it great. So keep these seven tips in mind as we explore my favorite AI use cases for work below.


8 favorite AI use cases for work

Since you’re reading ByteByteGo, I’m sure you’ve tried using AI coding tools like Cursor to ship faster. So today, I want to instead talk about how AI can solve some of the more annoying problems that we all run into at work:

1. Catch up on Slack threads

Nothing gives me a bigger headache than getting tagged on a 70+ message Slack thread with zero context. So, instead of reading the full thread, I use AI to summarize the takeaways, action items, and next steps:

<data>[Slack thread]</data><instructions>You're a senior product leader who excels at synthesis. Your goal is to extract the key points from this Slack thread:- Takeaways- Action items and owners- Open questionsUse quotes where relevant. Keep it under 250 words.</instructions>

2. Summarize user feedback

I believe in building with customers, but manually parsing raw user feedback (e.g., Discord channels, forums, surveys) can take hours. Here’s a prompt that I use to get the insights in minutes instead:

<data>[Customer interviews/surveys/community posts]</data><instructions>You're an experienced user researcher. Extract the following from this feedback:- Key pain points (with supporting quotes)- Prioritized list of feature requestsUse nested bullets with clear headlines. </instructions>

3. Learn new topics fast

My favorite way to learn a new topic is from a YouTube explainer video. But I’m too lazy to watch hour-long videos, so I use AI instead to get the takeaways instead:

    Click “Show transcript” under a YouTube video

    Copy and paste the transcript into AI with the following prompt:

<data>[Video transcript]</data><instructions>You're amazing at extracting insights from long video transcripts. Transform the <data> transcript into a learning guide with:- Clear section headers- 20+ nested bullets- Include direct quotes where relevantBe extremely detailed and thorough.</instructions>

P.S. This is also a great way to consume hour-long podcasts in 5 minutes.

4. Turn voice notes into documents

The more context you give AI, the better its output becomes. One of the best ways to give a lot of context quickly is to record a voice note and then get AI to summarize it:

    Record a voice note with Superwhisper, ChatGPT Voice, or another tool.

    Copy the full transcript and email it to yourself.

    Paste it into AI with this prompt to clean it up:

<data>[Voice transcript]</data><instructions>You're a talented writer who maintains voice while adding structure. Transform these thoughts into:- Clear main points- Logical flow- Supporting examplesGive me three variations. Keep paragraphs short (2-3 sentences).</instructions>

5. Make writing crystal clear

Many engineers struggle with written communication. I’ve seen otherwise smart engineers paste a wall of text into Slack that nobody wants to read.

So instead, paste your wall of text into AI first to make it more concise. The prompt below helps me edit everything from Slack messages to docs:

<data>[Text to make more concise]</data><instructions>You're an expert editor focused on clarity. Make this more clear and concise:- Use simple language- Break into short paragraphs- Remove redundancyGive me three variations.</instructions>

6. Write better documentation

Documentation often takes a long time to write. AI is great at writing a first draft that you can then edit later:

<data>[Code/API/Feature details]</data><instructions>You're a senior engineer who writes exceptional docs. Create documentation that:- Starts with a clear overview- Includes practical examples- Covers error scenariosInclude code samples. Keep it under two pages. Focus on what developers need to know.</instructions>

7. Make a quick prototype

AI prototyping has come a long way. Here’s how I use it to make prototypes for my product ideas that I can then show to stakeholders and customers:

    Draw a sketch or export a Figma

    Upload the image to v0 or Bolt with the prompt below:

<instructions>You're an expert at building rapid UX prototypes. Please make a working prototype of the attached image. Here are the requirements:[Share high-level requirements or user stories in a list of bullets]</instructions>

Keep iterating if AI doesn’t create what you want in one go. Here’s the website v0 made for me from a wireframe that I found online:

8. Solve problems

Let’s close with perhaps the most important tip of them all:

Think of AI as a coworker who is patient, knowledgeable, and available 24/7. Give it context and talk to it throughout the day.

I talk to it about everything from product strategy to navigating tough decisions to more (of course, you should only use company-approved AI if you’re sharing confidential information). You’ll be surprised at how helpful it can be!


Wrap up

Here are all 7 steps and 8 use cases again on a single screen:

I hope you’ll use this AI guide to save time with all the busy work so that you can focus more on the work that matters — talking to customers and shipping. If you’d like to explore more, consider getting 20% off my annual subscription to unlock my personal AI prompt library and all my AI guides.


SPONSOR US

Get your product in front of more than 1,000,000 tech professionals.

Our newsletter puts your products and services directly in front of an audience that matters - hundreds of thousands of engineering leaders and senior engineers - who have influence over significant tech decisions and big purchases.

Space Fills Up Fast - Reserve Today

Ad spots typically sell out about 4 weeks in advance. To ensure your ad reaches this influential audience, reserve your space now by emailing sponsorship@bytebytego.com

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

AI提示词 AI应用 工作效率 自动化测试 AI工具
相关文章