Problem-specific
Data extraction compression
Data extraction with LLMs sends source documents and extraction schemas. Compression removes irrelevant source content while preserving the lines containing extraction targets.
Extraction with compression
from supercompress import Compressor
comp = Compressor()
def extract_data(source_text, schema):
# Compress source against the extraction schema
result = comp.compress(source_text, schema)
return llm.generate(
f"Extract: {schema}\nFrom: {result.compressed_text}"
)
Frequently asked questions
Does compression lose extraction targets?
No. Only non-extraction content is removed. Lines containing target fields are preserved.
Can I extract from multiple documents?
Yes. Compress each document independently and combine results.
Build with less context
Put compression in front of your next LLM call.
Use the hosted API or run SuperCompress locally. Keep the evidence, drop the token waste, and measure the savings before it reaches your model.