Skip to main content

Proxy-Pointer RAG suite for text, multimodal, and cross-document comparison workflows

Project description

Proxy-Pointer Banner

Proxy-Pointer Suite -- Text, Multimodal RAG, and Cross-Document Comparison 🔍

Structural RAG for Complex Documents — A high-fidelity retrieval pipeline that uses document hierarchy as the primary retrieval anchor, eliminating "hallucination by chunking." Proxy-Pointer indexes structural pointers (breadcrumbs like Paper > Section > Sub-section) rather than raw text fragments, ensuring the LLM always understands exactly where it is in a document.

Retrieve precise text, get grounded visual citations, or perform Agentic section-by-section document comparisons.


Three Implementations, One Architecture

Feature Text-Only MultiModal DocComparator
Core Goal Maximum precision for text-based RAG Unified reasoning across text & visuals Agentic Cross-Document Comparison
Input Structured Markdown (LlamaParse) Markdown + Figures/Tables (Adobe Extract) PDF or MD (Mixed format supported)
Output Text-based answers Text +$\color{#15803d}{\textsf{\textbf{AI-Verified Visual Evidence}}}$ 🖼️ Side-by-side analytical reports
LLM Gemini 3.1 Flash-Lite Gemini 3.1 Flash-Lite Gemini 3 Flash
Embeddings gemini-embedding-001 (1536d) gemini-embedding-001 (1536d) gemini-embedding-001 (1536d)
Vision ✅ Gemini 3.1 Flash-Lite
Retrieval Structural re-ranking (k=5) Anchor-aware re-ranking + image selection Multi-Stage Proxy-Pointer retrieval
Benchmark 100% on FinanceBench 96% across 20-query, 5-paper suite N/A (Dynamic Agentic Evaluation)
Use Case 10-K Financials, Legal, Documentation Anything with Images, Diagrams, Charts Credit Agreements, Contracts, Research Papers
Interface CLI / Python API Streamlit UI with visual citations Streamlit UI with markdown export

How It Works

graph TD
    A[Documents] -->|PDF Extraction| B[Markdown]
    B -->|Tree Builder| C[Structure Trees]
    C -->|Noise Filter| D[Clean Nodes]
    D -->|Embed + Index| E[FAISS]
    E -->|"Query, Dedup, Re-Rank"| F[Top Sections]
    F -->|Synthesize + Cite| G[Grounded Answer]
  1. Structure trees map every section, sub-section, figure, and table in a document
  2. Noise filtering removes TOC, glossaries, and boilerplate using an LLM
  3. Broad vector recall (k=200) retrieves candidates, then LLM re-ranking selects the best structural matches
  4. Full section loading gives the synthesizer complete context — not truncated chunks
  5. (MultiModal only) Anchor-aware retrieval surfaces figures/tables physically linked to retrieved sections

Which One Should I Use?

Text-Only — Best when your documents are purely text-based and the hierarchy (e.g., Signatory > Item 1A > Risk Factors) is the only context needed. Proven at 100% accuracy on financial 10-K filings.

MultiModal — Best when your documents contain diagrams, charts, and tables that are essential to the answer. Uses anchor-aware retrieval to surface the exact images tied to a technical discussion, tested across 5 research papers (CLIP, GaLore, NemoBot, VectorFusion, VectorPainter).

DocComparator — Best when you need to perform deep, section-by-section comparisons between two complex documents. Uses Agentic RAG and targeted personas (like Senior Legal Counsel) to untangle legal trade-offs and methodological differences beyond surface-level keyword matching.


Architecture Deep Dive

For the full technical story behind the architecture:

  1. Proxy-Pointer Framework for Structure-Aware Enterprise Document Intelligence — Hierarchical understanding and comparison of contracts, research papers, and more
  2. Proxy-Pointer RAG: Multimodal Answers Without Multimodal Embeddings — Structure is all you need
  3. Proxy-Pointer RAG: Structure Meets Scale — 100% Accuracy with Smarter Retrieval — Scaling to multi-document, LLM re-ranking, and benchmark results
  4. Proxy-Pointer RAG: Achieving Vectorless Accuracy at Vector RAG Scale and Cost — Core architecture & the pointer-based retrieval idea

Quick Start

For Users (Via PyPI)

We recommend creating a virtual environment first. Install only the modality you need:

python -m venv venv
# Windows: .\venv\Scripts\activate | Mac/Linux: source venv/bin/activate

pip install pprag                 # minimal CLI shell
pip install "pprag[text]"         # text-only structural RAG
pip install "pprag[multimodal]"   # multimodal RAG with visual citations
pip install "pprag[compare]"      # cross-document comparison
pip install "pprag[full]"         # all modalities

Then choose the workflow from the pprag CLI:

pprag text index --fresh
pprag text ask

pprag multimodal index --fresh
pprag multimodal serve

pprag compare serve

The default install intentionally stays lightweight. If you run a modality without its optional dependencies, the CLI prints the exact extra to install, for example pip install "pprag[multimodal]".

For Developers (Local Repository)

If you want to tinker with the code, view the raw prompts, or use the sample data, we recommend cloning the repository. This project uses uv for lightning-fast dependency management (you can install it via pip install uv).

git clone https://github.com/partha-sarkar/proxy-pointer.git
cd proxy-pointer

# Sync the isolated environment with all dependencies (uv creates the venv automatically)
uv sync --all-extras

# Prefix commands with `uv run` to execute them inside the automatic environment
uv run pprag text index --fresh
uv run pprag text ask

Each implementation also has its own self-contained README with a 5-minute quickstart:

All include sample data so you can clone, build the index, an start exploring immediately.


Author

Partha Sarkar

Contact

  • GitHub Issues: For bug reports
  • General Questions: Reach out on LinkedIn or Email

License

© 2026 Partha Sarkar (Proxy-Pointer). Licensed under MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pprag-0.1.1.tar.gz (69.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pprag-0.1.1-py3-none-any.whl (89.9 kB view details)

Uploaded Python 3

File details

Details for the file pprag-0.1.1.tar.gz.

File metadata

  • Download URL: pprag-0.1.1.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pprag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9e032fd795f93bd2cf018932c0bbcb7cf48ae3494c41e45d9fe45ead711f202d
MD5 fb03f96a686779a6c1ab8771895b2678
BLAKE2b-256 1d9f3ce8b3cfcf5b0cbf492e61d1dd766c038506c8c57e900cdc11816b3b5f8b

See more details on using hashes here.

File details

Details for the file pprag-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pprag-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 89.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pprag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8967bbb9a800d93729851d34d876aad442e7702bc0f862f0154723e3cc708ceb
MD5 ba62ab8f2a1bd7e77d492ebab64d8ed0
BLAKE2b-256 2c03ddab1ffef975fb0d9ceb8938fbac23443257b9f410adb2a08d3ddf5b5df0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page