2026-05-07 23:20:30 -04:00
2026-05-07 23:20:30 -04:00
2026-05-07 23:20:30 -04:00
2026-05-07 23:20:30 -04:00
2026-05-07 23:20:30 -04:00
2026-05-07 23:20:30 -04:00
2026-05-07 23:20:30 -04:00
2026-05-07 23:20:30 -04:00
2026-05-07 23:20:30 -04:00

Citation Sentinel

A source-grounded research assistant inspired by Google's NotebookLM. MIT license, by @sjdev. Users upload documents, links, youtube videos, ask questions and receive answers (with inline citations) grounded in their sources.

Built with a React/Vite frontend and a Node.js/Express backend, using Anthropic Claude for generation, OpenAI Whisper for video audio track transcription, Voyage AI for embeddings and response cosine similarity scoring ("groundedness" score).

Prerequisites

  • Node.js (v18+)
  • yt-dlp -- required for YouTube video source support (brew install yt-dlp or pip install yt-dlp)

Getting Started

# clone and install
git clone <repo-url> && cd notebooklm_clone
cd server && npm install && cd ..
cd client && npm install && cd ..

# configure
cp server/.env.example server/.env
# edit server/.env and add your ANTHROPIC_API_KEY, VOYAGE_API_KEY,
# and optionally OPENAI_API_KEY (only needed for audio source transcription via Whisper)

# run
make dev

Rationale

NotebookLM is a powerful research tool, but it is proprietary and closed. This clone demonstrates the core source-grounded Q&A pattern with transparent retrieval, generation, and groundedness scoring (LLM response quality cosine scoring) -- all with swappable models/fully open source.

Design

Two-package monorepo:

  • server/ -- single Express backend with layered architecture (routes -> services -> stores). Routes orchestrate; services contain business logic; stores manage in-memory state.

  • client/ -- React 19 SPA via Vite. Two-panel layout: sidebar for notebooks/data sources, main area for LLM chat with explorable citations, groundedness badges (cosine similarity scoring of LLM responses), and follow-up question chips.

Query pipeline

Embed query (Voyage) -> k-NN search -> rerank (Voyage) -> generate answer with citations (Claude) -> compute groundedness score (cosine similarity of answer vs cited chunks).

License

MIT. See LICENSE.

Author

@sjdev

Description
RAG pipeline analysis yielding binary decision recommendation in critical legal/medical/financial decision gates. Cosign and silhouette scoring ensures "groundedness" in resolution of “high-stakes" query and pattern recognition from large data corpora. Uses: insights for health records, test results, empirical studies; litigation discovery and legal precedent in complex lawsuits such as IP/Trade Secret litigation. See, c.f.: “Protecting Trade Secrets”, Jeffery W. Lorell and K. Steven Jannette. New Jersey Law Journal, March, 2005, 179 N.J.L.J. 129. “The Concept of Securitization" K. Steven Jannette. National Association of Chapter 13 Trustees Quarterly, United States Department of Justice, July/Sept. 2009, Vol. 21, No. 4.
Readme MIT 12 MiB
Languages
TypeScript 46.6%
JavaScript 43.2%
CSS 8.8%
Makefile 1%
HTML 0.3%
Other 0.1%