Chopper

v0.1.10
io.github.wiiiktor/chopper Checked 4 days ago Published 17 days ago

Cuts the exact quotes that answer a question out of long text and reranks passages, in one pass.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

chop_passages

Cut the exact quotes that answer `question` out of `passages` (retrieved snippets, search results, tool outputs). Returns the quotes (verbatim, with passage number and character offsets), a ready-to-read `context` string, and decision ANSWER (the passages hold the answer) or SEARCH (search again).

ParameterTypeDescription
passages *array
question *string

rank_passages

Rank `passages` by relevance to `question` (the chopper used as a reranker: on a held-out 8-language set it ranks within ~1 nDCG point of bge-reranker-v2-m3 at the same speed). Returns the top_k passages, most relevant first, with their index and relevance (0..1), plus decision ANSWER / SEARCH.

ParameterTypeDescription
passages *array
question *string
top_kinteger

chop_files

Read local text files (notes, docs, logs, code, exported pages), split them into ~1,000-character passages and cut out the exact quotes that answer `question`. Each quote carries its file path and character offset in that file. Use it instead of reading long files in full when only part of them is relevant.

ParameterTypeDescription
paths *array
question *string