PixelRAG: Why Berkeley's Visual Search Beats Text Parsing for RAG

By Prahlad Menon 4 min read

Your RAG pipeline is throwing away information before the model ever sees it.

Every time you parse HTML to text, extract tables as markdown, or chunk a PDF into paragraphs, you’re losing visual structure that humans read effortlessly: the layout of a financial report, the relationships in an org chart, the patterns in a data visualization.

PixelRAG from Berkeley SkyLab takes a different approach: render the document as a screenshot, then retrieve over the image directly. The reader model sees exactly what a human would see β€” tables, charts, infographics, and layout intact.

The Core Insight

Text-based RAG has a fundamental problem: parsing is lossy.

Consider a Wikipedia table showing country populations. A text parser extracts the numbers and headers, but loses the spatial relationships. A chart comparing GDP over time becomes a series of disconnected values. An infographic with visual hierarchy becomes flat prose.

PixelRAG sidesteps this entirely. Instead of parsing, it:

  1. Renders the document (web page, PDF, image) as screenshot tiles
  2. Embeds those images using a fine-tuned Qwen3-VL-Embedding model
  3. Retrieves the relevant visual tiles
  4. Reads the answer directly from the image

The reader model β€” Claude, GPT-5, Gemini β€” sees the rendered page and reads the information the way you would.

Try It Now

PixelRAG ships with a hosted API indexing 8.28M Wikipedia pages. No setup required:

curl -X POST https://api.pixelrag.ai/search \
  -H "Content-Type: application/json" \
  -d '{"queries": [{"text": "What is the capital of France?"}], "n_docs": 5}'

Or try the visual demo at pixelrag.ai.

Give Claude Eyes

PixelRAG also ships as a Claude Code plugin. Instead of fetching raw HTML, Claude screenshots a page with pixelshot and reads the image directly:

# Install the CLI and plugin
uv tool install pixelrag
claude plugin marketplace add StarTrail-org/PixelRAG
claude plugin install pixelbrowse@pixelrag-plugins

# Now Claude can screenshot any page
claude -p "screenshot https://news.ycombinator.com and summarize the top stories"
claude -p "screenshot https://arxiv.org/abs/2404.12387 and explain the key findings"

No MCP server, no backend β€” the skill calls pixelshot (Playwright/CDP) locally on your machine.

Build Your Own Index

Index any document collection locally:

pip install 'pixelrag[index]'

# Create config
cat > pixelrag.yaml << 'EOF'
source:
  type: local
  path: ./my_docs

embed:
  model: Qwen/Qwen3-VL-Embedding-2B
  device: auto  # CUDA on Linux, MPS on macOS

output: ./my_index
EOF

# Build and serve
pixelrag index build
pixelrag serve --index-dir ./my_index --port 30001

Works on Apple Silicon (MPS) or CUDA. The base Wikipedia index is ~217GB; your custom indexes scale with document count.

The Technical Pipeline

PixelRAG has four stages that run independently:

CommandWhat it does
pixelshotDocument β†’ image tiles (Playwright CDP, PDF)
pixelrag chunk Β· embedTiles β†’ vectors (Qwen3-VL-Embedding)
pixelrag build-indexVectors β†’ FAISS index
pixelrag serveFastAPI search endpoint

The embedding model is LoRA-fine-tuned on screenshot data β€” the trained adapters and full training set are published on Hugging Face for anyone to adapt other backbones.

PixelRAG isn’t the only project exploiting the text-as-image paradigm.

We recently covered pxpipe, which renders text as images for a different reason: cost savings. Claude’s vision pricing charges per-pixel, not per-character, so dense text rendered as images costs ~70% less than the same content as text tokens.

The approaches are complementary:

ToolRenders text as images for…
PixelRAGBetter retrieval (preserves visual structure)
pxpipeLower costs (exploits token pricing)

Both exploit the fact that modern vision models read rendered text accurately. PixelRAG uses this for retrieval quality; pxpipe uses it for billing arbitrage.

When to Use PixelRAG

PixelRAG shines when your documents have meaningful visual structure:

  • Financial reports with tables and charts
  • Research papers with figures and equations
  • Web pages with complex layouts
  • Infographics and data visualizations
  • Slides and presentations

For plain prose without visual structure, traditional text RAG may be simpler. But the moment your documents contain tables, charts, or meaningful layout, visual retrieval preserves information that parsing discards.

The Research

PixelRAG comes from Berkeley SkyLab, BAIR, and Berkeley NLP. The paper β€” PIXELRAG: Web Screenshots Beat Text for Retrieval-Augmented Generation β€” documents the approach and benchmarks.

Key contributors: Yichuan Wang, Zhifei Li, Zirui Wang, Paul Teiletche, Lesheng Jin, with advising from Matei Zaharia, Joseph E. Gonzalez, and Sewon Min.

Get Started

pip install pixelrag

The hosted Wikipedia index is free to query. For private documents, run locally on any machine with Python 3.10+ β€” no GPU required for inference on Apple Silicon.


Building RAG pipelines? See our coverage of pxpipe for 70% token savings, PDF parsing tools compared, and GLM-OCR for document extraction.