Large language models need to read many documents to answer questions, but each word or piece of text (called a token) costs computation. Compressing the text too much loses important details.
OpticalRAG turns each document page into an image and uses a vision model to encode that image into a small set of visual tokens. Then, a lightweight method called query-driven distillation reduces those tokens to just 16 per query, keeping only the information relevant to the question.
On several benchmarks, OpticalRAG improved accuracy by 5.17 points over a baseline without any document retrieval, while using only 16 tokens per query. This shows that compressing documents as images can preserve more information with far fewer tokens than traditional text compression, making RAG systems cheaper and faster.
