LLM Validation and Testing at Scale: GitLab's Comprehensive Model Evaluation Framework

gitlab · Tech · 2024 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Enterprise LLM evaluation

GitLab needed to validate GitLab Duo AI features across many DevSecOps use cases without using customer data, while avoiding one-off anecdotal judgments, prompt overfitting, model-provider lock-in, and regressions during active feature development.

Constraints:

Architecture

GitLab built a Centralized Evaluation Framework that uses thousands of curated prompt/answer pairs across dozens of GitLab Duo use cases. The framework feeds representative questions to multiple foundation models, compares responses against ground-truth target answers with metrics such as Cosine Similarity, Cross Similarity, LLM Judge, and Consensus Filtering with LLM Judge, establishes daily baselines, and supports a tiered iteration loop where prompt changes are tried on focused mini-proxies, checked on broader subsets, and then validated against the full framework before production.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  A["Prompt library"] --> B["Model evaluation runner"]
  B --> C["Foundation model providers"]
  B --> D["Metric scoring suite"]
  B --> E["Daily baseline tracker"]
  D --> F["Pattern analysis loop"]
  E --> F
  F --> G["Mini-proxy datasets"]
  A --> G
  G --> H["Production release gate"]
  E --> H
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Prompt library Holds representative question/answer pairs that proxy production inputs and target answers without using customer data. Model evaluation runner, Mini-proxy datasets
Model evaluation runner Feeds questions into candidate models and GitLab Duo feature prompts for comparison against ground truth. Prompt library, Foundation model providers, Metric scoring suite, Daily baseline tracker
Foundation model providers Provide Google and Anthropic foundation models considered for GitLab Duo use cases. Model evaluation runner
Metric scoring suite Computes Cosine Similarity, Cross Similarity, LLM Judge, and Consensus Filtering with LLM Judge rankings. Model evaluation runner, Pattern analysis loop
Daily baseline tracker Tracks feature performance during active development and compares changes against prior baselines. Model evaluation runner, Pattern analysis loop, Production release gate
Pattern analysis loop Finds weak areas, metric-specific failures, and question-type regressions from scale-test scores. Metric scoring suite, Mini-proxy datasets
Mini-proxy datasets Provide focused and broad subsets for faster prompt iteration before the full framework is run. Prompt library, Pattern analysis loop, Production release gate
Production release gate Allows a prompt or feature change forward only after target improvements and no broad degradation are validated. Daily baseline tracker, Mini-proxy datasets

Data flow

GitLab creates a representative prompt library from human-generated or synthetic question/answer pairs, routes the questions through candidate models or feature prompts, scores generated responses against target answers using multiple metrics, stores the resulting baselines, inspects weak areas for patterns, experiments on focused and broad mini-proxy datasets, and finally reruns the full Centralized Evaluation Framework against the new prompt or feature change before production release.

4 supporting quotes
“This prompt library is composed of questions and answers. The questions represent the kinds of queries or inputs that we would expect to see in production”article, stated
“We compare each response to our ground truth and provide it a ranking based on a series of metrics including”article, stated
“Each cycle, we examine the scores from our tests at scale to identify patterns”article, stated
“The entire Centralized Evaluation Framework is then run against the new prompt and we validate that it has increased the performance of the entire feature against the baseline from the day before.”article, stated

Why this architecture

GitLab separates representative prompt data, model scoring, baseline tracking, and staged validation because LLM quality cannot be judged from isolated examples. The tiered design gives developers fast feedback on focused changes while preserving a full-scale regression gate before production.

3 supporting quotes
“We, therefore, cannot judge the quality of an LLM’s output in an individual or anecdotal fashion; instead, we need to be able to examine the overall pattern of an LLM's behavior.”article, stated
“At GitLab, we re-validate the performance of our features on a daily basis during active development to help ensure that all changes improve the overall functionality.”article, stated
“However, testing at scale is both expensive and time-consuming. To enable faster and less expensive iteration, we craft a smaller scale dataset to act as a mini-proxy.”article, stated

Models used: Google foundation models · Anthropic foundation models · LLM Judge

Scale

Alternatives considered (roads not taken)

Use customer data directly for training or evaluation examples

Rejected because: GitLab states it does not view or use customer data for AI training, so it built a production-proxy prompt library instead.

“While other companies view and use customer data to train their AI features, GitLab currently does not.”article, stated

Rely on generic benchmark prompt datasets

Rejected because: Generic benchmarks may not reflect GitLab Duo feature requirements, so the library is specific to GitLab use cases.

“There are numerous benchmark prompt datasets, but those datasets may not be reflective of the use cases that we see for features at GitLab.”article, stated

Prompt-engineer changes without broad validation

Rejected because: A prompt change can solve one problem while causing many regressions that isolated testing would miss.

“You may solve one problem, but be causing a dozen more. You would never know.”article, stated

Run the full evaluation framework for every small iteration

Rejected because: Full-scale testing is expensive and slow, so focused and broad mini-proxies provide faster iteration before final validation.

“However, testing at scale is both expensive and time-consuming. To enable faster and less expensive iteration, we craft a smaller scale dataset to act as a mini-proxy.”article, stated

Patterns

eval-driven-development (evaluation)

The Centralized Evaluation Framework guides model selection, daily development validation, prompt iteration, and production release decisions using scale-test scores and baselines.

“Creating a baseline for a model's performance allows us to track how we are changing behavior over time for all our necessary use cases.”article, stated
“Only when we test at scale do these kinds of patterns begin to emerge and allow us to focus our experiments.”article, stated

llm-as-judge (evaluation)

GitLab includes LLM Judge and Consensus Filtering with LLM Judge among the metrics used to rank model responses against target answers.

“We compare each response to our ground truth and provide it a ranking based on a series of metrics including: Cosine Similarity Score, Cross Similarity Score, LLM Judge, and Consensus Filtering with an LLM Judge.”article, stated

model-routing (architecture)

GitLab avoids binding GitLab Duo to one provider and continuously evaluates which Google or Anthropic foundation models fit each use case.

“GitLab is not tied to a single model provider by design.”article, stated
“we continuously assess what models are the right matches for GitLab Duo’s use cases.”article, stated

synthetic-data-generation (data)

The prompt library can include synthetically created question/answer pairs to represent production-like cases without using customer data.

“Both the question and the answer may be human generated, but are not necessarily so.”article, stated
“we needed to develop a comprehensive prompt library that is a proxy for both the scale and activity of production.”article, stated

privacy-preserving-processing (governance)

The evaluation corpus is designed around production-proxy prompts because GitLab does not use customer data to train AI features.

“GitLab currently does not.”article, stated
“As a result, we needed to develop a comprehensive prompt library that is a proxy for both the scale and activity of production.”article, stated

Tradeoffs

Build a production-proxy prompt library

Chose Representative question/answer pairs for GitLab Duo use cases over Using customer data or generic public benchmarks.

Rationale: The proxy library preserves privacy while matching GitLab's specific feature requirements better than generic datasets.

“Again, a key element of a comprehensive prompt library is ensuring that it is representative of the inputs that we expect to see in production.”article, stated

Use multiple evaluation metrics

Chose Similarity metrics plus LLM Judge and consensus filtering over A single score or manually judged examples.

Rationale: GitLab treats LLM evaluation as unsolved and continuously iterated, so multiple scoring signals reduce dependence on one imperfect metric.

“It is important to note this isn’t a solved problem; the wider AI industry is actively researching and developing new techniques.”article, stated

Validate changes through staged datasets

Chose Focused subset, broader subset, then full CEF validation over Directly shipping after a local prompt improvement.

Rationale: The staged approach accelerates iteration while checking that the change improves the target area and does not degrade unrelated behavior.

“Once we have found a prompt that addresses the specific use case we are working on with the focused subset, we validate that prompt against a broader subset of data”article, stated

Keep model providers swappable

Chose A diverse set of models from providers such as Google and Anthropic over Single-provider model lock-in.

Rationale: Different LLMs suit different characteristics and use cases, so GitLab continuously assesses the right model matches.

“LLMs can be optimized for different characteristics, which is why there are so many AI models actively being developed.”article, stated

Gotchas (what bit them)

Anecdotal LLM evaluation misses behavioral patterns.

Root cause: LLM outputs vary across contexts and stochastic samples, so individual examples do not reveal overall quality or robustness.

Resolution: Evaluate thousands of prompts across dozens of use cases to inspect aggregate behavior patterns.

“We, therefore, cannot judge the quality of an LLM’s output in an individual or anecdotal fashion; instead, we need to be able to examine the overall pattern of an LLM's behavior.”article, stated

Prompt improvements can overfit one case and regress many others.

Root cause: Without validation, teams can tune model behavior for a local failure while degrading unrelated use cases.

Resolution: Use focused mini-proxies, broader subsets, daily re-validation, and full CEF runs before production release.

“focusing entirely on changing the behavior of a model via prompting (or any other technique) without validation means that you are operating in the dark and very possibly overfitting your prompting.”article, stated

Full-scale evaluation slows experimentation.

Root cause: Testing at scale is expensive and time-consuming.

Resolution: Create smaller focused and broad mini-proxy datasets to test changes cheaply before running the entire framework.

“testing at scale is both expensive and time-consuming. To enable faster and less expensive iteration, we craft a smaller scale dataset to act as a mini-proxy.”article, stated

Generic benchmarks may not map to product-specific quality.

Root cause: Benchmarks can miss the actual inputs and use cases seen by GitLab Duo features.

Resolution: Build a prompt library specific to GitLab features and expected production inputs.

“Our prompt library is designed to be specific to GitLab features and use cases.”article, stated

Evaluation

CEF evaluates model and feature behavior by comparing candidate responses to ground-truth target answers over thousands of prompts and dozens of use cases, scoring outputs with similarity metrics and LLM-based judging, tracking baselines during daily development, and validating changes against focused, broad, and full-scale datasets.

Metrics: Cosine Similarity Score · Cross Similarity Score · LLM Judge · Consensus Filtering with LLM Judge · Daily baseline delta · Use-case and metric-specific weak-area patterns

3 supporting quotes
“provide it a ranking based on a series of metrics including: Cosine Similarity Score, Cross Similarity Score, LLM Judge, and Consensus Filtering with an LLM Judge.”article, stated
“Do we see consistent errors popping up in response to a certain kind of question?”article, stated
“Only when we believe that the new prompt improves our performance in our target area through validation metrics AND doesn’t degrade performance elsewhere, do we push that change to production.”article, stated

Outcomes

The report does not disclose model-specific performance numbers, but the operating scale is explicit: thousands of prompts, dozens of use cases, daily re-validation, and provider comparisons across Google and Anthropic foundation models.

3 supporting quotes
“This first iteration provides us a baseline for how well each model is performing, and guides our selection of a foundational model for our features.”article, stated
“This process has been developed as we’ve brought”article, stated
“But we have data-driven insights into those impacts, which helps us ensure that GitLab Duo is always getting better.”article, stated