RetrieverProtocol
retrieve
- query (str): The query to retrieve the content for.
- contents (List[str]): The list of contents to search in. **kwargs (Dict[str, Any]): Additional keyword arguments.
reset
DefaultGAIARetriever
retrieve
- query (str): The query to search for.
- contents (List[str]): The list of contents to search from. **kwargs (Any): The keyword arguments to pass to the retriever.
reset
GAIABenchmark
- data_dir (str): The directory to save the data.
- save_to (str): The file to save the results.
- retriever (Optional[RetrieverProtocol]): The retriever to use. (default: :obj:
None) - processes (int, optional): The number of processes to use. (default: :obj:
1)
init
- data_dir (str): The directory to save the data.
- save_to (str): The file to save the results.
- retriever (Optional[RetrieverProtocol], optional): The retriever to use. (default: :obj:
None) - processes (int, optional): The number of processes to use for parallel processing. (default: :obj:
1)
download
load
- force_download (bool, optional): Whether to force download the data.
train
run
- agent (ChatAgent): The agent to run the benchmark.
- on (
Literal["valid", "test"]): The set to run the benchmark. - level (
Union[int, List[int], Literal["all"]]): The level to run the benchmark. - randomize (bool, optional): Whether to randomize the data. (default: :obj:
False) - subset (Optional[int], optional): The subset of data to run. (default: :obj:
None)
_prepare_task
_create_user_message
_process_result
_handle_error
_generate_summary
question_scorer
- model_answer (str): The model answer.
- ground_truth (str): The ground truth answer.
normalize_number_str
split_string
- s (str): The string to split.
- char_list (Optional[List[str]], optional): T he list of characters to split on. (default: :obj:
None)
normalize_str
- input_str: The input string to normalize.
- remove_punct: Whether to remove punctuation.
get_final_answer
- content (str): The content to extract the final answer from.