Skip to main content

RAGOne

A lightweight, ModernBERT-based model for evaluating retrieved context in RAG pipelines.

RAGOne evaluates retrieved context across four tasks: answerability, evidence quality, contradiction detection, and relevance classification.

  • Hugging Face model: Hariharan05/ragone
  • PyPI package: ragone-ai
  • Python import: from ragone import RAGOne

Installation

pip install ragone-ai

Quick start

from ragone import RAGOne

model = RAGOne.from_pretrained("Hariharan05/ragone")

result = model.predict(
    query="What is the refund period?",
    context="Customers can request a refund within 30 days.",
    task="answerability",
    options=["yes", "no"],
)

print(result)

On first use, the model files are downloaded from Hugging Face. The package includes the inference code; model weights are hosted separately in the Hugging Face repository.

Supported tasks

Task Purpose Example options
answerability Can the query be answered from the context? ["yes", "no"]
evidence_quality How strong is the context as evidence? ["strong", "medium", "weak"]
contradiction Does the statement contradict the context? ["yes", "no"]
relevance Is the context relevant to the query? ["relevant", "irrelevant"]

Use labels consistent with the model's training conventions.

Example output

{
    "prediction": "yes",
    "scores": [
        {"label": "yes", "score": 0.89},
        {"label": "no", "score": 0.11}
    ],
    "latency_ms": 85.0,
    "task": "answerability"
}

Scores and latency above are illustrative, not guaranteed results. Scores are normalized across candidate options and are not necessarily calibrated probabilities of correctness.

Model and training

RAGOne uses a fine-tuned answerdotai/ModernBERT-base encoder and a neural scoring head to rank candidate labels.

Reported training details:

  • Dataset: 5,074 records
  • Training: 5 epochs
  • Best reported validation loss: 0.2697
  • Reported final validation accuracy: 94.591%
  • Separate evaluation: 37/40 correct (92.5%)

The separate evaluation used 10 examples per task. These results are preliminary and do not establish performance on all real-world RAG systems. The training and evaluation metrics come from different evaluations and should not be compared as if they were the same test.

Intended use

RAGOne is intended for research, experimentation, and development of RAG evaluation workflows. It can help assess retrieved-context relevance, answerability, evidence quality, and contradiction.

It does not perform document retrieval or answer generation and should not be treated as a definitive source of truth.

Limitations

  • Performance may vary by domain, language, and retrieval strategy.
  • Inputs are limited to the model's configured token length.
  • Results depend on the candidate labels supplied.
  • Softmax scores should not be interpreted as calibrated confidence without additional validation.
  • Evaluate on independent, representative datasets before production use.

License

RAGOne is licensed under the Apache License 2.0.

You may use, modify, and distribute this software under its terms. See the LICENSE file or https://www.apache.org/licenses/LICENSE-2.0 for the full license text.

Metadata

Release files for ragone-ai 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ragone-ai 1.0.0
File Size Uploaded Provenance
ragone_ai-1.0.0.tar.gz 8.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ragone-ai 1.0.0
File Interpreter ABI Platform
ragone_ai-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / ragone_ai-1.0.0.tar.gz

Download URL ragone_ai-1.0.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5fc1ce454149a4c5ce0bba40eb0a773cf8a9dc63daa478128ce08f405ebc2b0d
BLAKE2b-256 checksum
How to use checksums
adb12adbf65e0855f2b6b8095376ca7cf22588fa848098022b584bb5c8412383
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / ragone_ai-1.0.0-py3-none-any.whl

Download URL ragone_ai-1.0.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
213487aed57d85bea8fccaa64ba57fcd889c8bf8b9358527bb6e990ae105b890
BLAKE2b-256 checksum
How to use checksums
b6d82e4bc2daf822d428e807da5b9eba9e9e5754e865b0fd9577a6891378fd9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for ragone-ai 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page