← Back to AI Insights
Gemini Executive Synthesis

Architectural design ideas and questions for an AI novel generation system, focusing on RAG, state management, character intelligence, narrative consistency, and feedback loops

Technical Positioning
Advanced architectural design for scalable, consistent, and intelligent AI novel generation, addressing complex narrative challenges
SaaS Insight & Market Implications
This extensive discussion outlines a sophisticated six-layer architecture for AI novel generation, covering RAG, state machines, character intelligence, narrative structure, pacing, and feedback. Key questions raised for `inkos` include explicit time management for multi-line narratives, real-time intelligence isolation for characters (instead of post-generation auditing), preventing state drift across chapters, integrating real reader feedback, and spatial management. The pain points are the inherent complexities of maintaining narrative consistency, character agency, and world state in long-form AI-generated content. Market implication: The future of AI novel generation demands highly modular, intelligent, and robust architectures that can manage complex narrative elements, character states, and user feedback loops. Solutions that address these deep architectural challenges will differentiate themselves by delivering higher quality, more consistent, and engaging long-form content, moving beyond basic text generation to true autonomous storytelling. The debate on RAG and token efficiency highlights critical cost and performance considerations.
Proprietary Technical Taxonomy
RAG 全局检索 状态机管理记忆 双层队列 时间流逝 天花板系统 厄运系数 内驱力

Raw Developer Origin & Technical Request

Source Icon GitHub Issue Mar 19, 2026
Repo: Narcooo/inkos
# 关于小说生成系统的一些设计想法

在看到您的项目之前,我自己也在构思类似的 AI 小说生成项目,目前还在设计阶段。读完 InkOS 源码后觉得很有启发,想分享一些思路,也向作者请教几个问题。

---

## 我在设计的架构

目前是六层结构:

第一层是基础设施——RAG 做全局检索,状态机管理记忆,双层队列分离推演和生成任务。

第二层是世界规则——时间流逝用绝对标尺,天花板系统防战力崩坏,厄运系数给故事加变数。

第三层是角色层——每个角色有内驱力、位置、血量、资产。重点考虑情报隔离,让角色只能知道自己知道的事。

第四层是故事层——大纲、分卷、伏笔池、填坑系统。

第五层是叙事节奏——时期控制、流速、情绪张力、文风。

第六层是审核反馈——RAG 校验、读者耐心指数、外部反馈闭环。

都还在纸上,没落地。

---

## 读 InkOS 源码时的几个疑问

### 时间系统

维度 2 是"时间线检查",但没看到显式的时间管理。多线叙事时怎么保证时间对齐?还是说实践中没遇到这个问题?

### 情报隔离

维度 9 检查"信息越界",番外模式有已知/未知信息字段。但 Writer 生成时是全知的,靠 Auditor 后查。

我在想能不能生成时就限制住?比如只注入当前 POV 角色知道的信息。但不知道这个改动大不大,实际效果怎么样。

### 状态漂移

Phase 2 结算机制我理解了。有个担心:跨章节的状态(比如角色受伤)会不会漂移?下一章生成时如果上下文不包含那章全文,Writer 会记住吗?

### 读者反馈

维度 32 检查读者期待,但这是 LLM 预判。有没有考虑接入真实数据?还是说定位是人机协作,人工审核本身就是在给反馈?

### 角色位置

`location` 字段有,但没有看到空间管理系统。不同地点的角色突然相遇怎么检查?

---

## 想请教的

1. 7 个真相文件是怎么确定的?有没有过"加一个新文件"的情况?
2. 37 个审计维度,是踩坑踩出来的还是一开始设计的?
3. 实战中遇到最棘手的连续性问题是什么?

---

如果作者有兴趣,可以聊聊时间沙箱、情报注入这些想法。我也想知道从设计到落地中间有哪些坑。

Developer Debate & Comments

a1640727878 • Mar 20, 2026
有一说一,都在做这个啊_(:з」∠)_我也在折腾,不过是基于AI小镇那套思维,给主角和NPC一些自主能动性,自主动的按照自己人设运行,但是运行过程又全程基于游戏,回头再看游戏日志就好,不过现在游戏层卡着我有点写不下去啊∠( ᐛ 」∠)_
xingzihai • Mar 20, 2026
> 有一说一,都在做这个啊_(:з」∠)_我也在折腾,不过是基于AI小镇那套思维,给主角和NPC一些自主能动性,自主动的按照自己人设运行,但是运行过程又全程基于游戏,回头再看游戏日志就好,不过现在游戏层卡着我有点写不下去啊∠( ᐛ 」∠)_ 我原先也是这样的想法!不过我发现这样太费token了,有点入不敷出的感觉。所以我设计了沙箱架构,也是类似让AI生成RPG游戏自己运行看结果,只不过我们可以提供这个RPG的框架,方便AI来填入并运行。
Narcooo • Mar 20, 2026
我觉得你设计的挺好的,也欢迎pr,有一点就是我个人不太推荐RAG。
xingzihai • Mar 20, 2026
能说说为什么吗佬?
a1640727878 • Mar 20, 2026
> > 有一说一,都在做这个啊_(:з」∠)_我也在折腾,不过是基于AI小镇那套思维,给主角和NPC一些自主能动性,自主动的按照自己人设运行,但是运行过程又全程基于游戏,回头再看游戏日志就好,不过现在游戏层卡着我有点写不下去啊∠( ᐛ 」∠)_ > > 我原先也是这样的想法!不过我发现这样太费token了,有点入不敷出的感觉。所以我设计了沙箱架构,也是类似让AI生成RPG游戏自己运行看结果,只不过我们可以提供这个RPG的框架,方便AI来填入并运行。 在我预想里, 也不是实时全程在用AI思考的, 分多级, 离主角近的有直接因果关系或许剧情主要角色才用AI思考, 次一级用标准的游戏决策树AI, 按游戏的方法按相对死板的方法运行就好. 这样能省非常多token, 而且也给api分级, 一些简单给能力没有那么强模型去做决策就好, 困难高级在上好模型_(:з」∠)东西都没有一撇我就在想控制成本了

Adjacent Repository Pain Points

Other highly discussed features and pain points extracted from Narcooo/inkos.

Extracted Positioning
Performance degradation and excessive token usage in long-form content generation due to 'full context injection'
Optimizing LLM context management for scalability and efficiency in long-form content generation
Top Replies
Evan-Pycraft • Mar 23, 2026
不过话又说回来很多很多时候优化过度了会导致小说情节出现问题 不知道大佬设计思路是怎么样的 有时候有些事情鱼和熊掌不可兼得除非大模型上下文又大速度又快 😄
Narcooo • Mar 23, 2026
全量注入在早期是很有用的,不过写到长篇导致上下文,记忆和质量的系统性原因,大更新正在加紧测试中!!
Evan-Pycraft • Mar 23, 2026
原来如此 期待你的大更新 我这边持续测试!
Extracted Positioning
Inconsistent API key validation between `inkos doctor` and `inkos write next`, leading to 401 errors during chapter generation
Consistent and reliable API key validation across all operational modes
Top Replies
JayRong • Mar 20, 2026
nkos config show-global 能看到配置如下: ``` (base) jayrome@MacBookPro my-xhnovel % inkos config show-global # InkOS Global LLM Configuration INKOS_LLM_PROVIDER=openai INKOS_LLM_BASE_URL=https://da...
JayRong • Mar 20, 2026
nkos config show-global 能看到配置如下: ``` (base) jayrome@MacBookPro my-xhnovel % inkos config show-global # InkOS Global LLM Configuration INKOS_LLM_PROVIDER=openai INKOS_LLM_BASE_URL=https://da...
YouJin-Li • Mar 20, 2026
检查一下API_KEY是否正确,一般就是key有问题,你可以让豆包或者deepseek帮你写个测试脚本,测试一下
Extracted Positioning
Chapter generation stalling or 'breaking' mid-process, particularly for new books and the first chapter
Reliable and complete chapter generation for new projects
Top Replies
vccyb • Mar 15, 2026
hello,你好,请问哪里获取对呀claude 的 api key呢,有什么渠道购买嘛
HeavenZhi • Mar 15, 2026
> hello,你好,请问哪里获取对呀claude 的 api key呢,有什么渠道购买嘛 这里可以买,还便宜:https://ai-api.db-kj.com/register?aff=uGqz
Chang-Tao • Mar 15, 2026
> hello,你好,请问哪里获取对呀claude 的 api key呢,有什么渠道购买嘛 实测发现 GPT-5.4比较好用, 还有项目的超时方面似乎不太完善, 会断流. 我自己改了,目前生成到20章了. 不过长度目前不受控制, 限制的4000...
Extracted Positioning
API key authentication failure when using custom providers and multiple agents/routes
Reliable API key management and authentication for custom LLM providers and multi-agent configurations
Extracted Positioning
Data corruption or cascading errors in project files after rewriting specific chapters
Ensuring data consistency and integrity across all project files during content revision

Engagement Signals

9
Replies
open
Issue Status

Cross-Market Term Frequency

Quantifies the cross-market adoption of foundational terms like token and RAG by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.

Macro Market Trends

Correlated public search velocity for adjacent technologies.

Leverage (statistics) Rag Snapshot (computer Storage)