Taming Local AI: Fighting LLM Hallucinations with GBNF

You’re 30 minutes from a production deployment. You have a 50MB production JSON blob, and you just need to extract one field. You reach for your AI assistant… and you stop. Are you really about to paste sensitive, internal production data into a third-party API? So, what’s the alternative? Spend 10 minutes manually wrestling with jq syntax, breaking your flow and killing your velocity? This exact moment highlights a broken choice developers face daily: sacrifice privacy for productivity, or sacrifice productivity for privacy. ...

October 29, 2025 · Nikolay Sedelnikov

Augmenting Python with guard expressions using AST modification

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it?” Brian W. Kernighan In previous post I described the way to use Python AST for static analysis. In this post I will show you how to add guard expressions support to Python with (relatively) simple Abstract Syntax Tree modification. ...

January 14, 2019

Visualizing Django signals using AST analysis

A lot of articles have been published on Abstract Syntax Tree in Python, but most of them are limited to basic AST traversal and in-place modification. These examples may be good for basic understanding of AST, but there are no examples of practical use of AST traversal. Many times I read such articles and wondered how can I use it to solve real-world problems. In this article I’ll show how to create graph of Django signals using AST traversal technique and NetworkX library. ...

January 13, 2019

Conditional debugging in production

Imagine how easier your life could be if you were able to use debug output in production? Often, when maintaining services, you deal with support tickets describing bugs, in which there is not enough information to diagnose and fix the problem. In such cases your options are usually limited to: contact support engineer for additional information, try to recreate user environment in which bug occured and try to find signs of error in logs. ...

December 7, 2018