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 import Readability, 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.evaluate(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

A total of nine evaluation rubrics were defined as part of the YESciEval test framework and can be used via yescieval. Following simple example shows how to import rubrics in your code:

from yescieval import Informativeness, Correctness, Completeness, 
                      Coherence, Relevancy, Integration, 
                      Cohesion, Readability, Conciseness

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

💡 Acknowledgements

If you use YESciEval in your research, please cite:

@article{d2025yescieval,
      title={YESciEval: Robust LLM-as-a-Judge for Scientific Question Answering},
      author={D'Souza, Jennifer and Giglou, Hamed Babaei and M{\"u}nch, Quentin},
      journal={arXiv preprint arXiv:2505.14279},
      year={2025}
   }

This work 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.2.0.tar.gz (79.3 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.2.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yescieval-0.2.0.tar.gz
  • Upload date:
  • Size: 79.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1015-azure

File hashes

Hashes for yescieval-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2c026697ff556206bcfafd3065ad9603af4cbd7e2daa0cd3be8646770be19580
MD5 9b38b81dcb4f2597b6ac27508baf5739
BLAKE2b-256 f19f3c7a72e2396bc56407516d9f447a7a49ac0c1ec496f15e4e2981a5085d59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yescieval-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1015-azure

File hashes

Hashes for yescieval-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba3b5b707698de3c11f2052f8ce512227e7a682c263c5737a76f48e9a548e587
MD5 26391407408cdaa389458682b2078f45
BLAKE2b-256 7c1c85f5cce78d32df5e30bee8b49ff96f6ec18df37dbf8bcb7fac8213fa4204

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