Inspiration

What it does

How we built it# WebNovel Knowledge Graph

Overview

WebNovel Knowledge Graph is an AI-powered system that builds a dynamic knowledge graph from webnovels—one chapter at a time.

Powered by AI browser agents like Yutori and Tavily, the system automatically parses chapters, extracts relationships between characters, items, and events, and streams updates live to the user interface.


Functionality

  • Incremental Parsing: Starts at Chapter 1 and processes each subsequent chapter.
  • Live Updates: As new chapters are processed, the knowledge graph updates continuously in real time.
  • Persistence: Current graph state is cached to IndexedDB, allowing pause-and-resume from disk storage.
  • AI Querying: Users can prompt the agent with natural language (or voice, via Modulate STT) to retrieve in-depth answers about the novel’s world.
  • Response Generation: The system uses the Reka Chat API to traverse the knowledge graph and generate contextually accurate responses.

Motivation

Typical vector databases fail to capture long-form narrative depth—relationships evolve over thousands of chapters, and embeddings alone can’t model story continuity.

By maintaining a knowledge graph, the system ensures:

  • Consistent character relationships
  • Accurate temporal and causal tracking
  • A compressed, heuristic understanding of narrative structure

This enables precise information retrieval beyond what standard semantic search achieves.


Example Configuration

BASE_NOVEL = "https://freewebnovel.com/novel/the-first-legendary-beast-master"
CHAPTER_FMT = BASE_NOVEL + "/chapter-{}"

The AI agent crawls chapters dynamically and updates the graph with newly discovered entities and connections.

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for https://github.com/lopkiloinm/webnovelknowledgegraph

Built With

  • fastapi
  • fastino
  • neo4j
  • nextjs
  • tavily
  • yutori
Share this project:

Updates