- 生成式AI入门与AWS实战
- (美)克里斯·弗雷格利等
- 233字
- 2024-09-05 17:46:33
2.4.1 指令
指令是你传递给模型的一段文本,描述希望模型执行的任务。例如,可以向前面的示例添加一条指令,引导模型生成一句话的总结。
提示:
User: Answer the following question in one sentence. Who won the 2016 baseball World Series?
补全:
Assistant: The Chicago Cubs won the 2016 baseball World Series, defeating the Cleveland Indians in a thrilling seven-game series that ended with a final score of 8-7 in extra innings.
确实如此,模型以一句话给出了响应。
为生成式AI模型编写的有效指令需要清晰、具体和上下文,以引导模型生成期望的输出。指令应该直截了当,并且易于理解。指令越具体,模型就越能更好地满足你的要求。提供相关的上下文可以帮助模型更好地理解当前的任务或主题。