Skip to main content

Cleanlab Trustworthy Language Model (TLM) - Trust Scores for every LLM output

Build Status PyPI - Version PyPI - Python Version

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)

Source distribution for cleanlab-tlm 1.1.39
File Size Uploaded
cleanlab_tlm-1.1.39.tar.gz 105.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cleanlab-tlm 1.1.39
File Interpreter ABI Platform
cleanlab_tlm-1.1.39-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

1.1.39 This release

2 release files

1.1.38

2 release files

1.1.37

2 release files

1.1.35

2 release files

1.1.34

2 release files

1.1.33

2 release files

1.1.32

2 release files

1.1.31

2 release files

1.1.28

2 release files

1.1.27

2 release files

1.1.26

2 release files

1.1.25

2 release files

1.1.22

2 release files

1.1.21

2 release files

1.1.20

2 release files

1.1.19

2 release files

1.1.18

2 release files

1.1.17

2 release files

1.1.16

2 release files

1.1.15

2 release files

1.1.13

2 release files

1.1.12

2 release files

1.1.11

2 release files

1.1.10

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.19

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

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