Skip to main content

YESciEval: Robust LLM-as-a-Judge for Scientific Question Answering.

Project description

OntoLearner Logo
PyPI version YESciEval HF License: MIT Documentation Status

Large Language Models (LLMs) have become pivotal in powering scientific question-answering across modern search engines, yet their evaluation robustness remains largely underexplored. To address this gap, we introduce YESciEval — an open-source framework that leverages fine-grained rubric-based assessments combined with reinforcement learning to reduce optimism bias in LLM evaluators.

YESciEval provides a comprehensive library for evaluating the quality of synthesized scientific answers using predefined rubrics and sophisticated LLM-based judgment models. This framework enables you to assess answers on key criteria by utilizing pretrained judges and parsing LLM outputs into structured JSON formats for detailed analysis.

🧪 Installation

You can install YESciEval from PyPI using pip:

pip install yescieval

Next, verify the installation:

import yescieval

print(yescieval.__version__)

🔗 Essential Resources

Specialized Judges within YESciEval are:

Judge Domain Dataset Used 🤗 Hugging Face
Ask Judge Multidisciplinary (33 disciplines) ORKGSyn (Open Research Knowledge Graph) SciKnowOrg/YESciEval-ASK-Llama-3.1-8B
BioASQ Judge Biomedical BioASQ SciKnowOrg/YESciEval-BioASQ-Llama-3.1-8B

For further information dive into YESciEval's extensive documentation to explore its models and usage at 📚 YESciEval Documentation.

🚀 Quick Tour

Get started with YESciEval in just a few lines of code. This guide demonstrates how to initialize inputs, load judge, and initiate rubric for evaluation of the answer.

from yescieval.rubric.pointwise.stylistic import Readability
from yescieval import AutoJudge

# Sample papers
papers = {
    "A Study on AI": "This paper discusses recent advances in artificial intelligence, including deep learning.",
    "Machine Learning Basics": "An overview of supervised learning methods such as decision trees and SVMs.",
    "Neural Networks Explained": "Explains backpropagation and gradient descent for training networks.",
    "Ethics in AI": "Explores ethical concerns in automated decision-making systems.",
    "Applications of AI in Healthcare": "Details how AI improves diagnostics and personalized medicine."
}

# Question and synthesized answer
question = "How is AI used in modern healthcare systems?"
answer = (
    "AI is being used in healthcare for diagnosing diseases, predicting patient outcomes, "
    "and assisting in treatment planning. It also supports personalized medicine and medical imaging."
)

# Step 1: Create a rubric
rubric = Readability(papers=papers, question=question, answer=answer)

# Step 2: Load a judge model (Ask Judge by default)
judge = AutoJudge()
judge.from_pretrained(
    model_id="SciKnowOrg/YESciEval-ASK-Llama-3.1-8B",
    token="your_huggingface_token",
)

# Step 3: Evaluate the answer
result = judge.judge(rubric=rubric)
print("Raw Evaluation Output:")
print(result)

Judges within YESciEval are defined as follows:

Class Name Description
AutoJudge Base class for loading and running evaluation models with PEFT adapters.
AskAutoJudge Multidisciplinary judge tuned on the ORKGSyn dataset from the Open Research Knowledge Graph.
BioASQAutoJudge Biomedical domain judge tuned on the BioASQ dataset from the BioASQ challenge.
CustomAutoJudge Custom LLM that can be used as a judge within YESciEval rubrics
GPTCustomAutoJudge Custom GPT-based LLM that can be used as a judge within YESciEval

A total of 22 evaluation rubrics were defined as part of the YESciEval test framework and can be used via yescieval. Rubrics are available for both pointwise and pairwise evaluation and must be imported directly from their respective submodule.

Pointwise

# Fidelity rubrics
from yescieval.rubric.pointwise.fidelity import Informativeness, Correctness, Completeness

# Structural rubrics
from yescieval.rubric.pointwise.structural import Coherence, Relevancy, Integration

# Stylistic rubrics
from yescieval.rubric.pointwise.stylistic import Cohesion, Readability, Conciseness

# Depth rubrics
from yescieval.rubric.pointwise.depth import MechanisticUnderstanding, CausalReasoning, TemporalPrecision

# Gap rubrics
from yescieval.rubric.pointwise.gap import GapIdentification

# Breadth rubrics
from yescieval.rubric.pointwise.breadth import ContextCoverage, MethodCoverage, DimensionCoverage, ScaleCoverage, ScopeCoverage

# Rigor rubrics
from yescieval.rubric.pointwise.rigor import EpistemicCalibration, QuantitativeEvidenceAndUncertainty, ExplicitUncertainty

# Innovation rubrics
from yescieval.rubric.pointwise.innovation import StateOfTheArtAndNovelty

Pairwise

from yescieval.rubric.pairwise.depth import MechanisticUnderstanding, CausalReasoning, TemporalPrecision

A complete list of rubrics are available at YESciEval 📚 Rubrics page.

💡 Acknowledgements

If you find this repository helpful or use YESciEval in your work or research, feel free to cite our publication:

@inproceedings{dsouza-etal-2025-yescieval,
    title = "{YES}ci{E}val: Robust {LLM}-as-a-Judge for Scientific Question Answering",
    author = {D{'}Souza, Jennifer  and
              Babaei Giglou, Hamed  and
              M{\"u}nch, Quentin},
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.acl-long.675/",
    doi = "10.18653/v1/2025.acl-long.675",
    pages = "13749--13783",
    ISBN = "979-8-89176-251-0"
}

For other type of citations please refer to https://aclanthology.org/2025.acl-long.675/.

This software is licensed under a License: MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yescieval-0.8.0.tar.gz (107.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yescieval-0.8.0-py3-none-any.whl (84.0 kB view details)

Uploaded Python 3

File details

Details for the file yescieval-0.8.0.tar.gz.

File metadata

  • Download URL: yescieval-0.8.0.tar.gz
  • Upload date:
  • Size: 107.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.10.20 Linux/6.17.0-1010-azure

File hashes

Hashes for yescieval-0.8.0.tar.gz
Algorithm Hash digest
SHA256 1f59f5bcabfe6ada7a18780567ec5f899af1b6d66c7dad38357728430688e957
MD5 935b0ac68c6fa830d9273b591a68e20c
BLAKE2b-256 5f68c011be25abb6645a4b1b9ba334e211fae8ee705eeeec3687283a28568083

See more details on using hashes here.

File details

Details for the file yescieval-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: yescieval-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 84.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.10.20 Linux/6.17.0-1010-azure

File hashes

Hashes for yescieval-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c947ccf4f66b68796ad2caac3ae899af00355b4b88d8601e91cbf70b29f5e8e
MD5 997a45999ed45532851791f053533487
BLAKE2b-256 ca89c8d0dfff60079b9874a230e637a94412bb91e72d672a0457e33a4ff926e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page