Skip to content

Conversation

philschmid
Copy link
Contributor

No description provided.

@philschmid philschmid requested a review from NathanHB June 20, 2024 13:33
Copy link
Member

@clefourrier clefourrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ideally you'd also want to add it in metrics

@philschmid
Copy link
Contributor Author

ideally you'd also want to add it in metrics

Where?

@clefourrier
Copy link
Member

src/lighteval/metrics/metrics.py, like these 2 atm


    llm_judge_multi_turn_openai = SampleLevelMetricGrouping(
        metric=["single_turn", "multi_turn"],
        higher_is_better=True,
        category=MetricCategory.LLM_AS_JUDGE_MULTI_TURN,
        use_case=MetricUseCase.SUMMARIZATION,
        sample_level_fn=JudgeLLM(
            judge_model_name="gpt-3.5-turbo",
            template_path=os.path.join(os.path.dirname(__file__), "judge_prompts.jsonl"),
            multi_turn=True,
        ).compute,
        corpus_level_fn={
            "single_turn": np.mean,
            "multi_turn": np.mean,
        },
    )
    llm_judge_openai = SampleLevelMetricGrouping(
        metric=["judge_score"],
        higher_is_better=True,
        category=MetricCategory.LLM_AS_JUDGE,
        use_case=MetricUseCase.SUMMARIZATION,
        sample_level_fn=JudgeLLM(
            judge_model_name="gpt-3.5-turbo",
            template_path=os.path.join(os.path.dirname(__file__), "", "judge_prompts.jsonl"),
            multi_turn=False,
        ).compute,
        corpus_level_fn={
            "judge_score": np.mean,
        },
    )

(name might be slightly different)

@clefourrier
Copy link
Member

Basically it allows the judges you defined to be in the general metrics available to users

@clefourrier clefourrier merged commit 0bceaee into main Jul 4, 2024
hynky1999 pushed a commit to hynky1999/lighteval that referenced this pull request Jul 12, 2024
* ADD GPT-4 as Judge

* Fix style

---------

Co-authored-by: Clémentine Fourrier <[email protected]>
hynky1999 pushed a commit that referenced this pull request May 22, 2025
* ADD GPT-4 as Judge

* Fix style

---------

Co-authored-by: Clémentine Fourrier <[email protected]>
NathanHB pushed a commit that referenced this pull request Sep 19, 2025
* ADD GPT-4 as Judge

* Fix style

---------

Co-authored-by: Clémentine Fourrier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants