Downloads · 30 days
22
24% of all-time downloads
egcortes/qa-completeness-regressor
qa-completeness-regressor is a text classification model from egcortes. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Give it a question and a long answer. It tells you how complete the answer is.
Downloads · 30 days
22
24% of all-time downloads
All-time downloads
93
Public
Parameters
109M
436 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
Give it a question and a long answer. It tells you how complete the answer is.
A complete answer covers everything the question asks for. An incomplete one leaves things out. This model reads the question and the answer together and returns one number for that.
You do not need a reference answer. That is the point of it.
It is bert-base-uncased with a small regression head, trained on synthetic data. The paper is
Beyond accuracy: completeness and relevance metrics for evaluating the quality of long answers,
Language Resources and Evaluation 60(3), article 58 (2026). It is open access:
doi.org/10.1007/s10579-026-09936-6.
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
name = "egcortes/qa-completeness-regressor"
model = AutoModelForSequenceClassification.from_pretrained(name, trust_remote_code=True).eval()
tokenizer = AutoTokenizer.from_pretrained(name)
question = "How does RAM memory work?"
answer = "RAM stores data your computer is using right now. It is fast but it forgets everything when you turn the power off."
text = f"Question: {question}\n\nfAnswer: {answer}\n\nHow complete is this answer?"
inputs = tokenizer(text, truncation=True, max_length=512, return_tensors="pt")
with torch.no_grad():
score = model(**inputs).logits.item()
print(round(score, 3)) # 0 = nothing is covered, 1 = everything is covered
You can also use a pipeline:
from transformers import pipeline
pipe = pipeline("text-classification", model="egcortes/qa-completeness-regressor",
trust_remote_code=True, function_to_apply="none")
pipe(text) # [{'label': 'completeness', 'score': 0.26}]
Two things to know:
trust_remote_code=True is needed. The head is a plain linear layer on the CLS token, which is not
one of the standard transformers heads, so the model class ships with the model.f before
Answer:. That typo was in the training code, so the model expects it. Without it the scores drift.score, which normally means a probability. It is not one here, so
always pass function_to_apply="none".Tested on the 212 human-scored answers in the companion dataset, against the average of four annotators:
| Score | |
|---|---|
| Spearman | 0.67 |
| Kendall | 0.47 |
| Pearson | 0.68 |
That beats every reference-based metric in the paper except ROUGE, and unlike ROUGE it does not need a reference answer.
It also behaves sensibly when you take an answer apart. Cutting an expert answer down to fewer and fewer sentences lowers the score every time:
| Sentences kept | Score |
|---|---|
| all | 0.59 |
| 80% | 0.53 |
| 60% | 0.44 |
| 40% | 0.34 |
| 20% | 0.24 |
The score went down at every step, for all 8 answers tested.
It does not check facts. An answer can be complete and still be wrong.
It was trained on one domain. The training data is "How to..." questions, mostly about computer science, from ELI5 and WebGPT. It may behave differently elsewhere.
The output is not calibrated. Treat it as a ranking signal, not an absolute percentage. Across the 212 answers in the dataset it ranged from 0.08 to 0.76. Multiply by 100 to compare it with the dataset scores.
Long answers were taken from ELI5 and WebGPT, then broken on purpose: sentences were removed to make them less complete, and unrelated sentences were added to make them less relevant. Each damaged answer got a score from how much of the original survived. That gave about 100,000 training examples.
The model then learned to predict that score from the question and the answer.
bert-base-uncasedBecause the training answers were damaged in a mechanical way, the model is good at spotting missing content and less tested against the messier ways real answers go wrong.
Please cite the paper:
@article{cortes2026beyond,
title = {Beyond accuracy: completeness and relevance metrics for
evaluating the quality of long answers},
author = {Cortes, Eduardo G. and Vieira, Renata and Barone, Dante A. C.},
journal = {Language Resources and Evaluation},
volume = {60},
number = {3},
pages = {58},
year = {2026},
doi = {10.1007/s10579-026-09936-6}
}