Cleanlab Trustworthy Language Model (TLM) - Trust Scores for every LLM output
In one line of code, Cleanlab TLM adds real-time evaluation of every response in LLM, RAG, and Agent systems.
Setup
TLM requires an API key. Get one here for free.
export CLEANLAB_TLM_API_KEY=<YOUR_API_KEY_HERE>
Install the package:
pip install cleanlab-tlm
Usage
TLM automatically scores the trustworthiness of responses generated from your own LLM in real-time:
from cleanlab_tlm import TLM
tlm = TLM(options={"log": ["explanation"]})
tlm.get_trustworthiness_score(
prompt="What's the third month of the year alphabetically?",
response="August" # generated from any LLM model using the same prompt
)
This returns a dictionary with trustworthiness_score and optionally requested fields like explanation.
{
"trustworthiness_score": 0.02993446111679077,
"explanation": "Found alternate plausible response: December"
}
Alternatively, you generate responses and simultaneously score them with TLM:
tlm = TLM(options={"log": ["explanation"], "model": "gpt-4.1-mini"}) # GPT, Claude, etc.
tlm.prompt("What's the third month of the year alphabetically?")
This additionally returns a response.
{
"response": "March.",
"trustworthiness_score": 0.4590804375945598,
"explanation": "Found alternate plausible response: December"
}
Why TLM?
- Trustworthiness Scores: Every LLM response is scored via state-of-the-art uncertainty estimation, helping you reliably gauge the likelihood of hallucinated/incorrect responses.
- Higher accuracy: Rigorous benchmarks show TLM consistently produces more accurate scores than other hallucination detectors and responses than other LLMs.
- Scalable API: TLM is suitable for all enterprise applications where correct LLM responses are vital, including data extraction, tagging/labeling, Q&A (RAG), Agents, and more.
Documentation
Comprehensive documentation and tutorials can be found here.
License
cleanlab-tlm is distributed under the terms of the MIT license.
Metadata
Release files for cleanlab-tlm 1.1.39
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cleanlab_tlm-1.1.39.tar.gz | 105.2 kB | With provenance | Details for cleanlab_tlm-1.1.39.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cleanlab_tlm-1.1.39-py3-none-any.whl | Python 3 | none | any | Details for cleanlab_tlm-1.1.39-py3-none-any.whl |
Total release size: 175.7 kB
Release files / cleanlab_tlm-1.1.39.tar.gz
| Download URL | cleanlab_tlm-1.1.39.tar.gz |
|---|---|
| Size | 105.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f6352750a93632a36d8f19503f977ee5089ec9776be0c784835fdf3e03e69d2
|
|
BLAKE2b-256 checksum How to use checksums |
0906af923425da52e62c1127589461c416c36ea4346e3be6911f5fe0a591adf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2025.
Transparency logRelease files / cleanlab_tlm-1.1.39-py3-none-any.whl
| Download URL | cleanlab_tlm-1.1.39-py3-none-any.whl |
|---|---|
| Size | 70.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82edeed3ab05edb860daa981ae6a7d8f0d8d7fd7027521f68987711398b168ea
|
|
BLAKE2b-256 checksum How to use checksums |
a6bcf7a7a50025fedb7e3c37185171488418118de7c2e07d4b907e381691db02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2025.
Transparency logSecurity for cleanlab-tlm 1.1.39
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for cleanlab_tlm-1.1.39.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2025.
Transparency logA 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.