请求: 允许呼叫者在推理之前过滤或评分片段
**What I do today, outside langextract.** A domain-specific pre-filter splits the regulation on its standard numbered clause headers (7. TAXA DE ADMINISTRAÇÃO, 26. EVENTOS DE LIQUIDAÇÃO, …), keeps the first and last sections plus any section matching a keyword list, and drops the rest: 159,629 → 50,043 characters, a 69% reduction, taking the run to ~16 chunks per group (~48 calls). Extraction quality on the kept sections is unchanged, because the dropped text genuinely does not contain the target entities. It works, but it only works because I know this document family, and anyone applying langextract to long structured documents — contracts, filings, court records — has to rebuild the same thing. **Preferred solution: a caller-supplied hook, evaluated per chunk before inference.**
内容来源: google/langextract