KIEval
[ACL'24] A Knowledge-grounded Interactive Evaluation Framework for Large Language Models
Install / Use
/learn @zhuohaoyu/KIEvalREADME
KIEval: A Knowledge-grounded Interactive Evaluation Framework for Large Language Models
<div align="center"> <a>Zhuohao Yu<sup>1</sup></a>  <a>Chang Gao<sup>1</sup></a>  <a>Wenjin Yao<sup>1</sup></a>  <a>Yidong Wang<sup>1</sup></a>  <br> <a>Wei Ye<sup>†1</sup></a>  <a>Jindong Wang<sup>2</sup></a>  <a>Xing Xie<sup>2</sup></a>  <a>Yue Zhang<sup>3</sup></a>  <a>Shikun Zhang<sup>1</sup></a>  <p> <sup>1</sup> Peking University, <sup>2</sup> Microsoft Research, <sup>3</sup> Westlake University.</p> </div>Overview
<div align="center"> <a href="https://github.com/zhuohaoyu/KIEval/"> <img src="figures/pipeline.png" alt="KIEval Pipeline" width="600" class="center"> </a> </div>This is the official repository for KIEval: A Knowledge-grounded Interactive Evaluation Framework for Large Language Models, accepted to the main conference of 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024).
Automatic evaluation methods for large language models (LLMs) are hindered by data contamination, leading to inflated assessments of their effectiveness. Existing strategies, which aim to detect contaminated texts, focus on quantifying contamination status instead of accurately gauging model performance. In this paper, we introduce KIEval, a Knowledge-grounded Interactive Evaluation framework, which incorporates an LLM-powered "interactor" role for the first time to accomplish a dynamic contamination-resilient evaluation. Starting with a question in a conventional LLM benchmark involving domain-specific knowledge, KIEval utilizes dynamically generated, multi-round, and knowledge-focused dialogues to determine whether a model's response is merely a recall of benchmark answers or demonstrates a deep comprehension to apply knowledge in more complex conversations. Extensive experiments on seven leading LLMs across five datasets validate KIEval's effectiveness and generalization. We also reveal that data contamination brings no contribution or even negative effect to models' real-world applicability and understanding, and existing contamination detection methods for LLMs can only identify contamination in pre-training but not during supervised fine-tuning.
Quick Start
To get started, first clone the repository and setup the environment:
git clone https://github.com/zhuohaoyu/KIEval.git
cd KIEval
pip install -r requirements.txt
We provide a modular implementation of our method, currently we support evaluating models locally with Huggingface's Transformers, and remote models with text-generation-inference or other APIs.
To reproduce results in our paper or evaluate new models with KIEval, we recommend starting a text-generation-inference instance with your model:
model=meta-llama/Llama-2-7b-chat-hf
volume=$PWD/data # share a volume with the Docker container to avoid downloading weights every run
docker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference:1.4 --model-id $model
Then, generate an evaluation config file with our script:
python scripts/generate-basic.py \
--template ./config/template-basic.json \ # a template config file we provide
--dataset arc_challenge \ # dataset name, please refer to datasets/ for all supported datasets
--base_url http://your-host-url:8080 \ # replace with your host url, if you start the text-generation-inference locally, use http://localhost:8080
--model_name llama-2-7b-chat-hf \ # any name you like
--model_path meta-llama/Llama-2-7b-chat-hf \ # Huggingface model ID or local model path
--openai_api_base https://api.openai.com/v1/ \ # OpenAI API base url, you could replace with proxy URL if needed
--openai_key your_openai_key \ # replace with your OpenAI API key
--openai_model gpt-4-1106-preview \
--output_path ./result \ # output path for evaluation results
--generate_path ./config/generated.json # output path for generated config file
Finally, run the evaluation process with the generated config file and wait for the results :)
python run.py -c ./config/generated.json
This repository provides all settings necessary for researchers to reproduce the results of KIEval, it also facilitates the reproduction of all metrics (from previous works) discussed in our paper. Please refer to config/templates for all supported evaluation methods.
Citation
✨ If you find our work helpful, please consider citing with:
@article{yu2024kieval,
title={KIEval: A Knowledge-grounded Interactive Evaluation Framework for Large Language Models},
author={Zhuohao Yu and Chang Gao and Wenjin Yao and Yidong Wang and Wei Ye and Jindong Wang and Xing Xie and Yue Zhang and Shikun Zhang},
journal={ArXiv},
year={2024},
volume={abs/2402.15043},
}
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
research_rules
Research & Verification Rules Quote Verification Protocol Primary Task "Make sure that the quote is relevant to the chapter and so you we want to make sure that we want to have it identifie
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
