Embeddable AI builders for forms, newsletters, landing pages and websites that SaaS products add to their own app.

LangFair
Open-source Python library from CVS Health for measuring LLM bias, toxicity and fairness on your own prompts.
What is LangFair?
LangFair is a Python library for evaluating bias and fairness across LLM use cases. Instead of relying on static benchmarks, it follows a Bring Your Own Prompts approach: you supply prompts from your own application, generate responses with any LangChain LLM class, and compute output-based metrics that do not need access to model internals. Supported metric families cover toxicity, stereotypes, counterfactual fairness for text generation and summarization, plus fairness checks for classification and recommendation use cases. The AutoEval class runs the full text-generation workflow in a couple of lines, SelfEval accepts responses you generated yourself, and red-teaming evaluations test worst-case toxicity and counterfactual behavior. The package installs with pip install langfair, comes with a documentation site, demo notebooks and a framework for choosing metrics, and is published by CVS Health. It is free open-source software with no paid plans.
Use cases
- Measure toxicity in LLM outputs
- Test an LLM for stereotype bias
- Run counterfactual fairness checks on prompts
- Audit LLM classification fairness
- Evaluate recommendation fairness
- Red-team worst-case LLM behavior
Who it's for
Why use LangFair
- Metrics are computed on prompts from your real application, so results reflect your use case rather than a generic benchmark.
- Output-based metrics work without access to internal model states, which suits governance audits of hosted models.
- A published framework helps pick a relevant subset of metrics instead of computing everything.
- AutoEval reduces a multi-step assessment to a few lines of code.
- Free open-source library with documentation, tutorial and demo notebooks.
LangFair features
- Bring Your Own Prompts evaluation of LLM use cases
- ResponseGenerator for creating multiple responses per prompt with LangChain LLMs
- ToxicityMetrics such as Expected Maximum Toxicity and Toxic Fraction
- StereotypeMetrics including Co-occurrence Bias Score
- Counterfactual fairness metrics with sentiment parity, BLEU and ROUGE-L
- Recommendation and classification fairness metrics
- AutoEval for semi-automated text generation assessments
- SelfEval for bring-your-own-responses evaluation
- Red-teaming evaluations for adversarial toxicity and counterfactuals
- Decision framework for choosing metrics for a use case
LangFair integrations
How to get started with LangFair
- Install the package with pip install langfair, ideally in a virtual environment.
- Collect a list of prompts from your LLM use case and generate responses with ResponseGenerator or your own pipeline.
- Compute toxicity, stereotype and counterfactual metrics, or run AutoEval or SelfEval for the full workflow.
- Review the scores, and optionally run red-teaming evaluations to look at worst-case behavior.
LangFair limitations
- It is a code library, so using it requires writing Python
- You need prompts from your own use case to run evaluations
- Response generation needs access to an LLM through LangChain unless you use SelfEval
- A GPU is optional but speeds up toxicity computation
LangFair pricing
LangFair is open source, so you can use and self-host it for free.
Prices can change and may vary by country or exclude tax. Check the official pricing page.
LangFair alternatives
The main LangFair alternatives listed on Debuly are LangTest, Kiln, Vals AI, Agent Development Kit (ADK), Agentic Security and CloudByte AI. The table compares pricing and platforms; order is A–Z.
| Tool | Pricing | Starting price | Platforms |
|---|---|---|---|
| LangFair | Open source | — | Python, Self-hosted |
| Agent Development Kit (ADK) | Open source | — | CLI, Self-hosted, API |
| Agentic Security | Open source | — | Web, API, Self-hosted |
| CloudByte AI | Freemium | $50/mo | Web, Self-hosted |
| Kiln | Freemium | — | macOS, Windows, Linux, API |
| LangTest | Open source | — | Python, Self-hosted |
| Vals AI | Pricing unknown | — | Web, Python SDK, CLI |

Agent Development Kit (ADK)
Google's open-source, code-first Python framework for building, testing and deploying AI agents and multi-agent workflows.

Agentic Security
Open-source vulnerability scanner that fuzzes and attacks LLM endpoints and agent workflows, from a pip install or CI check.
Open sourceVisit Agentic Security (official site)
CloudByte AI
Observability dashboard for teams using AI coding tools, tracking sessions, token spend, commits, security and DORA metrics.

Kiln
Free desktop app and MIT-licensed Python library for evals, prompt optimization, fine-tuning and synthetic data, with datasets synced through Git.
FreemiumVisit Kiln (official site)
LangTest
Open-source Python library for testing NLP models and LLMs on robustness, bias, fairness, accuracy and representation.
Open sourceVisit LangTest (official site)
Vals AI
Evaluation platform for testing LLM applications with test suites, plus custom benchmarks built from your GitHub repo.
LangFair FAQ
Is LangFair free and open source?
Yes. LangFair is an open-source library installed with pip install langfair, and the repository describes the open-source version and welcomes contributions. No paid plans are listed.
How much does LangFair cost?
The library itself is free. You pay only for the LLM calls and any compute you use to generate and score responses.
What metrics does LangFair support?
It supports toxicity, stereotype and counterfactual fairness metrics for text generation, plus recommendation and classification fairness metrics, and red-teaming evaluations.
What does Bring Your Own Prompts mean?
You provide prompts from your own application so the bias and fairness assessment reflects real use, instead of relying on a generic benchmark dataset.
Does LangFair work with any LLM?
For generation it works with LangChain LLM classes, and SelfEval lets you generate responses yourself without LangChain.
Sources & verification
Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.
| Source | Type | Accessed |
|---|---|---|
| github.com/cvs-health/langfair | official |
Image credits
- Logo: from avatars.githubusercontent.com · fetched · Vendor trademark, used only to identify the product; removed on request
- Cover: none collected yet, so a generated tile is shown.
Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.



