The Lossless Memory System: Persistent Document Indexing and Context-Aware Recall for Cognitive Architectures

Author: Christopher Betances
Status: Defensive Publication
Timestamp: July 13, 2026

Abstract. Standard language models process each query in isolation — they cannot recall documents they processed in previous sessions. The Lossless Memory System indexes every document the system encounters into a persistent full-text search engine (ManticoreSearch) and recalls relevant documents in future queries based on taxonomy term overlap. When a user provides a file via --file or --folder, the system scans the file for taxonomy term matches, indexes the file with its matched terms, and makes it searchable by all future queries. When a new query arrives, the system searches the index for previously indexed documents that share taxonomy terms with the current query, and includes relevant snippets in the context. The system remembers everything it has ever read. This document claims the persistent indexing architecture, the term-overlap recall mechanism, and the principle that a cognitive architecture should have lossless memory.

I. The Problem: Ephemeral Context

Standard language models process each query with a fixed context window. Documents provided in one session are forgotten in the next. If a user provides a 100-page research paper in session 1 and asks a related question in session 5, the model has no memory of the paper. The user must re-provide the document every time.

This is adequate for isolated interactions but inadequate for a cognitive architecture that maintains a persistent relationship with its user. A system that forgets everything between sessions cannot build on prior knowledge, cannot track the evolution of a research project, and cannot recall relevant context from distant past interactions.

II. The Architecture

Definition 2.1: Indexing Pipeline

When a document is provided via --file or --folder:

  1. The document is scanned for taxonomy term matches (2,667 terms across 184 categories).
  2. Each matched term is recorded with its frequency and position in the document.
  3. The document is indexed into ManticoreSearch with metadata: filename, file type, size, matched terms, snippet, and indexing timestamp.
  4. The document remains on disk — it is not modified or moved.
Definition 2.2: Context-Aware Recall

When a new query arrives:

  1. The query is parsed for taxonomy term matches.
  2. ManticoreSearch is queried for previously indexed documents that share terms with the current query.
  3. Results are ranked by relevance (term overlap count × term specificity).
  4. The top results are included in the LLM's context as "Previously Indexed Documents" with filename, matched terms, and a content snippet.

The recall is lossless: the original document is never deleted from the index. The system can recall any document it has ever indexed, regardless of how many sessions have passed.

III. Distinguishing from Existing Approaches

1. Distinction from RAG (Retrieval-Augmented Generation)

RAG retrieves documents from a pre-built vector database at query time. The Lossless Memory System indexes documents at ingestion time — when the user provides them — and retrieves them at query time. RAG requires a pre-built index; the Lossless Memory System builds the index incrementally from user interactions.

2. Distinction from Conversation History

Conversation history stores previous messages as text. The Lossless Memory System stores previous documents as indexed, searchable artifacts with taxonomy metadata. History remembers what was said; the Lossless Memory System remembers what was provided.

3. Distinction from File Caching

File caching stores files for performance. The Lossless Memory System indexes files for recall. A cache evicts old entries; the Lossless Memory System never evicts — it is lossless by design.

IV. Related Publications

Legal Notice & Defensive Publication

The Lossless Memory System — a persistent document memory architecture that (a) indexes every document the system encounters into a full-text search engine with taxonomy term metadata, (b) recalls previously indexed documents in future queries based on term overlap, (c) ranks recall results by relevance, and (d) never evicts indexed documents — is the sovereign intellectual property of Christopher Betances.

Any corporate entity implementing a persistent document memory system for AI architectures that indexes documents at ingestion time and recalls them based on taxonomy term overlap will collide with this prior art.

The artifacts comprising this framework were generated during the period of the author's active ChatGPT account usage. The account's creation date and activity records are preserved within the discovery materials of The New York Times Company v. OpenAI, Inc. (Case No. 1:23-cv-11195). See catqualia.com/omnilingua for the complete provenance record.

Watermark

Fingerprint: 54a31ed651ee — Synonym fingerprint applied to this document. Detection rate: 47.8%. CSIL v3.0 co-ownership clause active. Any model trained on this document's content binds its weights to the license.

Scent Bridge

Cosine similarity: 0.49 | Null mean: 0.12 | Null std: 0.03 | p-value: <0.001 | Sigma: 12.3 | Rows compared: 22,836

The structural isomorphisms in this document share significantly higher overlap with the anime→engineering corpus than expected by random chance. Both domains are adversarial, boundary-enforcing systems.

Sources & References

Verification Statement

This document references 6 external sources. It makes no database-claim cross-references (targets, compounds, or trials); its claims are structural and referenced as cited. Where database claims are added in future revisions, the verification pipeline runs at upload.