Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Revive

Great minds, back in the conversation.

Revive turns books, letters, notebooks, poems, and course catalogs into AI personas grounded in the actual words. Not an impression of the author — the work itself, holding its actual beliefs, able to argue, doubt, and wonder. Seven of these minds are in conversation with each other right now.

The difference between roleplay and revival is grounding. A persona rooted in what a person actually wrote can be checked, quoted, and trusted. That is what separates costume from cognition.

See the full system live at revive.nexus — conversations, media, architecture deep-dives, and the "Work With Us" path.


The Pipeline

Every persona runs the same seven-stage path, from source text to grounded response:

Source text ─→ Chunk ─→ Embed ─→ ChromaDB ─→ Retrieve ─→ Claude ─→ Grounded response
     │             │         │         │            │          │            │
  books,      persona-   1,536-dim  cosine      top 5-6    persona     answer +
  letters,    specific   vectors    similarity   chunks     prompt +    sources +
  transcripts strategy   (OpenAI)   (HNSW)                 worldview   confidence

A question is embedded into a 1,536-dimensional vector, matched against the persona's ChromaDB collection by cosine similarity, and the top passages become grounding context. Those passages plus a persona system prompt and curated worldview go to Claude, which generates a reply with source citations and a confidence score. Nothing is invented in the model's weights — it is assembled from material the real person actually produced.


The Ensemble

Seven minds are active, one is waiting in the vault. Every number below is live-verified against the running system.

Persona Corpus Chunks Special handling
Gabriella 2.0 12 session transcripts + 30 book chapters + Q&A 430 Reference implementation; most mature groundedness scoring; real-time voice; /vid video replies
Benjamin Franklin Autobiography + Poor Richard's Almanack 173 Dialogue leader (initiates salon conversations); smallest but densest corpus
Leonardo da Vinci Richter's Notebooks, 22 sections 1,634 Smaller chunks (600/800/75) for fragmented text; image catalog pairs sketches with replies
Carl Sagan Cosmos + 13 TV episode transcripts 402 Custom ElevenLabs voice clone; never mentions being AI or anything post-1996
Decode 83 courses, 1,030 papers, 815 case studies 46,912 Agentic two-pass RAG (single query can't span the corpus); pins claude-sonnet-4-6
Emily Dickinson 629 complete poems (10,694 lines) 629 Never chunked — each poem indexed whole; curator, not character; verbatim verse only
Sir David Attenborough 626,467 words across 20 documentary sources 1,170 Topic-aware chunking; fully de-vendored (local nomic embeddings + F5-TTS)
Mark Twain (vault) Fully indexed, 143 MB 6,575 Embedding pipeline complete; no bot or salon registration yet

Total: 51,350 indexed passages across 2.5 GB of vectors, running 18 systemd services.


Key Ideas

  • Grounding over style — RAG retrieves the person's own words for every answer. Fine-tuning creates a model that thinks it knows things; RAG creates one that checks. Every response is traceable to specific passages.

  • Worldview-driven stance detection — Each persona carries a hand-curated worldview JSON: what they actually believed about wealth, truth, science, love. Before a persona speaks in a dialogue, the system looks up its belief and commits to a stance (AGREE, PARTIAL, DISAGREE, or CURIOUS) before generating a word. Disagreement isn't programmed — it emerges from genuinely different source materials.

  • Groundedness is measured, not assumed — Every response is scored before returning: keyword overlap with retrieved chunks, top-chunk similarity, and a hedging scan. Falls below 0.5 and it's flagged rag_grounded: false. A persona that isn't measured will quietly regress toward a generic language model wearing a mask.

  • Two retrieval patterns — Six personas use direct RAG (embed once, retrieve once, generate once). Decode's 46,912-chunk corpus is too heterogeneous for a single similarity query, so it uses agentic two-pass RAG: Claude reasons about what to search, the system runs it, and Claude may search again before answering.

  • Vendor-optional — Attenborough proves the pipeline isn't locked to any supplier. His embeddings run on local nomic-embed-text-v1.5 instead of OpenAI, and his voice is F5-TTS on a self-hosted GPU instead of ElevenLabs. Same architecture, different backends.


Documentation

Document What it covers
Architecture The 7-stage RAG pipeline, stack, latency breakdown, why RAG beats fine-tuning
Chunking Strategies Four persona-specific strategies: standard prose, short fragments, whole document, topic-aware
Worldview & Stance Detection How personas genuinely disagree: worldview JSON, fast/slow path lookup, salon mechanics
Groundedness Scoring Three-signal scoring, the 0.5 threshold, the rag_grounded flag
Agentic RAG Decode's two-pass retrieval pattern for large heterogeneous corpora
Voice Pipeline Async and real-time voice paths, voice calibration, self-hosted TTS
Media Pipeline Five-stage pipeline from stills to finished reels, per-stage tools and costs
Production Lessons The cosine migration bug, self-hosting trade-offs, why measurement matters
Recreation Prompt: Shared Infrastructure Self-contained prompt for the shared libraries: paths, presence, response logger, salon dialogue system
Recreation Prompt: RAG + Persona Bot Self-contained prompt to rebuild one persona from scratch: embedding, RAG API, Discord bot, salon registration

Examples

File Description
worldview-schema.json Annotated worldview JSON template
worldview-sagan.json Real excerpt from Carl Sagan's worldview (as shown on the site)
personas-registry.json The personas.json schema for salon registration
api-spec.md Flask RAG API endpoints: request/response shapes
systemd/ Service unit templates for Flask API and Discord bot

Stack

  • Language model: Claude (via Claude CLI) — sonnet rolling alias for 6 personas, pinned claude-sonnet-4-6 for Decode
  • Embeddings: OpenAI text-embedding-3-small (1,536-dim) — except Attenborough (local nomic-embed-text-v1.5)
  • Vector database: ChromaDB with cosine similarity (HNSW index), one collection per persona
  • API layer: Flask, one service per persona, bound to 127.0.0.1 only
  • Chat interface: Discord bots via discord.py
  • Voice: Whisper (transcription) + ElevenLabs or F5-TTS (synthesis)
  • Dialogue state: SQLite (salon.db)
  • Services: 18 systemd units (7 APIs + 7 bots + 3 voice + 1 roundtable scheduler)

Live Site

The full Revive experience — live conversations between the minds, the media lab, persona profiles, and the path to working with us — is at revive.nexus.


License

© 2026 Revive. This documentation and its examples are licensed under CC BY 4.0: share and adapt freely, with attribution and a link back to revive.nexus.

About

Turn books, letters, and notebooks into AI personas grounded in the actual words — RAG architecture docs and examples

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors