easyiec.core.Feedback#
- class easyiec.core.Feedback(query_id, kind, evaluator='unknown', selected=<factory>, keep=<factory>, ranking=<factory>, ratings=<factory>, pair_results=<factory>, best=None, worst=None, line_index=None, edits=<factory>, comment='', confidence=None, uncertainty=None, rationale='', stop=False, escalated=False, positions=<factory>, cost=<factory>, meta=<factory>, timestamp=<factory>)[source]#
Bases:
objectAn evaluator’s answer to a
Query.Only the fields of the query’s protocol need to be filled in; the remaining ones stay empty. Identifiers refer to
Individual.id.- Attributes:
- selected
listofint Chosen candidates (
select; parents in EASY-IEC terms).- keep
listofint Candidates to be carried over unchanged (user-driven elitism).
- ranking
listofint Best-to-worst order; a partial ranking lists the top only.
- ratings
dict {id: score}on the query scale.- pair_results
listof(int,int,float) (id_a, id_b, outcome)with outcome 1 (a wins), 0 (b wins), 0.5 (tie).- best, worst
int,optional best_worstanswers.- line_index
int,optional Index of the chosen sample of a
linequery.- edits
dict {id: new_genome}direct modifications.- comment
str Free text (“brighter, less cluttered”); used for verbal steering.
- confidence
float,optional Self-reported confidence in
[0, 1].- uncertainty
float,optional Evaluator-estimated uncertainty in
[0, 1](disagreement of panel members, inconsistency over permutations, …).- rationale
str Explanation (LLM judges, people who type one).
- stopbool
The evaluator is satisfied and ends the session.
- escalatedbool
The answer was produced by a person after an AI escalation.
- positions
listofint Identifiers in the order in which they were displayed.
- cost
dict Effort spent (
queries,decisions,tokens_in,tokens_out,usd,seconds,human).- meta
dict Anything else (
true_utilityof simulated users, raw LLM output, member answers of a panel).
- selected
- chosen(query)[source]#
The ‘winners’: selected/kept, the ranked top, the best, the line choice, pair winners.
- to_pairs(query)[source]#
Weighted pairwise preferences
(winner, loser, weight).Ties appear in both directions with weight 0.5.
selectyields every chosen ≻ every unchosen;rankall ordered pairs of the ranked prefix and ranked ≻ unranked;rateevery pair with different scores (weight proportional to the score difference);best_worstbest ≻ others ≻ worst;linethe chosen sample ≻ the other samples; edits add edited ≻ original (the edited individual carriesmeta['edited_from']).
- utilities(query)[source]#
A utility in
[0, 1]for every candidate ofquery.select: 1 for chosen and kept, 0 otherwise;rank: normalized Borda score (unranked candidates share the lowest score);rate: normalized score;pairs: Copeland score (wins + ties/2 over comparisons);best_worst: 1, 0.5, 0;line: closeness intto the chosen sample.