
Most RAG systems are assembled empirically and tuned against benchmarks; by contrast, Recursive Memory Retrieval (RMR) emerged as an application of a categorical structure that was developed for something else entirely. In this presentation, I will show how to derive a RAG system from first principles, starting from a categorical account of what a retrieval loop is and how it amplifies error. The same 2-categorical tolerance calculus that bounds error in entangled-photon protocols turns out to bound it in retrieval loops, yielding an error budget across hops, an irreducible floor beyond which more retrieval buys only noise, and a stopping rule that replaces the usual tuned hop count with a simple, interpretable quantity: the expected gain from one more hop.
Stan Miasnikov is a Distinguished Engineer in AI/ML, inventor, and independent researcher working at the intersection of artificial intelligence, category theory, and quantum information. His career spans applied AI, embedded systems, computer vision, and security, including work at Verizon, Amazon, Flex and others. His work also includes theoretical research, quantum-optics experiments, and the development of award-winning handwriting-recognition systems.