DataPoint

class DataPoint(BaseModel):

A single data point in the dataset.

Attributes: question (str): The primary question or issue to be addressed. final_answer (str): The final answer. rationale (Optional[str]): Logical reasoning or explanation behind the answer. (default: :obj:None) metadata (Optional[Dict[str, Any]]): Additional metadata about the data point. (default: :obj:None)

to_dict

def to_dict(self):

Returns:

Dict[str, Any]: Dictionary representation of the DataPoint.

from_dict

def from_dict(cls, data: Dict[str, Any]):

Create a DataPoint from a dictionary.

Parameters:

  • data (Dict[str, Any]): Dictionary containing DataPoint fields.

Returns:

DataPoint: New DataPoint instance.