{"id":26696707,"url":"https://github.com/cleanlab/cleanlab-tlm","last_synced_at":"2025-10-24T01:59:12.697Z","repository":{"id":277470145,"uuid":"924301711","full_name":"cleanlab/cleanlab-tlm","owner":"cleanlab","description":"Python client library for Cleanlab Trustworthy Language Model","archived":false,"fork":false,"pushed_at":"2025-09-25T21:25:24.000Z","size":732,"stargazers_count":23,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-25T21:28:20.154Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cleanlab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-29T19:03:39.000Z","updated_at":"2025-09-25T21:24:29.000Z","dependencies_parsed_at":"2025-03-06T19:21:34.954Z","dependency_job_id":"2ea83245-08ee-483d-bf3a-e3e03ba391f3","html_url":"https://github.com/cleanlab/cleanlab-tlm","commit_stats":null,"previous_names":["cleanlab/cleanlab-tlm"],"tags_count":64,"template":false,"template_full_name":null,"purl":"pkg:github/cleanlab/cleanlab-tlm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab-tlm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab-tlm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab-tlm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab-tlm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cleanlab","download_url":"https://codeload.github.com/cleanlab/cleanlab-tlm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab-tlm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280723924,"owners_count":26380108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-26T20:27:24.221Z","updated_at":"2025-10-24T01:59:12.670Z","avatar_url":"https://github.com/cleanlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cleanlab Trustworthy Language Model (TLM) - Trust Scores for every LLM output\n\n[![Build Status](https://github.com/cleanlab/cleanlab-tlm/actions/workflows/ci.yml/badge.svg)](https://github.com/cleanlab/cleanlab-tlm/actions/workflows/ci.yml) [![PyPI - Version](https://img.shields.io/pypi/v/cleanlab-tlm.svg)](https://pypi.org/project/cleanlab-tlm) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cleanlab-tlm.svg)](https://pypi.org/project/cleanlab-tlm)\n\nIn one line of code, Cleanlab TLM adds real-time evaluation of every response in LLM, RAG, and Agent systems.\n\n## Setup\n\nTLM requires an API key. Get one [here](https://tlm.cleanlab.ai/) for free.\n\n```console\nexport CLEANLAB_TLM_API_KEY=\u003cYOUR_API_KEY_HERE\u003e\n```\n\nInstall the package:\n\n```console\npip install cleanlab-tlm\n```\n\n## Usage\n\nTLM automatically scores the trustworthiness of responses generated from your own LLM in real-time:\n\n```python\nfrom cleanlab_tlm import TLM\n\ntlm = TLM(options={\"log\": [\"explanation\"]})\ntlm.get_trustworthiness_score(\n    prompt=\"What's the third month of the year alphabetically?\",\n    response=\"August\"  # generated from any LLM model using the same prompt\n)\n```\n\nThis returns a dictionary with `trustworthiness_score` and optionally requested fields like `explanation`.\n\n```json\n{\n  \"trustworthiness_score\": 0.02993446111679077,\n  \"explanation\": \"Found alternate plausible response: December\"\n}\n```\n\n\nAlternatively, you generate responses and simultaneously score them with TLM:\n\n```python\ntlm = TLM(options={\"log\": [\"explanation\"], \"model\": \"gpt-4.1-mini\"})  # GPT, Claude, etc.\ntlm.prompt(\"What's the third month of the year alphabetically?\")\n```\n\nThis additionally returns a `response`.\n\n```json\n{\n  \"response\": \"March.\",\n  \"trustworthiness_score\": 0.4590804375945598,\n  \"explanation\": \"Found alternate plausible response: December\"\n}\n```\n\n## Why TLM?\n\n- **Trustworthiness Scores**: Every LLM response is scored via [state-of-the-art](https://cleanlab.ai/blog/trustworthy-language-model/) uncertainty estimation, helping you reliably gauge the likelihood of hallucinated/incorrect responses.\n- **Higher accuracy**: Rigorous [benchmarks](https://cleanlab.ai/blog/trustworthy-language-model/) show TLM consistently produces more accurate scores than other hallucination detectors and responses than other LLMs.\n- **Scalable API**: TLM is suitable for all enterprise applications where correct LLM responses are vital, including data extraction, tagging/labeling, Q\u0026A (RAG), Agents, and more.\n\n## Documentation\n\nComprehensive documentation and tutorials can be found [here](https://help.cleanlab.ai/tlm).\n\n## License\n\n`cleanlab-tlm` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleanlab%2Fcleanlab-tlm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleanlab%2Fcleanlab-tlm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleanlab%2Fcleanlab-tlm/lists"}