115页小说,零人工输入,美国网友公布GPT4长篇小说产生过程

目标

本项目旨在让最新的教学大语言模型ChatGPT的GPT-4版本从零开始创作一部完整的小说,包括标题、类型、故事、人物、背景和所有写作内容,无需人工干预。尽管无法通过单一提示(如“为我写一本书”)实现这一目标,但我们可以通过提供一系列提示来为整个过程提供结构,并允许模型逐步完成这一大型任务。然而,为确保所有创意成果均出自GPT-4,我们不允许提示对书籍内容进行具体引用,而仅提供书籍结构。该过程应当简洁、机械化且可(原则上)完全自动化。每次从头开始重复该过程,都应基于GPT-4的独立创意选择来创作一部全新的书籍。

成果:《亚特兰蒂斯的回声》,一部包含12章、115页的奇幻冒险小说,于2023年3月用时10天完成。

见解/技巧

在实施这个项目的过程中,我得到了以下主要见解:

  1. 迭代细化:从高层次的大纲开始,制定详细的章节大纲,然后撰写整章草稿(这比预期的要短很多),最后将每个场景扩展为更长、更详细的场景。

  2. 边界(由外向内):GPT-4可能会写得太远,涉及书中本不该出现的内容。为防止此类情况,我们可以先让模型写第一部分,然后写最后一部分,再填充中间部分。通过这种方式,最后一部分可以防止模型走得太远,而第一部分则限制了前一部分的最后一部分。这种边界方法应用于除顶级之外的每个细化层次。

  3. 单一提示:通常情况下,通过使用单一的大提示而非对话,您可以灵活地确定输入缓冲区中包含哪些信息,并确保所有信息与当前任务相关。为此,我精心设计了一种方法,将尽可能多的相关信息压缩到令牌缓冲区中。(注意:有时,如果您非常接近限制,甚至单个提示也可能超出令牌缓冲区。在这种情况下,您需要删除部分文本。)

  4. 连续性笔记:要求模型记录重要细节,以便在创作过程中保持连贯性和一致性。首先从之前场景的连续性注释开始,然后从之前的连续性注释中汇总额外的连续性注释。在执行此操作时,提供有限的上下文(仅最近的场景和前一场景的连续性注释)以避免提前查看非常有帮助。连续性注释将随时间增长;如果它们变得太长,可以要求模型进行总结。

  5. 修改大纲:在某些情况下,人工智能可能会临时创作,例如将第5章的部分场景移至第4章,从而破坏整本书的结构。为解决此问题,我要求模型在每章结束后返回并更新其较早的、更高层次的大纲,并在继续之前重新生成每章的开头和结尾场景。这类似于真实作者随时间修改大纲的方式。

  6. 数据清理:有时,输出可能会出现一些奇怪的情况,如从输入缓冲区复制标签(如“开头段落”),或者忘记对场景进行编号,或者从零开始编号,或者在开头添加一些零散文本。尽管我目前是手动清理这些问题,但全自动解决方案必须解决这些问题。

提示词撰写(prompt)

为准确起见,下面是作者的英文原文。

Level 1: Top-level outline

Me: Please write a high-level outline for a book. Include a list of characters and a short description of each character. Include a list of chapters and a short summary of what happens in each chapter. You can pick any title and genre you want.

Level 1: Updating outline after each chapter

Me: Please edit and update the high-level outline for the book below, taking into account what has already happened in Chapter 1.

Level 2: Scenes (bounding)

Me: Please write a detailed outline describing the first scene of each chapter. It should describe what happens in that opening scene and set up the story for the rest of the chapter. Do not summarize the entire chapter, only the first scene.

Me: Write a detailed outline describing the final, last scene of each chapter. It should describe what happens at the very end of the chapter, and set up the story for the opening scene of the next chapter, which will come immediately afterwards.

Level 2: Scenes

Me: Given the following book outline, and the following opening and final scenes for Chapter 1, write a detailed chapter outline giving all the scenes in the chapter and a short description of each. Begin the outline with the Opening Scene below, and finish the outline with the Final Scene below.

Level 3: Rough draft

Me: Given the following book outline, and following detailed chapter outline for Chapter 1, write a first draft of Chapter 1. Label each of the scenes. Stop when you reach the end of Chapter 1. It should set up the story for Chapter 2, which will come immediately afterwards. It should be written in a narrative style and should be long, detailed, and engaging.

Level 4: Paragraphs (bounding)

Me: Given the following book outline, and the following draft of Chapter 1, imagine that you have expanded this draft into a longer, more detailed chapter. For each scene, give me both the first opening paragraph, and the last, final paragraph of that longer, more detailed version. Label them as Opening Paragraph and Final Paragraph. The opening paragraph should introduce the scene. The final paragraph should set up the story for the following scene, which will come immediately afterwards. The last paragraph of the final scene should set the story up for the following chapter, which will come immediately afterwards.

Level 4: Paragraphs

Me: Given the following book outline, and the following draft of Chapter 1, write a longer, more detailed version of Scene 1. The scene must begin and end with the following paragraphs: (opening and closing paragraphs here)

Continuity Notes

Me: Please briefly note any important details or facts from the scene below that you will need to remember while writing the rest of the book, in order to ensure continuity and consistency. Label these Continuity Notes.

Me: Combine and summarize these notes with the existing previous Continuity Notes below.

经常问的问题
问:在选择保留哪些答案和丢弃哪些答案时,您没有表现出很多作者控制吗?

实际上,重新生成响应的情况很少见,只有当我发现流程存在严重问题或者书中存在严重的逻辑问题而我无法弄清楚如何通过流程更改来解决时,我才会这样做。这种情况总共最多发生 4-5 次。至少在 95% 的情况下,书中的文字是我从 GPT-4 得到的第一反应。您可以在我的研究日志的注释中看到这一点。

问:这本书不是很好。我认为专业作家不必担心太多。

没错,但这不是重点。这是一个概念证明:人工智能能否从头到尾写出一整本书,超过 100 页,同时保持连贯并遵循其最初计划的大纲?不需要人类介入并告诉它如何处理故事或角色?答案是肯定的。此外,我认为它在某些部分非常令人愉快。当然,下一个 GPT 模型只会是更好的作者。

问:ChatGPT Plus 上的 GPT-4 查询是否有速率限制?你怎么能在 10 天内写下 100 多页?

是的,我打了很多次。但是,因为我的提示和 ChatGPT 的响应都非常长,所以我能够从每个提示中挤出绝对最大的文本。此外,GPT-4 接受比 GPT-3 或 Bing 更长的提示输入,这有助于确保我可以包含尽可能多的上下文。此外,在 GPT-4 发布后的早期,该限制更高。

问:为此需要 GPT-4 吗?它与 GPT-3 相比如何?

我之前用 GPT-3 尝试过这个并遇到了问题,主要是关于在故事中写得太远和偏离轨道。边界技术可能会有所帮助,我还没有尝试过——部分原因是处理较小的输入缓冲区很痛苦。需要进一步调查。

公众号

关注

chatGPT如何注册

微信号 DrCharley

猜你喜欢

转载自blog.csdn.net/robot_learner/article/details/129965582