Inspiration

Creative projects rarely live in one document. Character profiles, scene drafts, locations, items, organizations, revisions, and relationship notes become scattered across files and tools.

As a project grows, the same character may appear under different names, two sources may disagree about an important fact, and relationships may point to entities that have never been formally defined. Passing all of this directly to an AI can produce confident but unreliable answers.

Creative Knowledge Engine was created around one principle:

AI proposes. Creators decide.

Instead of silently turning AI output into canon, the system converts source documents into reviewable candidates. Creators inspect the evidence, resolve ambiguity, and decide what becomes trusted knowledge.

What it does

Creative Knowledge Engine imports creative documents and organizes their contents into five entity types:

  • Character
  • Scene
  • Location
  • Item
  • Organization

Relationships are stored separately as explicit connections between entities.

Each imported document produces Entity and Relationship candidates. A creator can:

  • Accept a candidate as a new entity
  • Edit a candidate and run matching again
  • Merge it into an existing entity
  • Reject unsupported information
  • Keep separate entities even when a possible duplicate is detected
  • Block relationships whose endpoints cannot be resolved

The resulting knowledge remains inspectable. The system identifies:

  • Duplicates — potentially overlapping entities
  • Conflicts — competing claims, with all source evidence preserved
  • Orphans — entities with no relationships

Creators can then search by name, alias, and tag, inspect a read-only Knowledge Graph, and export canonical knowledge as versioned JSON.

The demo story, The Names Between Stars, contains duplicate identities, conflicting ages, unresolved relationships, and incomplete source material. It demonstrates why human review matters even when AI extraction is technically successful.

How we built it

The application is built with React, TypeScript, Vite, Zod, and Vercel.

The core workflow is deliberately deterministic:

  1. Import a source document
  2. Produce a Candidate Bundle
  3. Validate its schema
  4. Verify every Source Reference against an exact excerpt from the document
  5. Present all candidates for human review
  6. Apply only completed review decisions to canonical knowledge

For Live AI extraction, GPT-5.6 is called through a server-side Vercel Function using the Responses API and Structured Outputs. The API key never enters the browser.

AI output does not bypass the same review boundary used by the offline demo. Every successful extraction must still pass schema validation, source grounding, and human review.

Codex was used throughout the project for specification work, implementation, testing, debugging, and production hardening.

Challenges we ran into

Preserving ambiguity instead of hiding it

A conventional import process usually selects one value and discards the rest. Creative Knowledge Engine needed to preserve competing claims, their sources, and the creator’s final decision without silently rewriting history.

Deterministic identity matching

Names can differ through Unicode width, capitalization, spacing, or aliases. The matching rules had to remain predictable, explainable, and reproducible rather than relying on opaque similarity scores.

Grounding structured AI output

A structurally valid response is not necessarily supported by the source document. We added exact Source Reference validation so an extracted claim cannot enter review without evidence that exists in the imported text.

Production deployment

The Vercel Functions initially exposed differences between local TypeScript tooling and Node.js ESM resolution. We audited the complete runtime import graph, removed ambiguous directory imports, and verified the final behavior in both Preview and Production deployments.

Accomplishments that we're proud of

  • A complete human-controlled Candidate Review workflow
  • Deterministic duplicate and identity handling
  • Conflict preservation with source-level evidence
  • Blocked unresolved relationships instead of fabricated connections
  • Search, Knowledge Graph, Insights, and versioned JSON export
  • A deterministic offline demo that requires no API key
  • Production-verified GPT-5.6 extraction
  • Structured Outputs and exact Source Reference grounding
  • Restricted API-key permissions and server-side secret handling
  • WAF rate limiting for the Live AI endpoint
  • A large automated test suite covering domain, review, import, security, and deployment behavior

What we learned

The most important lesson was that AI extraction is only the beginning.

Creative knowledge becomes trustworthy when the system clearly separates:

  • what the source document says
  • what the AI proposes
  • what conflicts with existing knowledge
  • what a human has actually approved

Structured Outputs make AI responses easier to validate, but schema validation alone is not enough. Grounding, provenance, deterministic rules, and visible human decisions are what turn extracted information into knowledge that can be safely reused.

What's next

Creative Knowledge Engine is intended to become a knowledge module within the broader CreativeOS project.

Future work includes:

  • Context Bundles for passing only relevant knowledge to an AI
  • Additional creative assets such as images and external references
  • Collaboration and project-level permissions
  • Richer revision history and comparison tools
  • Reusable continuity checks for stories, games, comics, and worldbuilding
  • Deeper integration with writing and creation workflows

The long-term goal is to help creators build with AI without surrendering control of their worlds.

Built With

Share this project:

Updates