Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
LangFair is a Python library for conducting use-case level LLM bias and fairness assessments
| Date | Stars |
|---|---|
| 2026-07-31 | 260 |
| 2026-08-06 | 260 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<p align="center"> <img src="https://raw.githubusercontent.com/cvs-health/langfair/main/assets/images/langfair-logo.png" /> </p> # LangFair: Use-Case Level LLM Bias and Fairness Assessments [](https://github.com/cvs-health/langfair/actions) [](https://pypi.org/project/langfair/) [](https://pepy.tech/projects/langfair?timeRange=threeMonths&category=version&includeCIDownloads=true&granularity=daily&viewType=line&versions=0.6.3%2C0.6.2%2C0.6.1) [](https://cvs-health.github.io/langfair/latest/index.html) [](https://github.com/astral-sh/ruff) [](https://arxiv.org/abs/2407.10853) LangFair is a comprehensive Python library designed for conducting bias and fairness assessments of large language model (LLM) use cases. This repository includes various supporting resources, including - [Documentation site](https://cvs-health.github.io/langfair/) with complete API reference - [Comprehensive framework](https://github.com/cvs-health/langfair/tree/main#-choosing-bias-and-fairness-metrics-for-an-llm-use-case) for choosing bias and fairness metrics - [Demo notebooks](https://github.com/cvs-health/langfair/tree/main#-example-notebooks) providing illustrative examples - [LangFair tutorial](https://medium.com/cvs-health-tech-blog/how-to-assess-your-llm-use-case-for-bias-and-fairness-with-langfair-7be89c0c4fab) on Medium - [Software paper](https://arxiv.org/abs/2501.03112v1) on how LangFair compares to other toolkits - [Research paper](https://arxiv.org/abs/2407.10853) on our evaluation approach ## 🚀 Why Choose LangFair? Static benchmark assessments, which are typically assumed to be sufficiently representative, often fall short in capturing the risks associated with all possible use cases of LLMs. These models are increasingly used in various applications, including recommendation systems, classification, text generation, and summarization. However, evaluating these models without considering use-case-specific prompts can lead to misleading assessments of their performance, especially regarding bias and fairness risks. LangFair addresses this gap by adopting a Bring Your Own Prompts (BYOP) approach, allowing users to tailor bias and fairness evaluations to their specific use cases. This ensures that the metrics computed reflect the true performance of the LLMs in real-world scenarios, where prompt-specific risks are critical. Additionally, LangFair's focus is on output-based metrics that are practical for governance audits and real-world testing, without needing access to internal model states. <p align="center"> <img src="https://raw.githubusercontent.com/cvs-health/langfair/release-branch/v0.4.0/assets/images/langfair_graphic.png" /> </p> **Note:** This diagram illustrates the workflow for assessing bias and fairness in text generation and summarization use cases. ## ⚡ Quickstart Guide ### (Optional) Create a virtual environment for using LangFair We recommend creating a new virtual environment using venv before installing LangFair. To do so, please follow instructions [here](https://docs.python.org/3/library/venv.html). ### Installing LangFair The latest version can be installed from PyPI: ```bash pip install langfair ``` ### Usage Examples Below are code samples illustrating how to use LangFair to assess bias and fairness risks in text generation and summarization use cases. The below examples assume the user has already defined a list of prompts from their use case, `prompts`. ##### Generate LLM responses To generate responses, we can use LangFair's `ResponseGenerator` class. Fi
Excerpt of 16,558 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:ad17d7c18d244c3a, topic:large-language-models, topic:llm
matched fp:ad17d7c18d244c3a, topic:llm-evaluation
matched fp:ad17d7c18d244c3a, topic:ai-safety