Implement a preference-dataset builder from accepted/rejected suggestions, including a pos

Agents, Tool Use & Product Post-Training5 / 7

Chapter 195 / 7

Agents, Tool Use & Product Post-Training

Implement a preference-dataset builder from accepted/rejected suggestions, including a pos

Hard

Implement a preference-dataset builder from accepted/rejected suggestions, including a position-bias correction.

Target interface
build_preference_dataset(logs, exam_propensity, exam_threshold=0.1)

Implement the function/class skeleton in the editor. Any correct approach is accepted.

Hints0 / 2
Reference solution
Your own code stays in the editor.