Skip to main content

LlamaIndex Postprocessor Integration: Distil

DistilNodePostprocessor reversibly compresses retrieved node text with distil before it reaches the LLM synthesizer.

It runs each node's text through distil's line digest — keeping the head, the tail, and every salient line, and replacing the dropped middle with a single << +N lines, handle=XXXXXXXX >> marker. The original text is written to distil's local handle store, so the exact bytes are recoverable via distil's distil_expand MCP tool or distil.mcp_server.load_restore(handle). Short nodes pass through unchanged.

Installation

pip install llama-index-postprocessor-distil

Usage

from llama_index.postprocessor.distil import DistilNodePostprocessor

postprocessor = DistilNodePostprocessor()

# in a query engine
query_engine = index.as_query_engine(node_postprocessors=[postprocessor])

query_aware (default True) passes the query's terms to distil so lines naming what the query asks for are pinned — this only ever widens the kept set, so it never drops an answer.

Metadata

Release files for llama-index-postprocessor-distil 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-postprocessor-distil 0.1.0
File Size Uploaded Provenance Actions
llama_index_postprocessor_distil-0.1.0.tar.gz 4.2 kB Without provenance Details for llama_index_postprocessor_distil-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-postprocessor-distil 0.1.0
File Interpreter ABI Platform Actions
llama_index_postprocessor_distil-0.1.0-py3-none-any.whl Python 3 none any Details for llama_index_postprocessor_distil-0.1.0-py3-none-any.whl

Total release size: 8.5 kB

Release files / llama_index_postprocessor_distil-0.1.0.tar.gz

Download URL llama_index_postprocessor_distil-0.1.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a21aa696dabd8e3ff2bd76be32b5b13063dc33461bbc586d3d9db21d06207497
BLAKE2b-256 checksum
How to use checksums
37bb735ccc90178accb7d6e5dd3897634497d0567baf03361cfb76e05a899f86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / llama_index_postprocessor_distil-0.1.0-py3-none-any.whl

Download URL llama_index_postprocessor_distil-0.1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6e7ef848533654d17eb1577ef8eeec86c17602bb64480161a0c5bf336399e5f
BLAKE2b-256 checksum
How to use checksums
9ad9a2c14e13ddcd3490622e008ab2956a830bc2fe3dd46ba8356e58187f1b79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for llama-index-postprocessor-distil 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page