全程不写一行代码,我如何用 AI 做出一个复杂的小说分析系统 (English)
全程不写一行代码,我如何用 AI 做出一个复杂的小说分析系统 (English)
Generated: 2026-06-20 13:40:48
---
Have you ever had that frustrating feeling?
You're reading a web novel, you follow it for over two thousand chapters, then put it down for a few months. When you pick it up again—your head is full of "Who is this person?" "What's the deal with Nan Gongwan and that vixen?" "Did this sect show up before?"
I bet anyone who's followed a long-running web novel knows that pain!
But I took it to another level. I couldn't remember character names, so every time I skipped a few chapters I'd have to flip back to track relationships. Eventually I gave up and built an Excel spreadsheet to manually log which character appeared in which chapter—even I had to laugh at myself.
At the beginning of this year I challenged myself: use Claude (without writing a single line of code) to build a novel analysis system from scratch. Extract all the character relationships, locations, factions, events—and map them out as a graph.
Think about it—at the time no tool on the market could do this, including all those so-called "AI reading assistants" that people hype up.
Tell me that's not ambitious.
---
First slap in the face: scattered requirements mean scattered output
When I started, I chatted with Claude about the idea, and the AI handed me a solid-looking architecture document.
I created a directory, saved it as Markdown, opened up Claude, and told it to get to work.
A few days later, something was actually running!
React frontend, FastAPI backend, SQLite storage—all there!
…and then it broke the moment I tried to use it.
Features were scattered everywhere, like someone had glued together random pieces of requirements. It wasn't a coherent product.
Example: the character relationship graph worked, but when you clicked on a character, the detail panel was empty. Later I added the panel, but the panel and the graph had zero interaction with each other.
And that wasn't even the worst part—when I asked the AI to extract character relationships, it would sometimes do it by chapter, sometimes by volume, with the output format shifting all over the place. It was like dealing with multiple personalities.
Eventually I figured it out: the root cause was that my own requirements were scattered. The upper limit of AI output quality is the quality of your requirements.
That lesson alone was worth it.
---
Turning point: when BMad came along, I went from "coder" to "product manager"
I started digging into software engineering methodologies for AI agents.
Honestly, most of what's out there is all show and no go—they keep shouting "AI revolutionizes development" and then you try it and fall headfirst into a pit.
Until I stumbled across this agent engineering framework called BMad Method.
That was the real turning point.
In simple terms, it provides a complete software engineering workflow: PM, UX designer, architect, developer—each role has a corresponding AI Skill.
I had Claude adopt BMad and start over.
This time the experience was completely different—
- First, the PM Skill wrote a proper PRD: feature priorities, user stories, acceptance criteria—all laid out clearly.
- Then the UX Skill did interaction design: page layout, information hierarchy, user flow—all in one shot.
- Only after that came architecture design and development.
Guess what?
I suddenly found my footing: I wasn't writing code, I was managing a team. My job was to figure out "what to build" and "what it should look like," and the AI handled the "how."
One detail that really stuck with me: before, when I wrote code myself, I'd often change requirements as I went, because changing code was easier than changing requirement docs. Now it was the opposite—the clearer the requirement doc, the fewer problems the AI's code had.
If you let the AI guess your requirements, it'll give you a pile of AI-flavored features.
---
Meta-computability: turning "understanding a novel" into an engineering problem
This was the most exciting part.
The core problem AI-Reader had to solve was "understanding a novel"—which is essentially a subjective, aesthetic, non-computable problem.
I borrowed ideas from an article about meta-computability and refined the fuzzy goal of "analyzing a novel" into a strict graph theory and topology problem:
- Characters are defined as graph nodes: named entities whose occurrence frequency exceeds a threshold, and that have passed coreference resolution validation.
- Relationships become edges: based on co-occurrence windows and semantic matching with verb predicates.
- Geography becomes a tree: spatial prepositions and recursively nested structures of location words.
I also introduced validation mechanisms. Graph connectivity algorithms to check for isolated nodes (broken narrative), topological sort to verify timeline causality (event A must happen before event B), and a spatial constraint solver to detect contradictions in geographic descriptions (Chapter 5: "went north," Chapter 20: "retreated south"—they must match).
But I hit a major pitfall: the AI treated generic terms like "yaoguai" (monster) and "daoyou" (fellow cultivator) as actual character names. Suddenly the character graph had dozens of nonexistent characters, and clustering went completely haywire.
In the end I introduced a Union-Find algorithm and chapter evidence thresholds to fix the entity disambiguation rules—basically, I forced the AI to decide "is this word actually a person's name or not?"
This process made me realize something fundamental: AI can't solve everything, but AI combined with formal verification can solve most things.
---
A quick look at other approaches—completely different paths
When I was halfway through, out of curiosity I looked at some other AI-assisted writing tools out there, and their approaches were totally different.
Some projects use a "five general" architecture: Radar, Architect, Writer, Auditor, Reviser working in sequence. Their core pain point is "continuity in long serializations," and they use truth files and cross-checks to prevent setting collapse. I tried it once—it's great for writing web novels—but its "Auditor" is fundamentally post-hoc checking: you write first, then it checks for holes. AI-Reader, by contrast, does pre-hoc analysis: it extracts from existing text and builds a relationship graph.
Another approach modularizes the creative process into skills: worldbuilder, outline, write, review, polish—each step has clear boundaries, and all intermediate data is persisted. Its strength is "from zero to 300 chapters," turning repetitive work into something executable. But the downside is obvious: batch production loosens narrative pacing, and character behavior sometimes feels unnatural.
See, each approach has its own use case—it's not about one replacing another. AI-Reader's role is analysis, not creation, so they don't conflict.
---
Prompt tuning: AI doesn't naturally know how to extract novel information
The most grinding part of the whole project wasn't the development—it was tuning the prompts to make the AI extract information accurately.
For character extraction I used a prompt with a "senior literary editor" persona: "Read the chapter text below. Extract all named characters (including minor ones). Output as a list of JSON objects: name, role, traits. Note: output only the extraction results, do not output code block markers."
I iterated this prompt over a dozen times!
At first the AI kept outputting Markdown code blocks, and I was manually cleaning out the JSON every day. Eventually I added that line "output only the extraction results, do not output code block markers," and it finally stopped.
For timeline extraction I went through four versions. The final stable version was: "Extract the key events that happened in the chapter above, and arrange them in chronological order. Format: time/scene + action/conflict + result."
The hardest part was preventing OOC (out-of-character behavior). I borrowed the idea of "character cards"—instead of telling the AI "he's a cold person" (everyone defines "cold" differently), I defined behavior patterns: "Never initiates questions. Only answers 'yes,' 'no,' or 'whatever.' Likes to use sarcastic tone. Speaks very fast and likes to interrupt people."
Guess what? After I put this method into the prompt, the consistency of character behavior
Cael Lee
Full-stack developer with 8+ years of experience. Currently building AI-powered developer tools. I've tested 20+ AI API providers and coding assistants.