# LongLive-RAG: A General Retrieval-Augmented Framework for Long Video Generation

A research method that lets an autoregressive video generator retrieve its own earlier generated frames as extra context, reducing drift and error buildup in long videos without retraining.

LongLive-RAG treats long video generation as a retrieval problem: rather than only attending to a recent sliding window of frames, an autoregressive video generator looks back over the video it has already produced and retrieves the most relevant past latent frames as additional context for the next block. The authors report this reduces error accumulation, subject identity drift, and background flicker over long videos, without retraining the underlying generator.

The method indexes each completed latent block into a compact embedding, retrieves the top-scoring past entries for the current block, and trains the retrieval encoder offline on the model's own previously generated latents with the base generator kept frozen. It is described as working across several existing autoregressive video generation systems, including Causal-Forcing, Self-Forcing, and LongLive, as a plug-in addition rather than a replacement generator.

It shares its runtime environment with the separate LongLive project, and is implemented in Python with PyTorch.

Website: https://github.com/qiz1907/LongLive-RAG
