Communicate clearly and precisely when writing prompts. The ability to clearly state tasks and describe concepts is crucial.
Be willing to iterate rapidly, sending many prompts to the model in quick succession. Good prompt engineers are comfortable with constant back-and-forth refinement.
Consider edge cases and unusual scenarios when designing prompts. Think about how your prompt might fail in atypical situations.
Test your prompts with imperfect, realistic user inputs. Don’t assume users will provide perfectly formatted or grammatically correct queries.
Read and analyze model outputs carefully. Pay close attention to whether the model is following instructions as intended.
Strip away assumptions and clearly communicate the full set of information needed for a task. Break down the task systematically to ensure all necessary details are included.
Think about the “theory of mind” of the model when writing prompts. Consider how the model might interpret your instructions differently than intended.
Use version control and track experiments when working with prompts. Treat prompts like code in terms of management and iteration.
Ask the model to identify unclear parts or ambiguities in your instructions. This can help refine and improve your prompts.
Be precise without overcomplicating. Aim for clear task descriptions without building unnecessary abstractions.
Consider the balance between typical cases and edge cases. While handling edge cases is important, don’t neglect the primary use case.
Think about how prompts integrate into larger systems. Consider factors like data sources, latency, and overall system design.
Don’t rely solely on writing skills; prompt engineering requires a mix of clear communication and systematic thinking. Good writers aren’t necessarily good prompt engineers, and vice versa.
When working with customers, help them understand the realities of user input. Guide them to consider real-world usage patterns rather than idealized scenarios.
Practice looking at data and model outputs extensively. Familiarize yourself with how the model responds to different types of prompts and inputs.
我从 Web 前端做起,后来发展到全栈,至今十几年。我觉得大陆的网络环境对 Web 开发还算比较友好,除去 Google 之外,大部分网站都能轻易访问,大部分网络产品都能自由使用。比如 GitHub,NPM,直接访问都没什么问题。只有少数几个软件包比较麻烦,也多半跟 Google 有关,比如关联到 chromium 的 Electron、Puppeteer 等。
开发环境无法复现,线上环境稳定复现。虽然表象无法推测问题所在,但也是巨大进步。我思来想去,突然想到,会不会跟服务器端渲染(SSR)有关?于是我查看源代码——注意,是源代码,不是 DOM 树;因为 DOM 树可能会被 Vue(Nuxt)修改过,不是初始状态——一看,果然,服务器端渲染的结果跟我页面的效果不一样。而这样的结果,是由于时区导致的。