例如我只是想实现一个 auto suggestion 的需求,返回给我一个[]数组即可,测试中用 gpt-4o 也无法避免会返回解释文字
Prompt:
You need to summarize my previous chat and give 6 similar [questions] that users may ask. Please answer in the array format of ["answer","answer"...], and the [answer] is limited to 20 characters.
Response:
An astrolabe is an ancient tool used by astronomers and navigators to measure the altitude of celestial bodies and calculate their positions in the sky.
["What is a sextant?","How does a compass work?","What is a sundial?","Explain an armillary sphere.","Define an orrery.","What is a quadrant?"]
这种情况可能我直接手动处理一下就好了,
但是同样如果我想要实现复杂的需求,例如我想让 gpt 生成 echarts 的 js 代码,用于直接渲染图表,这种成本就很高了,如果我在 prompt 中写大量的限制可能也没有预期效果并且很浪费 token