LLM 微调示例:用户故事编写
基本思路:
- 结合常见的领域(如在线网站),借用 OpenAI 生成用户任务(如登录、浏览列表等等)
- 根据用户故事生成用户故事。
- 训练 Alpaca LoRA。
步骤 1. 生成用户任务
- 调用 OpenAI 按分类创建用户任务。prompt 如下:
Design a User Story Mapping for ${domain} application based on your understanding. Here are the requirements:1. Your user story map should include only user tasks to demonstrate how users will interact with the application.2. Our user story map should be based on your understanding of the ${domain} application and its users, and should bedesigned to address their needs and pain points.3. You may use any tools or formats you choose to create your user story map, but it should be easily shareable andunderstandable by stakeholders.4. Your expression should be more concise and clear.5. Your return should be like as follows:###User Tasks:1. ...###
示例输出:
User Tasks:1. Browse and search for animations and comics2. View details of animations and comics3. Create an account4. Log in to the account5. Add animations and comics to favorites6. Download animations and comics7. Share animations and comics with friends8. Rate and review animations and comics9. Create and upload animations and comics10. Participate in online forums and discussions
步骤 2. 分解用户任务为用户故事
- 调用 OpenAI 根据用户任务创建用户故事。prompt 如下:
为下面的需求编写用户故事:${domain} 应用的 ${story_name} 功能。 要求如下:1. 必须要考虑尽可能考虑各种异常场景,添加更多的 AC。2. 你的返回模板如下所示:###用户故事:可以选择宝贝出行服务作为 莉莉妈我想 在滴滴打车的手机客户端里选择宝贝出行服务以便于 我能够带宝宝打车出行的时候打到有儿童座椅的车AC 1: 莉莉妈可以选择宝贝出行服务假设 xxx当 xxx于是 xxx###
示例输出:
用户故事:可以创建和上传动画和漫画作为一个 Animation and Comics 应用的用户我想要创建和上传动画和漫画以便于我可以分享我的作品给其他用户AC 1: 用户可以创建和上传动画和漫画假设 用户已经登录到 Animation and Comics 应用当 用户点击创建和上传动画和漫画按钮于是 用户可以创建和上传动画和漫画