How to Evaluate LLMs Before Production: Lessons from GitHub Secret Scanning

GitHub's secret scanning experience reveals the core methodology for rigorous pre-production LLM evaluation.
Drawing on GitHub's real-world experience with secret scanning, this article systematically outlines how to rigorously evaluate LLMs before production deployment. It covers three key dimensions: defining business-aligned metrics and balancing precision against recall based on actual risk tolerance; building high-quality evaluation datasets that reflect true production distributions; and treating evaluation as a continuous, iterative process rather than a one-time gate — using failure case analysis to refine model behavior over time.
Before deploying a large language model (LLM) to production, evaluating its performance and reliability is a critical — yet often underestimated — task. The GitHub team recently shared their hands-on experience evaluating LLMs in a real-world scenario: secret scanning. Their insights offer valuable lessons for any team planning to integrate LLMs into mission-critical workflows.
Why Pre-Production LLM Evaluation Matters
LLMs often look impressive in demo environments, but once they encounter the complex data distributions of the real world, performance can degrade significantly. Secret scanning is a classic high-stakes scenario: the model must accurately identify leaked API keys, tokens, and credentials from vast amounts of code.

In tasks like this, both false positives and false negatives carry a high cost. A false negative means a real security threat slips through, potentially leading to a data breach. A false positive floods the security team with noise, causing genuine threats to be overlooked. Establishing a rigorous evaluation framework before deployment is therefore a prerequisite for ensuring the model is actually usable.
The Foundation of Evaluation: Defining Clear LLM Metrics
The first step in evaluating an LLM isn't running the model — it's clarifying what you're measuring. For classification tasks like secret scanning, traditional machine learning metrics remain both applicable and essential.
The Precision–Recall Trade-off
In security contexts, there is an inherent tension between precision and recall. Pursuing high recall — catching as many potential secrets as possible — typically comes at the cost of precision, generating a flood of false positives.
The GitHub team emphasizes that evaluation thresholds must be set in light of concrete business objectives. For secret scanning, this means finding the right balance between security coverage and alert noise — a balance that has no universal answer and must be calibrated repeatedly against real data.
Building a High-Quality Evaluation Dataset
The credibility of your evaluation results depends directly on the quality of your evaluation dataset. An ideal evaluation set should:
- Reflect the data distribution found in the real production environment
- Include a variety of edge cases
- Have reliable ground truth labels
If the evaluation data diverges from production data in distribution, even impressive evaluation scores won't reflect how the model actually performs.
From the Lab to Production: A Critical Leap
Many teams achieve strong results in offline evaluation, only to run into serious problems after deploying to production. The reasons behind this are worth examining carefully.
Watch Out for Real-World Data Drift
Production data is constantly changing. New programming languages, new key formats, and new coding patterns emerge continuously. A one-time evaluation cannot guarantee long-term model effectiveness. GitHub's experience shows that evaluation should be an ongoing process, not a one-and-done gate before deployment.
Iterative LLM Evaluation Workflows
Effective LLM evaluation typically follows an iterative loop:
- Evaluate model performance against the current dataset
- Analyze failure cases to understand the model's weaknesses
- Strategically expand the evaluation set or refine prompts
- Re-evaluate and compare results
This iteration not only improves model quality — it deepens the team's understanding of where the model's behavioral boundaries lie.
Key Takeaways from GitHub's Secret Scanning Experience
From GitHub's practice in the secret scanning domain, the essentials of successful LLM evaluation can be distilled into a few key points. First, treat the LLM as one component of a larger system, not an isolated unit — its outputs need to work in concert with downstream processing pipelines and human review workflows. Second, evaluation must closely mirror real-world usage scenarios; benchmarks disconnected from actual use cases tend to produce misleadingly optimistic results. Finally, maintain a clear-eyed understanding of the model's limitations — LLMs are powerful but not omnipotent, and knowing where they excel and where they fall short is essential for making sound architectural decisions.
For teams actively exploring LLM adoption, GitHub's experience serves as a timely reminder: while improving model capabilities matters, a rigorous evaluation methodology grounded in real business needs is ultimately what determines whether an AI application delivers genuine value in practice.
Related articles

The Truth Behind Titanic's Sinking: Key Decisions and Communication Failures in the National Geographic Documentary
National Geographic's The Unsinkable Ship uses survivor testimony to reconstruct Titanic's fatal decisions—from the missing MSG telegram prefix and the broken boiler-room-to-bridge link to how 'unsinkable' thinking delayed damage control and evacuation.

74M-Parameter Open-Source Model Partially Outperforms Jev AI in Testing
Fastino AI's Glider 2.5 models, with just 74M–300M parameters, reportedly outperform Jev AI in some guardrail benchmarks per YouTube testing, run on consumer hardware, and even play Doom. We analyze small models' competitiveness and deployment value on specific tasks.

Gemini 4 Argon Hands-On: Aggressive Pricing, 3D Capabilities Need Coaching
Gemini 4 Argon hands-on: limited-time $2/$10 pricing, million-token output, strong 3D and reverse-engineering work, but weak front-end aesthetics and zero-shot ability need coaching.