Repository: huggingface/lighteval
Issue: [BUG] evaluation on minervamath
Root cause: Documentation Deficiency

I try to evaluate my model on math-ai/minervamath. I used LatexExtractionConfig() in the following way:


`latex_gold_metric = multilingual_extractive_match_metric(
    language=Language.ENGLISH,
    fallback_mode="first_match",
    precision=5,
    gold_extraction_target=(LatexExtractionConfig(),),
    # Match boxed first before trying other regexes
    pred_extraction_target=(ExprExtractionConfig(), LatexExtractionConfig(boxed_match_priority=0)),
    aggregation_function=max,
)`

`def minervamath_prompt_fn(line, task_name: str = None):
    return Doc(
        task_name=task_name,
        query=MATH_QUERY_TEMPLATE.format(Question=line["question"]),
        choices=[line["answer"]],
        gold_index=0,
    )`

`minervamath = LightevalTaskConfig(
    name="minervamath",
    suite=["custom"],
    prompt_function=minervamath_prompt_fn,
    hf_repo="math-ai/minervamath",
    hf_subset="default",
    hf_avail_splits=["test"],
    evaluation_splits=["test"],
    few_shots_split=None,
    few_shots_select=None,
    generation_size=32768,
    metric=[latex_gold_metric],
    version=1,
)`

But I have following warning:

![Image](https://github.com/user-attachments/assets/0e3bae34-0fc4-42de-bf8f-cac1d2572e7c)

How to fix it?


hi ! you need to add `ExprExtractionConfig()` to the list of configs for gold extractions

```
latex_gold_metric = multilingual_extractive_match_metric( language=Language.ENGLISH, fallback_mode="first_match", precision=5, gold_extraction_target=(LatexExtractionConfig(),ExprExtractionConfig()), # Match boxed first before trying other regexes pred_extraction_target=(ExprExtractionConfig(), LatexExtractionConfig(boxed_match_priority=0)), aggregation_function=max, )
```

> hi ! you need to add `ExprExtractionConfig()` to the list of configs for gold extractions
> 
> ```
> latex_gold_metric = multilingual_extractive_match_metric( language=Language.ENGLISH, fallback_mode="first_match", precision=5, gold_extraction_target=(LatexExtractionConfig(),ExprExtractionConfig()), # Match boxed first before trying other regexes pred_extraction_target=(ExprExtractionConfig(), LatexExtractionConfig(boxed_match_priority=0)), aggregation_function=max, )
> ```

Thanks. I tried it:
`mix_gold_metric = multilingual_extractive_match_metric(
    language=Language.ENGLISH,
    fallback_mode="first_match",
    precision=5,
    gold_extraction_target=(ExprExtractionConfig(),LatexExtractionConfig()),
    # Match boxed first before trying other regexes
    pred_extraction_target=(ExprExtractionConfig(), LatexExtractionConfig(boxed_match_priority=0)),
    aggregation_function=max,
)`

However, I find it can only extracts answer using ExprExtractionConfig(). I printed extracted_golds:

![Image](https://github.com/user-attachments/assets/89cac2e8-21b5-4643-a9b1-d10f4815a192)

Can you reopen this issue?

hey ! Then you also need to add the `latexExtractConfig`

> latexExtractConfig

Hi, I have added LatexExtractionConfig() but it does not work. I am not sure if it is the same as you mentioned latexExtractConfig

mhh, somehting like this does not work ?

```
multilingual_extractive_match_metric(language=Language.ENGLISH, fallback_mode="first_match", precision=5, gold_extraction_target=(LatexExtractionConfig(),LatexExtractionConfig()), pred_extraction_target=(ExprExtractionConfig(), LatexExtractionConfig(boxed_match_priority=0)), aggregation_function=max)
```