FDEInterviews logo
Coding & DSA / 60
easyOpenAIAnthropicGlean

Parse a JSON-lines file of LLM logs and aggregate tokens generated per request.

Real LLM logs are JSONL, not JSON, and real log files have a malformed line halfway through. The warm-up that screens whether you can stream a file and aggregate without one bad record nuking the whole run.

Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.

Real LLM logs are JSONL, not JSON, and real log files have a malformed line halfway through. The warm-up that screens whether you can stream a file and aggregate without one bad record nuking the whole run.

20 answers per topic instead of 10, plus saved progress and bookmarks · no cardor unlock all 523 remaining answers · ₹2,000 / $25
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

The discriminator is the malformed line. Candidates who call json.loads on the entire file fail immediately because JSONL is one object per line, not an array. The ones who then forget to wrap per-line parsing in a try/except crash on the first truncated write, which in production is the line your batch job died on. A senior answer counts skipped lines and keeps going.

DISCUSSION · 0

No comments yet — be the first to share your approach.