hr_settings() lists every setting that hr_set() can change: one row
per setting of each step's schema, with the value the step resolved it
to, whether it was given or left at its default, and what the schema
declares about it (default, range, type, tier and evidence). In a chain a
setting is named by its path, "step.setting", as in hr_set(), in
hr_sweep()'s grid and in the param.* columns of hr_benchmark():
paste(step, param, sep = ".").
Arguments
- x
A step from
hr_step(),gr_step()orgr_step_retrieve(), or an arm built byhr_chain().
Value
A data frame with one row per setting: step (the step's name in
the chain, or the step's own name), param, value (the resolved value
as text), set (TRUE when the value was given rather than left at its
default), and from the schema default, range, type, tier,
status and source (the evidence for the default, NA when none is
declared).
Details
A step with no schema has no rows: its settings are fixed when it is
built. Neither has a setting the schema does not name, which a step
built with build keeps as a fixed extra (see hr_step()); to change
one, build the step again and replace it with hr_chain().
Only steps and chains carry schemas. An arm from gr_arm() is a recipe,
whose settings gr_settings_table() lists, and an arm from hr_arm()
alone records none, so either is an error of class hr_bad_arm.
The arm attribute hr_settings, which hr_benchmark() turns into
param.* columns, is a different thing: it holds only the settings the
chain was given, as "step.setting", while this function lists every
setting with its resolved value.
See also
hr_set(), hr_sweep(), hr_chain(), gr_settings_table()
Other harness:
gr_arm(),
gr_condensation_check(),
gr_qa_reference(),
gr_reverse_text(),
gr_scorer_answer(),
hr_arm(),
hr_benchmark(),
hr_chain(),
hr_contrast(),
hr_drift_check(),
hr_effort_check(),
hr_effort_escalate(),
hr_effort_event(),
hr_effort_log(),
hr_mdd(),
hr_modules(),
hr_reference(),
hr_register(),
hr_report(),
hr_scorer(),
hr_set(),
hr_skill(),
hr_step(),
hr_step_command(),
hr_sweep(),
hr_sweep_check()
Examples
chain <- hr_chain(segment = gr_step("segment"),
retrieve = gr_step_retrieve(top_k = 4),
read = gr_step("read", reader = "stuff"), name = "checked")
s <- hr_settings(chain)
s[s$set, c("step", "param", "value", "default")]
#> step param value default
#> 21 retrieve top_k 4 6
#> 35 read reader stuff map_reduce
hr_settings(gr_step_retrieve())[, c("param", "value", "range")]
#> param value range
#> 1 top_k 6 [1, 10000]
#> 2 min_score -Inf
#> 3 mmr 1 [0, 1]
#> 4 bm25_k1 1.5 [0, 10]
#> 5 bm25_b 0.75 [0, 1]
#> 6 lexical_blend 0.5 [0, 1]
#> 7 fusion default default|rrf
#> 8 rrf_k 60 [1, 10000]