MIT-licensed database and workspace where AI agents store data, docs, skills and apps, available on desktop, self-hosted or in Busabase Cloud.

LangTest
Open-source Python library for testing NLP models and LLMs on robustness, bias, fairness, accuracy and representation.
What is LangTest?
LangTest is an open-source Python library for testing the quality of language models, developed by John Snow Labs and published under the PacificAI organization. A Harness object loads a model, then generate().run().report() produces test cases, executes them and summarizes the results in one line of code. The library covers more than 60 distinct test types across robustness, bias, representation, fairness and accuracy, and can also generate extra training data automatically from test results, for selected models. It supports NLP frameworks for named entity recognition, translation and text classification, including Spark NLP, Hugging Face and Transformers, and it can test LLMs from OpenAI, Cohere, AI21, the Hugging Face Inference API and Azure-OpenAI on tasks such as question answering, toxicity, clinical tests, legal support, factuality, sycophancy and summarization. Benchmark datasets are included, and a model ranking and leaderboard system is described in the project's blogs. LangTest is released under the Apache License 2.0 and is free to use.
Use cases
- Test NLP models for robustness
- Check LLMs for demographic bias
- Evaluate question answering accuracy
- Measure toxicity and sycophancy in LLM outputs
- Augment training data from test failures
- Benchmark models on curated datasets
Who it's for
Why use LangTest
- One Harness workflow generates, runs and reports tests, which keeps evaluation repeatable.
- A wide range of test types covers more than accuracy, including bias and robustness.
- Failed tests can feed automated data augmentation to improve a model.
- It supports both classic NLP pipelines and hosted LLM providers.
- Apache 2.0 licensing allows commercial use and modification.
LangTest features
- More than 60 test types generated and run with one line of code
- Tests for robustness, bias, representation, fairness and accuracy
- Automatic data augmentation based on test results for select models
- Support for Spark NLP, Hugging Face and Transformers models
- LLM tests for question answering, toxicity, clinical and legal tasks
- Factuality, sycophancy and summarization tests
- Bundled benchmark datasets
- Model ranking and leaderboard system
LangTest integrations
How to get started with LangTest
- Install the library with pip install langtest, adding extras such as transformers.
- Create a Harness object with a task, model and hub, such as a Hugging Face NER model.
- Call generate() to create test cases, then run() to execute them against the model.
- Call report() to view results, then consider data augmentation or fixes for failing areas.
LangTest limitations
- Data augmentation works for select models only
- It is a code library, so it requires Python and model access
- Test coverage depends on the task and framework supported
- Hosted LLM tests need API access to the provider you test
LangTest pricing
LangTest 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.
LangTest alternatives
The main LangTest alternatives listed on Debuly are Ragas, Promptfoo, BenchGen, LangFair, Vals AI and FastChat. The table compares pricing and platforms; order is A–Z.
| Tool | Pricing | Starting price | Platforms |
|---|---|---|---|
| LangTest | Open source | — | Python, Self-hosted |
| BenchGen | Freemium | $49/mo | Web, API, Self-hosted |
| FastChat | Open source | — | CLI, Web, API, Self-hosted |
| LangFair | Open source | — | Python, Self-hosted |
| Promptfoo | Open source | — | CLI, Web, API, Self-hosted |
| Ragas | Open source | — | CLI |
| Vals AI | Pricing unknown | — | Web, Python SDK, CLI |
BenchGen
Agent benchmarking platform that runs AI agents through simulated environments, scores each decision and exports training data.
FreemiumVisit BenchGen (official site)
FastChat
Open platform for training, serving and evaluating LLM chatbots, with an OpenAI-compatible API and the code behind Chatbot Arena.
Open sourceVisit FastChat (official site)
LangFair
Open-source Python library from CVS Health for measuring LLM bias, toxicity and fairness on your own prompts.
Open sourceVisit LangFair (official site)
Promptfoo
Open-source LLM evaluation and red-teaming tool that finds prompt injections, jailbreaks and data leaks in AI apps and agents.
Open sourceVisit Promptfoo (official site)
Ragas
Open-source Python library for evaluating LLM and RAG applications with metrics, experiments and synthetic test data generation.
Open sourceVisit Ragas (official site)
Vals AI
Evaluation platform for testing LLM applications with test suites, plus custom benchmarks built from your GitHub repo.
LangTest FAQ
Is LangTest free and open source?
Yes. LangTest is released under the Apache License 2.0, which covers commercial use, modification and distribution. No paid plans are listed.
How much does LangTest cost?
The library is free. Costs come from the models you test, such as API usage with OpenAI or Azure OpenAI, and your own compute.
Which models does LangTest support?
It supports NLP models from Spark NLP, Hugging Face and Transformers, and LLMs from OpenAI, Cohere, AI21, the Hugging Face Inference API and Azure-OpenAI.
What kinds of tests can LangTest run?
More than 60 test types covering robustness, bias, representation, fairness and accuracy, plus LLM tests for toxicity, factuality, sycophancy, summarization, clinical and legal tasks.
How do I start using LangTest?
Install it with pip, create a Harness with your task and model, and call generate().run().report() to see results. Documentation is on langtest.org.
What are alternatives to LangTest?
Common alternatives include Giskard, DeepEval, Ragas, Promptfoo, Deepchecks and the Hugging Face Evaluate library.
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/PacificAI/langtest | 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.

