How I built an LLM eval harness that took AI output from 24% to 97% valid
A blind pairwise judge, a pinned prompt registry and one harness bug that silently inverted our model rankings. A practical guide to LLM evals for code generation.
Describe what you do and Krofile AI writes a unique, on-brand business card as live React in seconds, validated, sandboxed and editable section by section.

Krofile is an AI digital business card platform. You describe what you do, and Krofile AI writes a unique, on-brand card as live React that you share by link, QR code or NFC, with lead capture and analytics built in. I led V2, the AI-first rebuild that went to production in October 2026, end to end: the web apps, backend, DevOps and AI.
I built the AI engine end to end: a Haiku pre-flight with 20 industry playbooks, Sonnet 5 generation behind a multi-model gateway with GPT-5 failover, prompt caching and per-call cost telemetry, a validate-and-repair quality gate, section-level AI editing, and a shared contract package plus sandboxed renderer that make it safe to run model-written code. I also shipped Stripe credit billing, Teams and an OAuth 2.1 MCP server, so customers' AI assistants can work with their leads directly.
Everything was measured with a 34-brief eval harness and a blind LLM judge. That is how four Claude models were approved for users and how the structured path went from 24% to 97% valid. I worked with Claude Code inside a multi-agent workflow I set up across the six repositories.
Before V2, I architected the original platform (an Express.js and Nest.js microservice backend behind the web apps) and led a team of five developers building subscriptions, promotions, QR analytics and automation workers. That version has its own V1 case study.
This is my own Krofile card, served live by the production renderer. Tap through it, save the contact or open the full card to see it the way recipients do.
Open the full cardCore functionality and capabilities that make this project stand out
Key Technologies I Used on This Project
• Running model-written React safely: closing validator bypasses (optional chaining, destructuring, reflection) and a sandbox handshake race across three renderers.
• Taking structured output from 24% to 97% valid by fixing truncation and the JSON-schema keywords the API rejected, at the source.
• Catching, through cost telemetry, that production was silently calling a retired model ID and failing over to GPT-5.
• Keeping evals honest: a harness bug that never sent the effort setting had inverted the model rankings until it was found.
• Shipping V2 to production with a rehearsed V1-to-V2 migration while existing customers kept their cards live.
• Instrument every model call (tokens, cache hits, cost, failovers) before optimizing anything.
• An eval only means something when it matches the configuration you actually ship.
• Treat generated code as hostile: allowlists, validators and sandboxing, in depth.
• Ship behind flags whose off path behaves exactly like before.
• Agentic development with Claude Code plus adversarial review agents catches money and security bugs that green tests miss.
Deeper dives into how parts of it were built.
A blind pairwise judge, a pinned prompt registry and one harness bug that silently inverted our model rankings. A practical guide to LLM evals for code generation.
When a model writes the React your users see, treat its output as hostile. Here's the defence in depth we use: a shared contract, AST validators, a quality gate and a cross-origin sandbox.
What it took to let customers connect Claude and ChatGPT to their own data safely: OAuth 2.1 with PKCE, dynamic client registration, scoped tools, live permissions and rate limits per connection.
This project showcases practical development skills and problem-solving experience. Explore the features, review the implementation, or get in touch to discuss similar work.