Skip to content

feat(benchmarks): add retriever.k and reranker.top_n knobs to pysweep - #208

Draft
kkurzacz-intel wants to merge 1 commit into
kkurzacz/pysweep-corefrom
kkurzacz/pysweep-retriever-reranker
Draft

kkurzacz-intel wants to merge 1 commit into
kkurzacz/pysweep-corefrom
kkurzacz/pysweep-retriever-reranker

Conversation

@kkurzacz-intel

@kkurzacz-intel kkurzacz-intel commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #207. This PR's base is kkurzacz/pysweep-core; review only the last commit. Once #207 merges, this gets rebased onto main and retargeted.

What

Two more Runtime-API plane knobs for pysweep, set and read back through the system_fingerprint API like llms.max_new_tokens:

retriever:
  k: [4, 10]          # documents fetched per query
reranker:
  top_n: [2, 7]       # how many of them reach the prompt (the LLM's input length)
  • retriever.k (RetrieverK), ported from prepare_change_retriever.sh.
  • reranker.top_n (RerankerTopN), ported from prepare_change_reranker.sh.

Both are PositiveInt, matching the app's own schema: k=0 retrieves nothing and top_n=0 leaves the LLM with no context. They aren't cross-validated, because a top_n above the live k is a wasted run rather than an invalid one. configs/sweep.yaml and configs/README.md list both, and DESIGN.md marks them implemented.

Testing

@kkurzacz-intel
kkurzacz-intel marked this pull request as draft November 25, 2026 14:10
@kkurzacz-intel
kkurzacz-intel force-pushed the kkurzacz/pysweep-retriever-reranker branch 3 times, most recently from 240a330 to d6f54b7 Compare November 25, 2026 18:35
@kkurzacz-intel
kkurzacz-intel force-pushed the kkurzacz/pysweep-retriever-reranker branch 5 times, most recently from 2d7d1dc to 680b105 Compare November 27, 2026 16:47
Two more Runtime-API plane knobs, set and read back through the
system_fingerprint API like llms.max_new_tokens:

- retriever.k (RetrieverK): documents fetched per query, ported from
  prepare_change_retriever.sh.
- reranker.top_n (RerankerTopN): how many of them survive reranking and
  reach the prompt, i.e. the LLM's input length; ported from
  prepare_change_reranker.sh.

Both are PositiveInt, matching the app's own schema (k=0 retrieves
nothing, top_n=0 leaves the LLM with no context). They are not
cross-validated: a top_n above the live k is a wasted run, not an
invalid one. Unit tests per property and for the config bindings, plus
live e2e tests that read, apply and verify each knob.

Signed-off-by: Kurzacz, Kamil <kamil.kurzacz@intel.com>
@kkurzacz-intel
kkurzacz-intel force-pushed the kkurzacz/pysweep-retriever-reranker branch from 680b105 to 3b95218 Compare November 27, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant