[GH-ISSUE #3033] [langchain]: Add HighSNR compressor integration docs (document compression for retrievers) #2701

Open
opened 2026-06-05 17:26:21 -04:00 by yindo · 0 comments
Owner

Originally created by @georgeSkoumas on GitHub (Mar 10, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/3033

Type of issue

request for content

Language

Python

Description

Context

langchain-highsnr is a published third-party
integration for deterministic document compression.

LLM pipelines that process long documents — whether for RAG, summarization, classification,
or extraction — often hit context window limits or waste tokens on low-signal content.
HighSNR compresses documents to a token budget, keeping the highest-signal chunks and
discarding the rest. It's deterministic, privacy-first (zero text retention), and sub-second
for most documents.

It provides two LangChain components:

  • HighSNRDocumentCompressor — post-retrieval compression via ContextualCompressionRetriever
  • HighSNRDocumentTransformer — pre-indexing compression before embedding

Why this is useful

  • Retrieved chunks often exceed the context window or budget — HighSNR fits them within a
    token limit while preserving the most informative content
  • Pre-indexing compression produces leaner, higher-quality vector stores with less noise
  • Benchmarked on LongBench v1 with GPT-4o: at 80% budget, exceeds full-context F1 on
    HotpotQA (70.96 vs 69.71)

Proposed docs addition

A single page at src/oss/python/integrations/retrievers/highsnr-compressor.mdx covering:

  • Setup (install + API key)
  • Post-retrieval compression with ContextualCompressionRetriever
  • Pre-indexing compression with HighSNRDocumentTransformer
  • Parameter tables for both components
  • Benchmark summary with link to reproduction scripts

I have a draft PR ready and will link it once this issue is created.

References

Originally created by @georgeSkoumas on GitHub (Mar 10, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/3033 ### Type of issue request for content ### Language Python ### Description ## Context [langchain-highsnr](https://pypi.org/project/langchain-highsnr/) is a published third-party integration for deterministic document compression. LLM pipelines that process long documents — whether for RAG, summarization, classification, or extraction — often hit context window limits or waste tokens on low-signal content. HighSNR compresses documents to a token budget, keeping the highest-signal chunks and discarding the rest. It's deterministic, privacy-first (zero text retention), and sub-second for most documents. It provides two LangChain components: - `HighSNRDocumentCompressor` — post-retrieval compression via `ContextualCompressionRetriever` - `HighSNRDocumentTransformer` — pre-indexing compression before embedding ## Why this is useful - Retrieved chunks often exceed the context window or budget — HighSNR fits them within a token limit while preserving the most informative content - Pre-indexing compression produces leaner, higher-quality vector stores with less noise - Benchmarked on LongBench v1 with GPT-4o: at 80% budget, exceeds full-context F1 on HotpotQA (70.96 vs 69.71) ## Proposed docs addition A single page at `src/oss/python/integrations/retrievers/highsnr-compressor.mdx` covering: - Setup (install + API key) - Post-retrieval compression with `ContextualCompressionRetriever` - Pre-indexing compression with `HighSNRDocumentTransformer` - Parameter tables for both components - Benchmark summary with link to reproduction scripts I have a draft PR ready and will link it once this issue is created. ## References - PyPI: https://pypi.org/project/langchain-highsnr/ - Source: https://github.com/HighSNRInc/langchain-highsnr - Benchmarks (LongBench v1, GPT-4o): https://github.com/HighSNRInc/highsnr-benchmarks - API docs: https://www.high-snr.com/docs.html
yindo added the langchainexternal labels 2026-06-05 17:26:21 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2701