{"id":191,"date":"2024-11-05T19:00:48","date_gmt":"2024-11-05T19:00:48","guid":{"rendered":"https:\/\/pacific.ai\/staging\/3667\/?p=191"},"modified":"2026-01-21T10:59:43","modified_gmt":"2026-01-21T10:59:43","slug":"langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines","status":"publish","type":"post","link":"https:\/\/pacific.ai\/staging\/3667\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/","title":{"rendered":"LangTest: Unveiling &#038; Fixing Biases with End-to-End NLP Pipelines"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><a href=\"https:\/\/www.johnsnowlabs.com\/\" target=\"_blank\" rel=\"noopener\">John Snow Labs<\/a> developed <a href=\"https:\/\/langtest.org\/\" target=\"_blank\" rel=\"noopener\">LangTest<\/a> to address biases in language models. The library provides comprehensive tests to detect biases in language models. We introduce an end-to-end NLP pipeline, which involves training, evaluating, <a title=\"Generative AI testing\" href=\"https:\/\/pacific.ai\/staging\/3667\/product\/\">testing<\/a> for biases, augmenting the dataset, retraining, and comparing models. This pipeline offers three advantages: comprehensive<strong> bias detection<\/strong>, data-driven <strong>bias mitigation<\/strong>, and <strong>iterative improvement<\/strong>. The blog provides an example of how to use the pipeline with a single command line.<\/p>\n<figure class=\"mb50 tac\"><img decoding=\"async\" class=\"size-full wp-image-87478 aligncenter\" style=\"width: 70%;\" src=\"https:\/\/www.johnsnowlabs.com\/wp-content\/uploads\/2024\/08\/img_blog_1-2.webp\" alt=\"LangTest platform diagram illustrating an end-to-end NLP pipeline for bias detection and mitigation, showing centralized testing with surrounding stages such as model training, evaluation, bias analysis, dataset augmentation, retraining, and model comparison.\" loading=\"lazy\" \/><\/figure>\n<h2>Introduction<\/h2>\n<p>As the field of Natural Language Processing (NLP) progresses, the deployment of Language Models (LMs) has become increasingly widespread. However, there is growing concern about biases present in these models, which can have profound societal implications. To address this issue, at John Snow Labs we are developing the <a href=\"https:\/\/langtest.org\/\" target=\"_blank\" rel=\"noopener\">LangTest<\/a> library. In this article we present a significant leap forward by introducing end-to-end pipelines. Throughout the blog we will explore the underlying concepts and understand how the users can benefit from it.<\/p>\n<h2>Detecting Biases in Language Models<\/h2>\n<p>Detecting biases in language models is critical for ensuring fairness and promoting ethical practices in AI. Language models, such as ChatGPT, can inadvertently perpetuate stereotypes and exhibit biased behaviour due to the data they were trained on. <a href=\"https:\/\/github.com\/JohnSnowLabs\/langtest\/\">LangTest<\/a> has been developed to tackle this challenge head-on by providing a set of comprehensive tests to uncover potential biases in LMs.<\/p>\n<figure class=\"mb50 tac\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-87475 aligncenter\" src=\"https:\/\/www.johnsnowlabs.com\/wp-content\/uploads\/2024\/10\/img_blog_2.webp\" alt=\"LangTest bias detection workflow showing model training, test generation for bias, robustness, accuracy, and fairness, execution of tests, data augmentation using typos, gender, race and negation examples, iterative retraining, and safe model release.\" width=\"1200\" height=\"628\" \/><\/figure>\n<h2>The End-to-End Pipeline<\/h2>\n<p>The recently added end-to-end language pipeline in <a href=\"https:\/\/github.com\/JohnSnowLabs\/langtest\/\" target=\"_blank\" rel=\"noopener\" data-href=\"https:\/\/github.com\/JohnSnowLabs\/langtest\/\">LangTest<\/a> streamlines the bias, fairness or robustness detection process, making it more efficient, reliable, and accessible to developers and researchers alike. The pipeline workflow consists of the following key steps:<\/p>\n<figure class=\"mb50 tac\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-87474 aligncenter\" src=\"https:\/\/www.johnsnowlabs.com\/wp-content\/uploads\/2024\/10\/img_blog_3-1-2.webp\" alt=\"LangTest end-to-end language model pipeline showing iterative steps: model training, evaluation, bias and robustness testing, dataset augmentation, retraining on augmented data, re-evaluation, and repeated testing to improve fairness and reliability.\" width=\"1200\" height=\"628\" \/><\/figure>\n<ol>\n<li><em>Train a Language Model on your dataset:<\/em> To begin, the user provides a dataset to train an initial language model. This dataset should be diverse and representative of the real-world scenarios where the model will be deployed.<\/li>\n<li><em>Evaluate the model on the test set:<\/em> Once your model is trained, it is evaluated on the provided test dataset to assess its performance on unseen data.<\/li>\n<li><em>Test the model on a set of tests:<\/em> The pipeline then leverages the comprehensive set of bias tests provided by <em>LangTest<\/em> to evaluate the model\u2019s behaviour for potential biases. These tests are carefully designed to capture various forms of bias, including gender, race, and cultural biases.<\/li>\n<li><em>Augment the training set based on the tests outcomes:<\/em> The pipeline uses the results from the bias tests to identify and augment the training dataset with specific counterexamples. These counterexamples are carefully crafted to reduce biases and encourage the model to make more equitable predictions.<\/li>\n<li><em>Retrain your model on the augmented training data:<\/em> With the augmented training dataset, the model is retrained to incorporate the new information and further reduce biases in its output.<\/li>\n<li><em>Evaluate the freshly trained model:<\/em> The retrained model is evaluated on the same test dataset to measure its improved performance compared to the initial model.<\/li>\n<li><em>Run tests and compare the two models performance:<\/em> Finally, the pipeline will test the newly trained model and provides a detailed performance comparison between the initial and retrained models, highlighting the effectiveness of the bias mitigation process.<\/li>\n<\/ol>\n<p>In a nutshell the newly added pipelines offer the three advantages:<\/p>\n<ul>\n<li><strong>Comprehensive Bias Detection:<\/strong> The pipeline\u2019s integration of <em>LangTest<\/em> bias tests ensures that a wide range of biases is identified, allowing developers to gain a holistic understanding of their model\u2019s behaviour.<\/li>\n<li><strong>Data-Driven Bias Mitigation:<\/strong> By augmenting the training dataset based on the test outcomes, the pipeline offers a data-driven approach to bias mitigation. This leads to more accurate and targeted improvements in the model\u2019s performance.<\/li>\n<li><strong>Iterative Improvement:<\/strong> The pipeline enables an iterative process of training, evaluation, and augmentation, making it easier for developers to refine their models over time and achieve higher levels of fairness.<\/li>\n<\/ul>\n<h2>Let\u2019s get started!<\/h2>\n<p>Now that we understand the power of those pipelines let us understand how we can use them on a real life example and with a single line of code! We will show here how to train and fix a named-entity recognition model.<\/p>\n<p>First of all we need to install the package:<\/p>\n<div class=\"oh\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"\">pip install langtest<\/pre>\n<\/div>\n<p>Now that the package is installed choose your favourite model and dataset! For the sake of this example we chose to use <code class=\"code_inline\">bert-base-cased<\/code> and train it on the ConLL dataset. All you need to do is to run the following command line:<\/p>\n<div class=\"oh\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"\">python3 langtest\/pipelines\/transformers\/ner_pipeline.py run \\\n  --model-name=&quot;bert-base-cased&quot; \\\n  --train-data=train.conll \\\n  --eval-data=test.conll \\\n  --training-args=&#039;{&quot;per_device_train_batch_size&quot;: 8}&#039;<\/pre>\n<\/div>\n<p>And that&#8217;s it, you have successfully trained a BERT model on your dataset, identify its weaknesses and fixed them!<br \/>\nHere is a quick look at the output of the pipeline:<\/p>\n<figure id=\"attachment_87472\" aria-describedby=\"caption-attachment-87472\" style=\"width: 1200px\" class=\"wp-caption alignnone tac mb50\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-87472 size-full\" src=\"https:\/\/www.johnsnowlabs.com\/wp-content\/uploads\/2024\/10\/img_blog_4.webp\" alt=\"Comparison table showing NER model performance before and after LangTest data augmentation, with reduced loss and improved precision, recall, and F1 score after retraining.\" width=\"1200\" height=\"628\" \/><figcaption id=\"caption-attachment-87472\" class=\"wp-caption-text\">Evaluation results before and after augmenting the train dataset<\/figcaption><\/figure>\n<p>We can clearly observe that the model\u2019s performance on the provided test set significantly increased thanks to the dataset augmentation. In fact, under the hood <code class=\"code_inline\">langtest<\/code> has ran several tests to identify weaknesses. Once those flaws were identified <code class=\"code_inline\">langtest<\/code> generated new samples to train the model on those shortcomings. Note that the evaluation dataset is kept unchanged.<\/p>\n<p>You can now load and use the model trained on the augmented train dataset using the <code class=\"code_inline\">transformers<\/code> library:<\/p>\n<div class=\"oh\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"\">\nfrom transformers import AutoTokenizer, AutoModel\n\nmodel = AutoModel.from_pretrained(&quot;augmented_checkpoints\/&quot;)\ntokenizer = AutoTokenizer.from_pretrained(&quot;augmented_checkpoints\/&quot;)<\/pre>\n<\/div>\n<h2>What Happens Under the Hood<\/h2>\n<p>To achieve such a level of simplicity we use a combination of tools:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/JohnSnowLabs\/langtest\" target=\"_blank\" rel=\"noopener\">Langtest<\/a>: to perform the weaknesses detection and dataset augmentation<\/li>\n<li><a href=\"https:\/\/docs.metaflow.org\/\" target=\"_blank\" rel=\"noopener\">Metaflow<\/a>: to orchestrate the different steps of the pipeline<\/li>\n<li><a href=\"https:\/\/huggingface.co\/docs\/transformers\/main\/en\/index\" target=\"_blank\" rel=\"noopener\">Transformers<\/a>: to define the model and perform the actual training<\/li>\n<\/ul>\n<p>Note that we plan on supporting other third party libraries than <code class=\"code_inline\">transformers<\/code> to train and define language models. In order to customise training one can pass training arguments through the <code class=\"code_inline\">--training-args<\/code> flag, these parameters will directly be passed to the <code class=\"code_inline\">transformers.Trainer<\/code> . Also, in the above example we use the default <code class=\"code_inline\">langtest<\/code> tests configuration. One can specify its own tests and values through the <code class=\"code_inline\">--config<\/code> flag (see <a href=\"https:\/\/langtest.org\/docs\/pages\/docs\/config\" target=\"_blank\" rel=\"noopener\">here<\/a> for me information).<\/p>\n<h2>Conclusion<\/h2>\n<p>The end-to-end language pipeline in <a href=\"https:\/\/langtest.org\/\" target=\"_blank\" rel=\"noopener\">LangTest<\/a> empowers NLP practitioners to tackle biases in language models with a comprehensive, data-driven, and iterative approach. As we strive for <a title=\"Why is responsible ai practice important to an organization\" href=\"https:\/\/pacific.ai\/staging\/3667\/why-is-responsible-ai-practices-important-to-an-organization\/\">responsible AI<\/a> development, this new feature in <a href=\"https:\/\/github.com\/JohnSnowLabs\/langtest\/\" target=\"_blank\" rel=\"noopener\">LangTest<\/a> is a step forward in promoting easy to use ethical AI practices and <a title=\"AI governance tool\" href=\"https:\/\/pacific.ai\/staging\/3667\/ai-policies\/\">ensuring the responsible deployment of language models<\/a> in real-world scenarios.<\/p>\n<h2>FAQ<\/h2>\n<p><strong>What are the main stages of LangTest\u2019s end-to-end pipeline?<\/strong><\/p>\n<p>The NER pipeline includes model training, evaluation, bias testing, data augmentation, retraining, and model comparison, creating a fully iterative loop for continuous fairness improvement.<\/p>\n<p><strong>How does LangTest detect bias in language models?<\/strong><\/p>\n<p>It runs a suite of comprehensive bias tests\u2014like demographic name and pronoun swaps\u2014on models to reveal differences in performance across sensitive groups.<\/p>\n<p><strong>How does data augmentation reduce model bias?<\/strong><\/p>\n<p>When tests surface weaknesses, LangTest augments the dataset with targeted examples (e.g., underrepresented names), then retrains and reevaluates the model to improve fairness.<\/p>\n<p><strong>Can LangTest compare multiple models automatically?<\/strong><\/p>\n<p>Yes\u2014the pipeline supports model comparison, generating reports that highlight performance and fairness differences between model versions.<\/p>\n<p><strong>How do developers run the full pipeline in a single step?<\/strong><\/p>\n<p>LangTest provides a command-line interface where a single command trains, biases, augments, retrains, and outputs a final evaluation\u2014simplifying the bias mitigation workflow.<\/p>\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What are the main stages of LangTest\u2019s end-to-end pipeline?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"The NER pipeline includes model training, evaluation, bias testing, data augmentation, retraining, and model comparison, creating a fully iterative loop for continuous fairness improvement.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"How does LangTest detect bias in language models?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"It runs a suite of comprehensive bias tests\u2014like demographic name and pronoun swaps\u2014on models to reveal differences in performance across sensitive groups.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"How does data augmentation reduce model bias?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"When tests surface weaknesses, LangTest augments the dataset with targeted examples (e.g., underrepresented names), then retrains and reevaluates the model to improve fairness.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Can LangTest compare multiple models automatically?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Yes\u2014the pipeline supports model comparison, generating reports that highlight performance and fairness differences between model versions.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"How do developers run the full pipeline in a single step?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"LangTest provides a command-line interface where a single command trains, biases, augments, retrains, and outputs a final evaluation\u2014simplifying the bias mitigation workflow.\"\n      }\n    }\n  ]\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>John Snow Labs developed LangTest to address biases in language models. The library provides comprehensive tests to detect biases in language models. We introduce an end-to-end NLP pipeline, which involves training, evaluating, testing for biases, augmenting the dataset, retraining, and comparing models. This pipeline offers three advantages: comprehensive bias detection, data-driven bias mitigation, and iterative [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":333,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"nf_dc_page":"","content-type":"","inline_featured_image":false,"footnotes":""},"categories":[118],"tags":[],"class_list":["post-191","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LangTest: Unveiling &amp; Fixing Biases with End-to-End NLP Pipelines - Pacific AI<\/title>\n<meta name=\"description\" content=\"If you are interested in the state-of-the-art AI solutions, get more in the article LangTest: Unveiling &amp; Fixing Biases with End-to-End NLP Pipelines\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LangTest: Unveiling &amp; Fixing Biases with End-to-End NLP Pipelines - Pacific AI\" \/>\n<meta property=\"og:description\" content=\"If you are interested in the state-of-the-art AI solutions, get more in the article LangTest: Unveiling &amp; Fixing Biases with End-to-End NLP Pipelines\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/\" \/>\n<meta property=\"og:site_name\" content=\"Pacific AI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/Pacific-AI\/61566807347567\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-05T19:00:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-21T10:59:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pacific.ai\/wp-content\/uploads\/2024\/12\/7.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"550\" \/>\n\t<meta property=\"og:image:height\" content=\"440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"David Talby\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Talby\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/\"},\"author\":{\"name\":\"David Talby\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#\\\/schema\\\/person\\\/8a2b4d5d75c8752d83ae6bb1d44e0186\"},\"headline\":\"LangTest: Unveiling &#038; Fixing Biases with End-to-End NLP Pipelines\",\"datePublished\":\"2024-11-05T19:00:48+00:00\",\"dateModified\":\"2026-01-21T10:59:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/\"},\"wordCount\":1164,\"publisher\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/7.webp\",\"articleSection\":[\"Articles\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/\",\"url\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/\",\"name\":\"LangTest: Unveiling & Fixing Biases with End-to-End NLP Pipelines - Pacific AI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/7.webp\",\"datePublished\":\"2024-11-05T19:00:48+00:00\",\"dateModified\":\"2026-01-21T10:59:43+00:00\",\"description\":\"If you are interested in the state-of-the-art AI solutions, get more in the article LangTest: Unveiling & Fixing Biases with End-to-End NLP Pipelines\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/#primaryimage\",\"url\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/7.webp\",\"contentUrl\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/7.webp\",\"width\":550,\"height\":440,\"caption\":\"LangTest evaluation workflow for custom LLM and NLP models, showing automated testing pipelines, dataset augmentation, and before-and-after performance metrics for safety, robustness, and model quality assessment.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pacific.ai\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"LangTest: Unveiling &#038; Fixing Biases with End-to-End NLP Pipelines\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#website\",\"url\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/\",\"name\":\"Pacific AI\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#organization\",\"name\":\"Pacific AI\",\"url\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/site_logo.svg\",\"contentUrl\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/site_logo.svg\",\"width\":182,\"height\":41,\"caption\":\"Pacific AI\"},\"image\":{\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/people\\\/Pacific-AI\\\/61566807347567\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/pacific-ai\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/#\\\/schema\\\/person\\\/8a2b4d5d75c8752d83ae6bb1d44e0186\",\"name\":\"David Talby\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/David_portret-96x96.webp\",\"url\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/David_portret-96x96.webp\",\"contentUrl\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/David_portret-96x96.webp\",\"caption\":\"David Talby\"},\"description\":\"David Talby is a CTO at Pacific AI, helping healthcare &amp; life science companies put AI to good use. David is the creator of Spark NLP \u2013 the world\u2019s most widely used natural language processing library in the enterprise. He has extensive experience building and running web-scale software platforms and teams \u2013 in startups, for Microsoft\u2019s Bing in the US and Europe, and to scale Amazon\u2019s financial systems in Seattle and the UK. David holds a PhD in computer science and master\u2019s degrees in both computer science and business administration.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/davidtalby\\\/\"],\"url\":\"https:\\\/\\\/pacific.ai\\\/staging\\\/3667\\\/author\\\/david\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LangTest: Unveiling & Fixing Biases with End-to-End NLP Pipelines - Pacific AI","description":"If you are interested in the state-of-the-art AI solutions, get more in the article LangTest: Unveiling & Fixing Biases with End-to-End NLP Pipelines","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"LangTest: Unveiling & Fixing Biases with End-to-End NLP Pipelines - Pacific AI","og_description":"If you are interested in the state-of-the-art AI solutions, get more in the article LangTest: Unveiling & Fixing Biases with End-to-End NLP Pipelines","og_url":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/","og_site_name":"Pacific AI","article_publisher":"https:\/\/www.facebook.com\/people\/Pacific-AI\/61566807347567\/","article_published_time":"2024-11-05T19:00:48+00:00","article_modified_time":"2026-01-21T10:59:43+00:00","og_image":[{"width":550,"height":440,"url":"https:\/\/pacific.ai\/wp-content\/uploads\/2024\/12\/7.webp","type":"image\/webp"}],"author":"David Talby","twitter_card":"summary_large_image","twitter_misc":{"Written by":"David Talby","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/#article","isPartOf":{"@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/"},"author":{"name":"David Talby","@id":"https:\/\/pacific.ai\/staging\/3667\/#\/schema\/person\/8a2b4d5d75c8752d83ae6bb1d44e0186"},"headline":"LangTest: Unveiling &#038; Fixing Biases with End-to-End NLP Pipelines","datePublished":"2024-11-05T19:00:48+00:00","dateModified":"2026-01-21T10:59:43+00:00","mainEntityOfPage":{"@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/"},"wordCount":1164,"publisher":{"@id":"https:\/\/pacific.ai\/staging\/3667\/#organization"},"image":{"@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/#primaryimage"},"thumbnailUrl":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2024\/12\/7.webp","articleSection":["Articles"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/","url":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/","name":"LangTest: Unveiling & Fixing Biases with End-to-End NLP Pipelines - Pacific AI","isPartOf":{"@id":"https:\/\/pacific.ai\/staging\/3667\/#website"},"primaryImageOfPage":{"@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/#primaryimage"},"image":{"@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/#primaryimage"},"thumbnailUrl":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2024\/12\/7.webp","datePublished":"2024-11-05T19:00:48+00:00","dateModified":"2026-01-21T10:59:43+00:00","description":"If you are interested in the state-of-the-art AI solutions, get more in the article LangTest: Unveiling & Fixing Biases with End-to-End NLP Pipelines","breadcrumb":{"@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/#primaryimage","url":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2024\/12\/7.webp","contentUrl":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2024\/12\/7.webp","width":550,"height":440,"caption":"LangTest evaluation workflow for custom LLM and NLP models, showing automated testing pipelines, dataset augmentation, and before-and-after performance metrics for safety, robustness, and model quality assessment."},{"@type":"BreadcrumbList","@id":"https:\/\/pacific.ai\/langtest-unveiling-fixing-biases-with-end-to-end-nlp-pipelines\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pacific.ai\/"},{"@type":"ListItem","position":2,"name":"LangTest: Unveiling &#038; Fixing Biases with End-to-End NLP Pipelines"}]},{"@type":"WebSite","@id":"https:\/\/pacific.ai\/staging\/3667\/#website","url":"https:\/\/pacific.ai\/staging\/3667\/","name":"Pacific AI","description":"","publisher":{"@id":"https:\/\/pacific.ai\/staging\/3667\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pacific.ai\/staging\/3667\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/pacific.ai\/staging\/3667\/#organization","name":"Pacific AI","url":"https:\/\/pacific.ai\/staging\/3667\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pacific.ai\/staging\/3667\/#\/schema\/logo\/image\/","url":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2025\/06\/site_logo.svg","contentUrl":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2025\/06\/site_logo.svg","width":182,"height":41,"caption":"Pacific AI"},"image":{"@id":"https:\/\/pacific.ai\/staging\/3667\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/Pacific-AI\/61566807347567\/","https:\/\/www.linkedin.com\/company\/pacific-ai\/"]},{"@type":"Person","@id":"https:\/\/pacific.ai\/staging\/3667\/#\/schema\/person\/8a2b4d5d75c8752d83ae6bb1d44e0186","name":"David Talby","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2025\/03\/David_portret-96x96.webp","url":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2025\/03\/David_portret-96x96.webp","contentUrl":"https:\/\/pacific.ai\/staging\/3667\/wp-content\/uploads\/2025\/03\/David_portret-96x96.webp","caption":"David Talby"},"description":"David Talby is a CTO at Pacific AI, helping healthcare &amp; life science companies put AI to good use. David is the creator of Spark NLP \u2013 the world\u2019s most widely used natural language processing library in the enterprise. He has extensive experience building and running web-scale software platforms and teams \u2013 in startups, for Microsoft\u2019s Bing in the US and Europe, and to scale Amazon\u2019s financial systems in Seattle and the UK. David holds a PhD in computer science and master\u2019s degrees in both computer science and business administration.","sameAs":["https:\/\/www.linkedin.com\/in\/davidtalby\/"],"url":"https:\/\/pacific.ai\/staging\/3667\/author\/david\/"}]}},"_links":{"self":[{"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/comments?post=191"}],"version-history":[{"count":11,"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"predecessor-version":[{"id":2126,"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/posts\/191\/revisions\/2126"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/media\/333"}],"wp:attachment":[{"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pacific.ai\/staging\/3667\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}