F12
SNAP is F12's low-code front-end framework, where the interface is built from Blockly blocks. We built an AI layer for it: it generates a block from a text description, modifies an existing block, fixes one from an error message, and explains one from a screenshot.
Tech stack
SNAP blocks are described in their own XML format. A general language model doesn't know it, so training data and prompts tailored to the format were needed.
A text description becomes SNAP block XML, and an existing block can be changed by describing the change.
From an error message and XML, the model returns a fixed block. From a screenshot and XML, it explains what a block does.
We collected the examples from the SNAP interface with a browser extension, converted them from CSV to JSONL, and fine-tuned a language model on them.
training examples from SNAP blocks
AI endpoints: generate, modify, fix, explain, ask
skill levels the answers adapt to

A SNAP developer can ask in text for a new block, a change or a fix, and get an explanation from a screenshot. The model learned from examples collected on the SNAP interface.