{"id":22293790,"url":"https://github.com/cgnorthcutt/reliablity_framework_for_rag","last_synced_at":"2025-07-29T01:30:59.376Z","repository":{"id":217070099,"uuid":"743035054","full_name":"cgnorthcutt/reliablity_framework_for_rag","owner":"cgnorthcutt","description":"Demo showing how the Trustworthy Language Model add reliability to LLM outputs and improves RAG, agents, and data enrichment worfklows. can be used to improve fine-tuning of LLMs, accuracy of LLM outputs, and smart routing for RAG and agents.","archived":false,"fork":false,"pushed_at":"2024-04-07T21:13:00.000Z","size":19250,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-07T22:23:56.444Z","etag":null,"topics":["chatgpt","data-cleaning","data-curation","data-observability","data-quality","llms","observability","rag"],"latest_commit_sha":null,"homepage":"https://help.cleanlab.ai/tutorials/tlm/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgnorthcutt.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-01-14T05:34:13.000Z","updated_at":"2024-02-22T20:51:52.000Z","dependencies_parsed_at":"2024-04-04T09:36:19.625Z","dependency_job_id":null,"html_url":"https://github.com/cgnorthcutt/reliablity_framework_for_rag","commit_stats":null,"previous_names":["cgnorthcutt/reliablity_framework_for_rag"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgnorthcutt%2Freliablity_framework_for_rag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgnorthcutt%2Freliablity_framework_for_rag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgnorthcutt%2Freliablity_framework_for_rag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgnorthcutt%2Freliablity_framework_for_rag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgnorthcutt","download_url":"https://codeload.github.com/cgnorthcutt/reliablity_framework_for_rag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227965416,"owners_count":17848421,"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","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":["chatgpt","data-cleaning","data-curation","data-observability","data-quality","llms","observability","rag"],"created_at":"2024-12-03T17:31:48.879Z","updated_at":"2024-12-03T17:32:18.431Z","avatar_url":"https://github.com/cgnorthcutt.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo of TLM: The Reliablity Solution for RAG, LLMs, and Data Enrichment\n\n## The main file to look at in this repo is the [tlm_demo_new.ipynb](https://github.com/cgnorthcutt/reliablity_framework_for_rag/blob/main/tlm_demo_new.ipynb)\n\n**News!** I added a new data enrichment and LLM reliability [demo](https://github.com/cgnorthcutt/reliablity_framework_for_rag/blob/main/tlm_demo_new.ipynb). Details:\n* Demo showing how Trustworthy Language Model add reliability scores to LLM outputs solving 4 use cases for 4 verticals.\n* expect typos and imperfection. For better results and more details, visit [https://help.cleanlab.ai](https://help.cleanlab.ai/tutorials/tlm/)\n\n---\n\nHacked this together in a couple hours. Shows how Cleanlab TLM can be used to improve fine-tuning of LLMs, accuracy of LLM outputs, and smart routing for RAG and agents.\n\n\u003cimg width=\"1109\" alt=\"image\" src=\"https://github.com/cgnorthcutt/reliablity_framework_for_rag/assets/27030270/f5d5a0e4-2051-4460-bc04-aff1a7640b02\"\u003e\n\nDataset used for this example: [here](https://huggingface.co/datasets/nguha/legalbench/viewer/international_citizenship_questions/test?row=2).\n\n## Base Open AI LLM versus Cleanlab TLM Performance on the public test set\n\nNote these results were run with the fastest version of the TLM (`quality_preset=\"low\"`) for speed reasons (its a hackaathon demo). For improved results, use `quality_preset=\"best\"`.\n\n* Base Acc (Open-AI GPT-3.5): ~65%\n* TLM Acc: 65.5%\n\n* TLM Acc (TLM Confidence \u003e 0.3): 66.2%\n* TLM Acc (TLM Confidence \u003e 0.5): 69.9%\n* TLM Acc (TLM Confidence \u003e 0.8): 74.0%\n\n\n* Base (Open-AI GPT-3.5) Acc (TLM Confidence \u003c 0.5): 55.1%\n\nIf an expert reviews/corrects the 100 samples with lowest TLM confidence score:\n\n* the resulting accuracy will be: 79%\n* compared to the original base acc: 65%\n\n## The TLM (Trustworthy Langauge Model) is available in Cleanlab Studio\n\n* How to use the TLM: https://help.cleanlab.ai/tutorials/tlm/\n\nThere's also a (reduced functionality) demo version available here running on free servers: https://cleanlab.ai/tlm\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgnorthcutt%2Freliablity_framework_for_rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgnorthcutt%2Freliablity_framework_for_rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgnorthcutt%2Freliablity_framework_for_rag/lists"}