extract_sft_dataset

extract_sft_dataset(root: ThinkNode) -> list[dict[str, Any]]

Extract the best trajectory or multiple equally good trajectories for SFT training.

Parameters:
NameDescription
rootThe root node of the tree.

Type: ThinkNode
Returns:
TypeDescription
list[dict[str, typing.Any]]List[Dict]: List of best trajectories, each one is a pair of instruction and response.