trending

1d ago

Trimwise - Exact-budget, source-faithful context selection for prompts

Trimwise is an open-source Python library for selecting the most relevant, verbatim passages from a known source under exact token, word, or character budgets. It preserves source order and returns original character spans for auditability, with lexical, semantic, and hybrid selection modes. Built for RAG, agents, and prompt pipelines, with reproducible benchmarks and a public research artifact.