Type to search across all articles

Pet Projects & Experiments

50 projects across 7 years

Things I built outside of client work — mostly to answer a question, occasionally because the tool I wanted didn't exist. Some grew into articles on this blog, some into a paper, most stayed exactly as small as they needed to be. The day job is on the CV.

I built diag-vectorizer to reconstruct editable draw.io and Mermaid files from raster diagrams, llm-hotkey to translate, fix, and rephrase text selections on macOS, and ushi to transcribe local speech with attached screenshots. I created Smartfolio as a nested-page knowledge workspace, The Reader's Glossary as a contextual reading companion for Lolita, and Chat archive to Q&A pairs to make a large Telegram chat searchable via semantic Q&A. I developed Friend-or-foe matrix to analyze country relationships, AI paper reviewer to audit manuscripts against their code, and AI curve picker for RawTherapee to select optimal tone curves. I implemented Search explainer over MCP to let local models drive search, TestMySearch to measure search relevance, and Query clustering and typo groups to find near-duplicates in logs. I worked on RAG systems including SAP Commerce docs RAG and semantic_chunking, while also building Saturday Evening Post archive search for historical magazines. Then there are smaller pipelines: Facebook cross-posting pipeline to migrate social media posts, Captioning a photo archive to make photos searchable by content, and Raspberry Pi voice assistant for local voice queries.

I built BloomSpan to mine frequent phrases from large corpora and Bit-sliced signature search for full-text indexing via bitwise operations. I created Saturday Evening Post archive search to make a century of magazine pages findable, Chat archive to Q&A pairs to turn group messages into searchable Q&A, and Facebook cross-posting pipeline to migrate social media posts to personal blogs. I developed SAP Commerce docs RAG and semantic_chunking to answer documentation questions by splitting text by meaning, while Query clustering and typo groups helps find near-duplicates in logs. I wrote Category-Aligned Retrieval to filter search by predicted categories and Boolean query simplifier to clean up complex CMS filters. I built TestMySearch to measure search relevance across engines, Coveo Search Debugger & Exporter to export ranking metrics, and Coveo Search Request Interceptor to modify API parameters. I made Search explainer over MCP so a local model can drive and explain search results, Semantic IDs for a post archive to compress post embeddings into tokens, and Who's Who in Search & RecSys to list key researchers and labs.

I built BloomSpan to mine frequent phrases from large texts using probabilistic counting, and Semantic IDs for a post archive to compress post embeddings into four tokens for retrieval. I created Recommender System Laboratory to compare 25+ recommendation algorithms interactively, with recommenders-samples demonstrating a hybrid ALS and XGBoost approach on MovieLens. I developed Category-Aligned Retrieval to filter search results by predicted product categories, and img2img-turbo for Apple Silicon to port an existing model to run on Mac hardware. I made ML Approximation Playground to visualize how networks fit synthetic functions, and built Chess move predictor to combine neural move proposals with minimax search, while Physical chessboard reader uses a camera and ResNet-18 to feed real board moves to an engine.

I built diag-vectorizer to turn raster diagrams into editable draw.io files, Physical chessboard reader to read moves from a physical board, and Turntable 3D scanner to generate 3D models from video. I created artprojector to align reference images to a canvas and Spline halftone printing to render images as continuous threads. I wrote AI curve picker for RawTherapee to select tone curves for RAW photos and Captioning a photo archive to caption a large photo archive. I also made ambi to find and render 3D ambigram models.

I built E2E CLI to test cascaded REST APIs from JSON recipes, proxy-for-apis-demo to rewrite API traffic without touching the code, and fsdumpviewer to diff filesystem snapshots and generate sync scripts. For search debugging, I created Coveo Search Debugger & Exporter to parse ranking metrics into CSV, Coveo Search Request Interceptor to override query parameters in the browser, and Boolean query simplifier to reduce complex CMS filters. I developed HAC Autosuggestions for autocomplete in the SAP Commerce console, CMS migration through a graph to move content via a graph database, and Hybris → Spring Boot compatibility layer to run Hybris code on Spring Boot. I wrote llm-hotkey to translate and fix text via hotkeys, ushi for local speech-to-text with screenshots, and diag-vectorizer to convert raster diagrams into editable vectors. I also built AI paper reviewer to audit manuscripts against their code, Search explainer over MCP to let local models drive search, This blog to generate my site from Markdown, and Facebook cross-posting pipeline to migrate and sync social media posts.

I built CMS migration through a graph to move content between SAP Commerce instances, and HAC Autosuggestions to speed up typing in the administration console. I created SAP Commerce docs RAG for answering developer questions from the help portal, while Hybris → Spring Boot compatibility layer allows moving code off the platform without changing the database. I also wrote E2E CLI so that cascaded API tests can be defined in JSON recipes rather than code.

I built osbench to benchmark order-sourcing algorithms and TestMySearch for measuring search-relevance improvements across different engines. I created E2E CLI so that teams could run end-to-end API tests from JSON recipes, and I co-architected Hybris → Spring Boot compatibility layer to migrate services off SAP Commerce without changing the database. I also made proxy-for-apis-demo to intercept and rewrite API traffic when I owned neither the frontend nor the backend.

I built osbench to provide a reproducible benchmark for comparing order-sourcing algorithms in an e-commerce network.

I built osbench to benchmark order-sourcing algorithms and BloomSpan for mining frequent substrings in large text corpora. I created Who's Who to curate a directory of search and recsys researchers, and Friend-or-foe matrix to analyze country relationships using LLM classifications. I developed AI paper reviewer to audit manuscripts against their code, and wrote Category-Aligned Retrieval to predict product categories for filtered search.

I built Coveo Search Debugger & Exporter to parse opaque ranking data into discrete metrics and export results to CSV, and Coveo Search Request Interceptor so that I can override API parameters from a JSON config to test search behavior without modifying application code.

I built Piano Ear Trainer to practice intervals and chords by ear, and Tube Color Trainer to identify oil paint tubes from visual swatches. For organizing information, I created Smartfolio to nest pages within other pages for contextual notes, and Read and Learn, a reader that makes you study the words you marked away from the text before you return to it. I also developed volleyball-editor to draw 2D and 3D court diagrams, and This blog to generate static Markdown articles from my previous WordPress content.

I built Piano Ear Trainer to practice intervals and chords by ear, and Tube Color Trainer to identify oil paint tubes from swatches. For language study, I created The Reader's Glossary as a contextual companion for Lolita and Read and Learn to force active recall by hiding translations during review. In machine learning, I developed ML Approximation Playground to visualize network fitting failures, Recommender System Laboratory to compare 25+ algorithms, and Chess move predictor to test a hybrid neural-minimax engine. I also made volleyball-editor to draw 2D and 3D court diagrams for drills.

I built Piano Ear Trainer to practice intervals and chords by ear, and Tube Color Trainer to identify oil paint tubes by sight. For visual art, I created artprojector to overlay reference images on a canvas via a USB camera, and Spline halftone printing to render images as a single continuous thread of Bézier lines. I also developed ambi to find and render 3D ambigram models, and AI curve picker to let an LLM select the best tone curve from a grid of variants.

Nothing here with that tag.

2026

23 projects

data-over-sound

A secret message hidden inside any song

Two laptops side by side: on the right, the transmitter plays a song and shows the typed phrase; on the left, the receiver has printed the same phrase after hearing it through its microphone

One web page plays any song and stitches typed text into it so that the ear can't hear it; another web page listens through a laptop microphone and pulls the text back out of the sound, word by word. The receiver knows nothing about the song, only the protocol.

More about it

The first attempt went to ultrasound, 17.9–19.7 kHz, and worked only while the transmitter and the receiver were the same laptop. Measuring the speaker→room→microphone path between two laptops showed why: −38 dB and a coherence of 0.08 in that band. So the data moved into the audible band and inside the music itself.

The watermark is spectral: 123 narrow cells between 200 and 6000 Hz get ±0.87 dB in pairs with opposite signs, so they cancel out within the ear's critical bands. Bits go out in Manchester code at about 7.8 bps. Text is compressed with a 30,000-word dictionary and canonical Huffman codes, then wrapped in a packet with a 48-bit sync word, CRC-16 and a K=7 rate-1/2 convolutional code. The packet loops for the whole song.

The receiver projects every STFT frame onto the pattern, accumulates repeats for each of the 11 packet sizes, finds the sync word and runs a soft Viterbi decoder on what it has heard so far, so words show up one by one before the checksum confirms the phrase. A short phrase takes 15–40 seconds, and about 15 minutes of unwatermarked recordings (music, speech, a bass-heavy track) never produced a false message.

JavaScript · Web Audio · AudioWorklet

diag-vectorizer

Raster diagrams back into editable draw.io

The rebuilt booking diagram open in draw.io: boxes, the central circle, arrows and labels all editable shapes

Takes a PNG or JPG of a diagram and reconstructs an editable vector version of it — both .drawio and Mermaid. Computer vision finds the geometry (shapes, coordinates, nesting, lines); a multimodal LLM supplies the semantics (text, arrows, colors).

More about it

Two interchangeable detectors sit behind one interface: a classic OpenCV pipeline (adaptive threshold or Canny → morphology → findContours, then shape classification by circularity, fill ratio, aspect and corner angles) and Segment Anything. Detected regions are arranged into a containment tree, and only then does the LLM get involved — for OCR, connections and styles, with its answers cached.

It recognizes rectangles, circles, ellipses, diamonds, triangles, cylinders (database icons) and arrows, along with labels, styles and background colors. Still a work in progress: neither of the diagrams in the post below was touched up before publishing.

Python · OpenCV · Gemini

osbench

A benchmark stand for order-sourcing algorithms

osbench Studio: scenario parameters on the left, the warehouse and city map in the middle, the order lifecycle diagram on the right

An open, reproducible benchmark for comparing order-sourcing (warehouse-selection) algorithms in an e-commerce network: a minute-level discrete-event simulator with common random numbers and a strict comparison protocol.

More about it

Sourcing is one of those areas where everyone has an opinion and nobody has numbers. osbench generates a world and an order stream from a config, replays it against eleven sourcing and six replenishment policies under identical random draws, and reports paired confidence intervals rather than single runs. Everything is priced in one currency, total_cost_per_order, so “fast but expensive” can be compared with “cheap but with cancellations”.

The model covers what makes sourcing hard in practice: warehouse shifts, weekends, carrier cut-offs, WMS release waves and picker throughput; address, payment and fraud checks with staffed review windows; four delivery-promise methods with customer acceptance; three shortage points, backorders and deferred sourcing; reservation split by consumer (storefront, OMS, replenishment) and OMS↔WMS stock-sync lag; transfers, demand peaks and warehouse outages; stores with walk-in shoppers, BOPIS and returns.

Some results ran against intuition. With an underloaded network and enough stock, all reasonable policies are nearly identical. Hard reservation removes pick-time conflicts but mostly moves the cancellations to checkout. Moving stock sync from 15–60 minutes to live barely matters, while inventory accuracy is worth an order of magnitude more.

Tooling: a visual config studio with a map editor, a live dashboard with guardrails, an offline inspector with per-order timelines, weight tuning, parameter sweeps and HTML reports.

Python · discrete-event simulation

Piano Ear Trainer

Intervals, chords and progressions, by ear

A browser ear trainer that plays something and waits for you to play it back on a MIDI keyboard. One self-contained HTML file — no install, no account.

More about it

Five courses, from single notes through intervals and triads to inversions, seventh chords, melodic interval chains and chord progressions. The key, the mode (major, natural and harmonic minor, or no key at all), the range in semitones and the harmonic level are all adjustable, and there is an adaptive mode that keeps track of what you keep getting wrong and comes back to it.

The task can be played through a connected MIDI instrument or through the browser's own synthesis; answers come back over Web MIDI. Progress is kept in the browser, per key and mode. The interface itself is in Russian.

One HTML file · Web MIDI · Web Audio

Tube Color Trainer

Learning oil paints by name and by sight

Tube Color Trainer: a blue swatch with four paint names to choose from, and a strip of oil paint colors

A quiz for oil painters: given a swatch, name the tube — across Winsor & Newton, Gamblin and Richeson Shiva. You can limit the palette to the tubes you actually own and compare similar hues side by side.

One HTML file

llm-hotkey

Translate, fix and rephrase the selection anywhere in macOS

Select text in any Mac app, press a hotkey, and the selection is replaced by the LLM's result: translation (⌘⌥T), grammar fixes (⌘⌥G), a cleaner rewrite (⌘⌥R), or read aloud (⌘⌥S).

More about it

The second take on openai-hotkey, and mostly a study in doing the keyboard plumbing properly. Hotkeys go through Carbon's RegisterEventHotKey rather than a global event tap, so macOS can't silently time it out and disable it. It waits for the modifiers to be released before sending ⌘C from a private event source, waits for the pasteboard to actually change instead of sleeping a fixed interval, and restores your previous clipboard contents afterwards.

Swift · OpenAI · Gemini

ushi

Local speech-to-text with the screen attached

ushi web UI: a recorded talk with the beautified transcript showing speakers, sections and slides inline, and the captured frames on the right

Narrate what you're doing on screen, record a call, or play a talk — ushi transcribes it with local models, keeps screenshots next to the words they belong to, and turns the result into a readable document. Recognition never leaves the machine.

More about it

Three recognition engines, all running locally on CPU with int8: faster-whisper large-v3-turbo for any language, GigaAM v3 for Russian (about 20× faster than Whisper), and Parakeet TDT v3 for mixed Russian/English. Silero VAD means only speech is recognized, and timestamps come from the audio itself, so they stay correct even when recognition falls behind. Speaker diarization is optional and can be recomputed later without re-recording.

Audio comes from the microphone or from a single app — Teams, Zoom, Meet in a browser — alone or together with the mic as [Them] / [Me] lines, via Core Audio process taps on macOS and WASAPI process loopback on Windows. Screenshots are captured on a hotkey or automatically, classified, and placed inline. The "beautify" pass, which turns the raw transcript into a document with speakers, sections and slides, is the only step that can use a remote LLM — and you choose which.

Packaged as a desktop app for macOS and Windows with Python, ffmpeg and the helpers inside; models download on first use and then it works offline.

Python · faster-whisper · GigaAM · Parakeet · Electron

artprojector

Camera, projector and a canvas on an easel

The overlay tool: a portrait on the easel seen by the camera, with the reference drawn over it as green contours

A USB camera looks at a canvas on an easel; from a printed calibration target the tool works out the perspective of the canvas, rectifies the view, and overlays a reference image aligned to the canvas plane — as contours or semi-transparent.

More about it

The camera rarely sees the whole canvas, so the tool computes a homography between the image and the canvas plane in millimeters, which is enough to both rectify what the camera sees and to project a reference onto it. Two printed targets are supported: six 63 mm squares on a single A4 sheet in the corner of the canvas, or a one-inch ArUco grid covering the canvas, where any two or three cells in frame are enough and the markers identify themselves — so the camera can come as close as you like.

The second half is for an easel with a real projector: one tool measures where the projector's pixels land on the canvas, using the calibrated camera as the instrument, and another throws a reference onto the canvas pre-distorted so that it lands square whatever angle the projector sits at.

Python · OpenCV · ArUco

ambi

Ambigram search and 3D ambigram models

The MERCEDES / STOWAWAY / ODOMETER sculpture seen from the front, where it reads MERCEDES

Finds word triples that can be read as an ambigram and renders them — in the browser and as printable STL models of the three-way kind that spells a different word from each direction.

Python · OpenSCAD/STL

BloomSpan

Memory-efficient maximal frequent substring mining

The first page of the BloomSpan paper: title, authors and abstract

An algorithm for mining maximal contiguous frequent phrases from very large text corpora, combining a counting Bloom filter for probabilistic frequency estimation with prioritized seeds and depth-first expansion directly on the corpus — no projected databases.

More about it

Written up as a paper with Joeran Beel (University of Siegen). Seed generation provably produces no false negatives, and output equivalence with exact baselines was confirmed on every Gutenberg-8k subset where any baseline finishes at all. On the Gutenberg-BookCorpus-Cleaned corpus — up to 3.07 billion tokens — it runs 11–15× faster than FHK with up to 2× lower peak memory, and it was the only algorithm in the evaluation to complete at 50,000 documents within a 40 GB heap.

The repository carries the paper, a Java benchmark framework with all the competing algorithms, and a C++ prototype.

Java · C++ · research paper

Smartfolio

A knowledge workspace of pages inside pages

Smartfolio's landing page over a screenshot of nested documents, each explaining a fragment of the one before it

A personal knowledge workspace built around pages that contain other pages. Instead of filing documents into folders you inset one page into another, and a child page can explain the fragment it hangs off with the whole parent page as its context.

More about it

You write in a rich editor — prose, math, images, embedded PDFs with annotations, clipped web pages. An inbox takes things in from outside, search finds whatever got orphaned, and a handful of LLM plugins do the jobs that are tedious by hand: structuring a raw transcript into linked sections, collecting a whole subtree into one document, translating a page while leaving its formulas and layout intact.

It started as a SaaS storing documents only in Turso. It now also writes to local SQLite, a folder on disk, a GitHub repository or a Google Drive folder — and synchronizes between any two of them three-way: what A has, what B has, and what the two last agreed on, so "these differ" becomes "this one changed" without consulting a clock on someone else's machine. Pairings are bidirectional by default, can be scoped to a page and everything it reaches (assets included, found by reading ids out of the content), and offer a dry run that decides everything and changes nothing. Conflicts keep both sides as a conflicted copy rather than merging or dropping; deletions leave tombstones, so a page that merely vanished can't wipe the other side's copy.

Desktop builds for macOS, Windows and Linux, and it works from a mobile browser. Invite-only, both the service and the source.

Web app · SQLite/Turso · Electron

The Reader's Glossary

A 600-page reading companion for Lolita

The printed glossary: the cover beside an open spread of chapter entries with their definitions

5,200 words from Nabokov's Lolita, defined in the context they appear in and ordered chapter by chapter rather than alphabetically — so it can be read next to the novel instead of looked up. In English, Russian, French and German.

More about it

The idea is to keep the reader in flow: you glance at the next four or five definitions, they sit in short-term memory, and then you read the actual sentence and recognize the word instead of stopping. Entries are graded into three difficulty levels, and the whole thing runs to 600–700 pages depending on the language — about twice the length of the novel. Which words make it in is decided both by an LLM's judgement of rarity and by the word's frequency in English corpora.

The definitions aren't generic dictionary entries; they take into account how Nabokov himself rendered the passage when he translated the book into Russian. Getting that required a custom sentence aligner, since the off-the-shelf ones weren't accurate enough: recursive anchoring, where the longest sentences are embedded with multilingual-e5 and matched by cosine similarity to become anchors, and the segments between anchors are then aligned the same way. It handles sentences that were split, merged or dropped in translation. Both language versions of each sentence go to the LLM, so the author's own choices ground the definition.

A first attempt at the same book, in 2024, annotated the EPUB itself. Every word went into one of up to ten logarithmic frequency bands; the commonest band was left alone and the rest were shaded darker the rarer they were, each followed by a short Russian translation — from a local copy of Müller's dictionary where possible, otherwise from Llama 3 running locally in Ollama. An earlier pass that had GPT insert glosses and footnotes straight into the HTML had to be split into chunks, because once the output got long the model silently dropped parts of the text.

Python · multilingual-e5 · LLM pipeline

Who's Who in Search & RecSys

84 researchers and 40+ labs, with links

A hand-curated directory of the people and labs doing information-retrieval and recommender-systems research, each with links and a short note on what they actually work on. Built because I kept re-deriving the same list from paper author lists.

Static page

Chat archive to Q&A pairs

A year and a half of an NLP chat, made searchable

Search results as Q&A pairs on the left, the original chat block with the answering messages highlighted on the right

Turns 65,000 messages from a Telegram group into question-and-answer pairs with semantic search over them. Clicking a result opens the original conversation with the answering messages highlighted.

More about it

The whole thing rests on one assumption: people reply to messages that are close behind them, and a message several people reply to was probably worth asking. So the tool cuts a window starting at a message with at least three replies and ending at the last message in its reply chain, then summarizes that window into a Q&A pair. Windows overlap freely — someone asking a new question while others are still answering the previous one produces two of them, nested.

Python · embeddings

Spline halftone printing

An image as one continuous thread

A slice of cake drawn entirely in fine Bezier lines over CMYK plates, dark areas denser than light ones

An image is split into squares, each square becomes a count of Bézier lines proportional to how dark it is, and because neighboring squares share their boundary points the result is not a grid of cells but a single continuous thread. Output is SVG, so it can be printed the size of a wall.

More about it

Dividing an image into 10×10 blocks costs you a factor of ten in resolution, so each channel is drawn in several passes with different cell sizes on shifted grids — large cells first, then finer ones offset by ten pixels, then finer still offset diagonally. Color goes through CMYK separation as in printing: each channel gets its own grid and its own lines, and the plates are then laid over each other with transparency.

The whole run is driven by a JSON config, with separate parameters per channel and per pass within a channel. It only really works large — at phone size the lines merge into gray.

Python · SVG

Friend-or-foe matrix

Every country pair, as one model sees it

The full relationship matrix with country labels: green blocks of alliance, yellow neutrality, red and purple conflict

A full country-by-country relationship matrix, each pair sorted by an LLM into one of five buckets from "at daggers drawn" to "best friends" — then processed to see what structure falls out of the result.

Python · Gemini

This blog

200+ articles out of WordPress and into Markdown

hybrismart.com is a static site generated from Markdown by a build script in this repository — no WordPress, no database. All 200-plus articles were migrated and reworked: a readable typeface, clickable illustrations, in-article navigation and full-text search.

More about it

The part I am most pleased with is the contextual recommendation system. Where a paragraph mentions Drools, a link to the related article appears right next to it, with a note on why it is relevant there specifically — as a margin note on desktop and an inline callout on mobile. Articles come in English, Russian and Ukrainian from the same source, and the build also produces this page, the per-vacancy CVs and the search index.

Node · Markdown · static HTML

AI paper reviewer

Checking a manuscript against its own code

The visual flow editor: a review pipeline with parallel branches merging into the audit step

A tool for AI-assisted peer review of research submissions. Point it at a folder holding the paper's PDF and the code from its repository, and in under a minute it produces a Submission Audit document. The review process itself is a flow built in the tool's own visual editor.

More about it

A flow is a chain of blocks such as finding the manuscript files, uploading them to Gemini through the Files API and extracting sections, and each step adds to a shared state. Flows can be drawn by hand or generated by an LLM from uploaded checklists. Execution is deliberately step-by-step: the front end asks the back end to run one block and gets control back, so in Run with Debug you can see what a step missed, fix the prompt and carry on with the next version of the flow. Blocks that share a conversation id share one LLM chat. A planner walks branches and runs only what the final output needs, and subroutine calls can iterate over files. The same flows run either on the tool's own engine or on LangGraph, switched by a strategy, with identical results. An optional PDF parser built on MinerU pulls diagrams out separately and straightens multi-column text.

Three code validators were built on top, each with a different approach: one follows a conference's reproducibility checklist; one derives requirements for the code from the paper and checks the code against them; and one first classifies the paper in depth into tags, then filters a synthetic 1,000-item checklist whose items carry tags, so that most items drop out as irrelevant to the paper.

Visual flow editor · LangGraph · Gemini · GPT-4o · MinerU

Semantic IDs for a post archive

Four tokens per post, topics for free

Posts grouped by the first token of their semantic ID, with sub-clusters listed under each group

The semantic-ID technique from Snap's GRID generative-retrieval framework, applied to 9,015 Facebook posts. Residual k-means compresses each post's 3,072-dimensional embedding into a code of four tokens.

More about it

Thirty-two topics fell out of the codes with no labelling at all: cars, Washington, books, etymology. The same codes give deduplication for free and work as a query router, since the first token alone narrows 9,015 posts to about 300 without losing the top of the results. On top of that sits a second, orthogonal axis: facets defined by a contrast vector for a concept.

GRID · residual k-means · embeddings

AI curve picker for RawTherapee

Nine tone curves, one grid, the model chooses

Nine RGB-curve variants of the same portrait in a 3×3 grid, each labelled, for the model to pick from

An extension to ai-pp3, an open-source tool in which an LLM edits a RawTherapee .pp3 profile for a RAW file. The extension renders nine variants of the RGB curves, lays them out as a numbered 3×3 grid and lets the model pick the best one.

More about it

ai-pp3 renders a JPEG preview from a Canon .CR3 through the RawTherapee CLI and computes histogram statistics locally: mean, median, skewness, peaks, dynamic range, clipped shadows and highlights. It then sends the preview, the current profile and the analysis to the model (GPT-5.6 in these runs) with a strict ANALYSIS / PLAN / EXECUTION answer format, and applies the parameter changes it gets back section by section.

The extension, vibe-coded on top, starts from a base profile (the main run's result, or a neutral one), generates nine RGB-curve variants, clones the profile for each and renders a small JPEG of each with rawtherapee-cli. sharp assembles them into a 3×3 grid labelled 1–9. The grid goes to the model, which answers with BEST_VARIANT and its reasoning, and the winning profile is the output, optionally with a full-size render. First results on real shots were reasonable, though sharpening inherited from the base profile produced visible halos until it was switched off.

RawTherapee CLI · sharp · GPT-5.6

Search explainer over MCP

Letting a local model drive, explain and compare search

A first Model Context Protocol server, exposing a creator-search engine to an LLM so that a model running locally can run queries, explain what came back and compare result sets produced with different parameters.

More about it

Written in Node.js on the official SDK's McpServer and driven by a local Qwen model, with no hosted LLM involved. The goals were an explainer for search results and a comparator for the same query under different parameters. A request like “find figure skaters” comes back as a written report rather than a ranked list.

The third goal, automatic search for the best ranking hyperparameters, did not fit into the same server and became a separate pipeline a week later: Optuna proposes weights, a searcher runs a fixed query set against several configurations, a local LLM judges query–result pairs (cached), NDCG is computed per configuration, and a new parameter set becomes the champion only after a statistically significant gain with no latency regression.

Node.js · MCP SDK · Qwen (local)

CMS migration through a graph

SAP Commerce content as a property graph, and back to ImpEx

The CMS type graph: components, content slots, pages, templates, restrictions and the relations between them

A pipeline that pulls CMS content out of SAP Commerce through the SmartEdit APIs, loads pages, slots, components, types and attributes into a graph database, and generates dependency-ordered ImpEx plus a media package that rebuilds the selected pages in another content catalog or on another instance.

More about it

One script snapshots the source catalog version to JSON through the SmartEdit web services, a second turns that into a graph (Neo4j or Memgraph) in which instances, types and their attributes are all nodes, and a third walks the graph from the pages you name and writes ImpEx in an order where no block depends on a later one, together with a folder of the media it references. Circular references are split into two statements per object, one early and one late. A transformation step between a source and a target graph (replacing legacy components, say) is the planned next layer; the first goal was a 1:1 copy that can be verified before any rules are added.

The graph pays off in analysis. A component can reach a page directly through a page slot, through a template slot, or through up to three levels of parent components, and counting the unique live pages behind each component is one Cypher query. On a real catalog of about a thousand pages the graph holds around 70K nodes and 20M relationships. Natural-language questions such as “which components, including nested ones, are on this site's homepage, excluding expired restrictions” only became answerable after adding derived edges that link indirectly connected objects. The whole graph is rebuilt from scratch in about two minutes.

Media was its own problem: HAC's import-script upload cannot carry image files inside the zip, so a separate script pushes them through the CMS web services, which were built only with SmartEdit in mind.

Python · Neo4j/Memgraph · Cypher · ImpEx

2025

13 projects

Chess move predictor

A network proposes, minimax checks

The engine playing itself in CuteChess: board, move list with per-move times, and the engine debug log

A small UCI engine put together in an evening: a network trained on 20,000 decisive Lichess games proposes the five most likely moves from a position, and a minimax search looks only at those, a few plies deep.

More about it

The games are picked out of 800,000 by taking only decisive results and sorting by rating gap, on the theory that a wide gap means a more decisive win — a crude proxy, but better than none. That leaves 20,000 games and 534,453 positions. The weaker side's moves are dropped during training rather than beforehand: if it is White to move and White won, the position is learned; if the side to move went on to lose, it is skipped. The network takes a board and emits 4096 values, one per from-square/to-square pair.

Selecting the games takes about five minutes and training about ten, so the obvious next step is simply more games. It is not strong, but it gets through the opening without embarrassing itself — which was the whole point of the exercise.

A few days later came a second round. A ResNet-style network did slightly better, but still blundered in the middlegame, because a move taken from a game is not necessarily a good move. So Stockfish went through the same 20,000 games and labelled every move — roughly one in three turned out to be bad — which gave 751,075 good and 308,226 bad examples. Agreement with the dataset move stalls at about a third (two thirds for the top five), so a more useful check runs at the end of every epoch: the model plays out 50 middlegame and endgame positions ten plies deep and Stockfish scores the result. That score went from 244 to 320 over the first five epochs. Training is tracked in TensorBoard and Weights & Biases, and by the end I could no longer beat it myself.

Python · PyTorch · Stockfish · CuteChess

volleyball-editor

Drawing volleyball drills in 2D and 3D

A drill in the 3D court view: posed players, numbered positions and colour-coded ball trajectories over the net

An editor for volleyball court diagrams: place players, the ball and movement arrows on a court, switch to a 3D view with posed figures (serve, pass, attack, block), and export the result as PNG or SVG.

React · Vite · three.js

Coveo Search Debugger & Exporter

Turning rankingInfo into a spreadsheet

Replays the page's last Coveo search with debug ranking enabled, parses the opaque rankingInfo blob into discrete metrics — document weights, boosts, QRE contributions — and exports the whole result set to CSV.

More about it

Relevance work on Coveo keeps running into the same wall: the ranking information is right there in the response, as a semi-structured text blob nobody wants to parse by hand. The extension picks up valid authentication tokens and headers from ordinary user activity, replays the request with debug=true and debugRankingInformation=true, and hands you a table you can open in Excel or pandas.

Chrome extension · JavaScript

Coveo Search Request Interceptor

Changing search parameters without touching the app

Intercepts requests to the Coveo Search V2 API in the browser and overrides parameters — query, result count, advanced query expressions — from a small JSON config, so search behavior can be tested without changing the application's code.

More about it

It hooks both window.fetch and XMLHttpRequest (still widely used by Sitecore/Coveo integrations) and rewrites the POST body immediately before the request goes out, targeting only the /coveo/rest/search/v2 endpoint so nothing else on the page is disturbed. Overrides apply to the next request, with no page reload.

Chrome extension · JavaScript

Read and Learn

The dictionary is in the next room

Reading Le Petit Prince in French, with picked words collected on the right and a study session waiting to start

A reader built around a deliberately inconvenient idea: you mark unfamiliar words while reading, then study their translations with the text hidden, then return to the text with the translations gone. The detour is the point — it is what makes the words stick.

More about it

Text is paginated on sentence and paragraph boundaries, so no fragment is cut mid-thought. Tokenization is dictionary-driven and greedy: if the dictionary has "web application", it wins over the two separate words. Reading position is kept per file via an MD5 of its contents, so a session resumes exactly where it stopped.

Python · web UI

ML Approximation Playground

Watching a network learn a function — and fail

An interactive playground for fitting synthetic datasets — parabolas, sines, absolute values, step functions — with neural networks, polynomial regression and decision trees, built to make the Universal Approximation Theorem, overfitting and extrapolation visible rather than quotable.

More about it

The plot deliberately extends beyond the training range, so you can watch each model's behavior fall apart outside the data it saw. The part I built it for is the neural decomposition view: the individual basis functions each hidden neuron contributes, and how they sum into the final prediction.

Python · Streamlit · PyTorch

Recommender System Laboratory

25+ recommender algorithms you can turn the knobs on

The lab running BPR: hyperparameter controls on the left, convergence plots and latent-factor snapshots on the right

The interactive companion to my book Recommender Algorithms: train, configure and compare more than 25 recommendation algorithms in real time, with the visualizations that explain what each one is actually doing.

More about it

It is deliberately built for small datasets. It will run on larger ones, but the visualizations get less informative and some algorithms need more data than an interactive session can reasonably hold — this was never meant to be a full-scale benchmark, it is a teaching instrument.

Python · Streamlit

recommenders-samples

ALS plus XGBoost on MovieLens

A hybrid recommender sample: Spark ALS produces user and item latent factors, XGBoost then refines the rating predictions on top of them, on MovieLens 100K.

Python · Spark · XGBoost

TestMySearch

Making search-relevance work measurable

The search agent mid-run: its reasoning log on the left, the storefront it is working through on the right

A platform for testing on-site search systematically: feed it query sets and expected results, point it at Solr, Elasticsearch, Coveo or Algolia, and it runs batch comparisons across configurations overnight and reports which one is better and by how much.

More about it

The problem it exists for: you have a production search and a hypothesis about improving it, and no way to tell whether the change quietly broke something else. The platform computes NDCG@k, MAP, precision, recall and a couple of dozen other metrics, with statistical significance rather than single runs, and only at the very end uses an LLM — to explain the numbers, not to produce them.

It also works as a virtual assessor, grading how well each result matches its query, which for long documents means chunking, embeddings and per-chunk evaluation. Around it grew several smaller pieces: context-aware autocomplete from a locally trained model ("Tyson Foods stock" suggests price, "Tyson Foods chicken stock" suggests recipe), and an agent that is given a site and a goal in plain language, writes its own queries, judges the results against the original intent, and can carry the session through to checkout — which makes both ground-truth data and realistic session data to train recommenders on.

Even the demos on the site are generated. One script takes a scenario — by now 80–90 steps — and produces the interactive walkthrough and the narrated videos, and re-uploads the videos to YouTube when something in them has changed. A redesign of every page costs one rerun instead of re-recording, and the scenario doubles as a test.

Python · Solr/Elasticsearch/Coveo/Algolia · LLMs

Boolean query simplifier

Ten sites, ten unreadable search filters

The parsed filter expression before and after simplification: a sprawling tree on the left, a compact one on the right

Parses the enormous machine-generated filter expressions that a CMS appends to every search query into an AST, converts them to Boolean algebra, simplifies them with SymPy, and then diffs the results across sites to find what they actually have in common.

More about it

Ten sites shared one search index and sent it ten different versions of the same inscrutable expression — template ids and page ids to include or exclude, ten open parentheses and a few closing ones placed seemingly at random, with deeply nested conditions where "exclude this template" applies only when some other field equals one. Reformatting it did not help; reading it by hand helped less.

Simplification discards duplicates, collapses nesting and drops conditions logically absorbed by others, which flattens the trees into something readable. To prove nothing was lost, a generator reassembles the simplified logic into a working request and checks that the document count matches the original. From there a comparison matrix shows the common core — conditions guaranteed to hold for every document that passes — against the per-site tails.

Python · SymPy

Category-Aligned Retrieval

Predict the category, then search inside it

A short paper on predicting the most likely product categories for a query and then filtering retrieval by them, using trainable category prototypes — category representations learned directly from user queries rather than from the taxonomy.

Python · PyTorch · research paper

Query clustering and typo groups

Finding near-duplicate queries in a million-line log

Clusters found in a set of 500 e-commerce queries, each with its top queries and size

Two ways of making sense of a search log: semantic clustering of queries into named groups, and a near-duplicate finder that groups queries differing by a typo, a missing letter or a space, scaled to over a million unique queries with MinHash and LSH.

More about it

Comparing every pair of 1,145,868 unique queries is out of the question, so each query becomes a set of character bigrams (apple → ap, pp, pl, le), gets a MinHash signature, and goes into an LSH index that puts similar signatures in the same bucket. Each query asks the index who shares its bucket, and only that short candidate list is checked with an exact fuzz.token_sort_ratio. The output is groups like i phone / iphone, which tell you where the audience is not spelling a model name the way the catalog does and where query preprocessing should add or drop a space.

The other mode groups queries into N clusters and has an LLM name each one. On a public e-commerce query dataset this ran into the content filter of Azure OpenAI, because some queries are adult products. That dataset also proved too clean (almost no typos) compared with a real site log.

Python · MinHash · LSH · LLM

SAP Commerce docs RAG

Asking the help portal questions, and why kNN alone was not enough

The hybrid index answering how to remove all items of a type via ImpEx: retrieved chunks with their documentation paths, and the streamed answer

A retrieval-augmented question-answering system over the SAP Commerce documentation: a distributed crawler-indexer, chunked embeddings in OpenSearch, and hybrid lexical and vector retrieval, tested on the kind of questions developers actually get stuck on.

More about it

The indexer took an evening: indexers pull pages from a Redis queue and push any links they find back into it, so any number of them can run in parallel. Each page gets its place in the documentation tree (Platform, Services, and Utilities → Platform → Platform Implementation) from the portal's navigation JSON. Because many versions of the docs repeat the same text, a chunk maps to one or more documents. On top of that came generation of alternative queries and merging of their results.

The testing was the interesting part. Pure vector search, with either 200-word or 1,024-word chunks, could not find the page that answers datahub.config.mode=STANDARD, though the property is written there in plain text, and an exact term such as MATMAS returned nothing. Even “what datahub.config.mode=STANDARD means?” and “what does … mean?” got different answers. Mixing in lexical search fixed it, in two variants: kNN plus lexical as two searches merged together, and a single lexical query rescored with cosineSimilarity in a script_score. The suspected culprit is the approximate nature of HNSW-based kNN.

Python · OpenSearch · Redis · embeddings

2024

5 projects

semantic_chunking

Where to cut a document for RAG

Experiments in splitting documents by meaning rather than by character count — building a tree over the text and choosing cut points where the topic actually changes.

Python

proxy-for-apis-demo

Changing API traffic without touching either side

A browser extension and a small Python proxy for intercepting and rewriting API requests and responses — useful when you need to prototype a change against a system where you own neither the frontend nor the backend.

Python · browser extension

img2img-turbo for Apple Silicon

A port to the mps device

An adaptation of the img2img-turbo model code to run on Apple Silicon's mps device. The model and the original implementation are not mine — this is the porting work needed to make it run on a Mac.

Python · PyTorch

Facebook cross-posting pipeline

6,000 posts out of a social network

Searching the posts by image description: "ostriches" finds photos from posts by what is in them

Migrated 6,000 Facebook posts to two blogs of my own — beinginamerica.com in Russian and raufaliev.com in English — and then kept them in sync, because social media is a bad place to leave anything you might want to find again.

More about it

A new post triggers the whole chain: translate it, process the attached images and describe them, derive a title and tags from the text plus those descriptions, write the record to Turso, build embeddings, index them in Qdrant, upload the images through the WordPress API and publish both language versions. The 2024 article below documents the original migration; the pipeline was rebuilt in 2026 around the cloud databases.

The rebuild is also about being able to search 15–20 years of posts, and about trying out ways to organize them. To get a tag vocabulary that is small but still covers everything, a script fills the model's context with a random sample of posts and asks for 30 tags; ten samples give ten lists, near-duplicates are merged, and the result is arranged into a hierarchy. Images are described in the context of their post by Qwen3-VL running locally. Facebook's access token lasts only two months and reaches only recent posts, so the full archive comes from the JSON export.

Python · WordPress API · Turso · Qdrant

Hybris → Spring Boot compatibility layer

Leaving SAP Commerce without migrating the database

A toolkit for moving off SAP Commerce (Hybris) piece by piece: a Spring Boot service talks directly to the existing Hybris database, and Hybris code — controllers, facades, services — moves across nearly unchanged, because ModelService and FlexibleSearchService are reimplemented on top of JPA. I was co-author and co-architect.

More about it

The core is a model generator that runs as a standalone Hybris extension and reads the type system through Hybris's own runtime API rather than parsing items.xml, so it is not tied to a platform version. For every type it emits a JPA entity mapped onto the existing tables and columns, plus a wrapper class with the same interface as the Hybris model, so code written against ProductModel keeps compiling. Most of the work went into the places where the two object models disagree: localized attributes, Hybris enums that are half enum and half many-to-one relation, relations, several types sharing one table (genericitems, cmscomponent) — which is where discriminator formulas come in — and resolving an item's real type from its PK through composedtypes. FlexibleSearch queries are translated into JPQL.

The result was demonstrated on a real, if very simple, extension: its controller and facade were copied from Hybris into a Spring Boot microservice unchanged, and they ran against the live Hybris database. The same approach opens the way to a strangler-pattern migration, where a proxy sends one API at a time to the new service and everything else to Hybris.

Java · Hibernate/JPA · Spring Boot · SAP Commerce

2023

4 projects

Saturday Evening Post archive search

A century of a magazine, made findable

Search over the archive: phrase query with year facets on the left and highlighted hits from 1901–1904

Every page of The Saturday Evening Post from 1900 onwards, OCR'd and made searchable by both keyword and meaning — Tesseract for the text, Solr for lexical retrieval, embeddings and FAISS for semantic, and an ML reranker over the two.

More about it

It began as a nostalgic afternoon in the archives and turned into a decent excuse to build a hybrid retrieval stack end to end on material that fights back: century-old scans, period typography, and illustrations that matter as much as the text.

The first version, in September 2023, was a four-step script per issue: download the page images, OCR them with Tesseract, split the text into sentences, and add them to a FAISS index of OpenAI embeddings — about a minute and forty seconds per issue. Three years of the magazine (1946, 1966 and 1989) came to 8,807 pages and 436,904 sentences, with queries taking about three seconds. The vector index was the bottleneck: 819,000 sentences took about 5 GB against 190 MB in Solr, and every new issue took longer to add than the last.

So the full run — about 122,000 pages, the whole 20th century — went into plain Solr with a query builder of my own on top: a small query language (required and excluded words, word forms, phrases), year facets, and YEAR, PERSON, GPE and ORG hints that boost rather than filter, backed by named entities extracted from the text. More Like This and LLM-generated query suggestions came next. The article, published in May 2024, describes the later version, with semantic retrieval and a reranker.

Python · Tesseract · Solr · FAISS

fsdumpviewer

Diffing two machines from an ls -lR

Two filesystem snapshots side by side, with differing files marked in colour and export controls below

Views and compares filesystem snapshots taken with ls -lR, dir /S or find . on different machines, then generates a script that synchronizes them or packs just the files you selected into an archive.

More about it

Two use cases it was built for. First, pulling specific files off a remote system you only have SSH to: take a snapshot, pick the files in the UI, get a .sh script that produces a tar.gz with exactly those. Second, two people debugging the same system and suspecting their environments differ — each takes a snapshot, the tool shows what diverges, and generates the script to close the gap.

The idea is older than the code. I sketched it at the end of 2020 as a way to share a large file collection — publish a snapshot of the tree, let others browse it and mark what they want, answer with an archive of just those files — and again in mid-2021, after another session of working out why the same thing behaved differently on two machines. The code came in 2023, once it was clear that plain ls -lR output was enough to work from. It is rarely needed, but when it is, there is no easy alternative short of diffing two listings by hand.

Python · Qt

Captioning a photo archive

Making 80,000 photos searchable by what is in them

A weekend idea for an archive of 80,000+ photos, many of them old and without location data: caption every image with an image-captioning model and push the captions back to Google Photos so its search can find them.

More about it

It got as far as a feasibility check. BLIP, run from a public Colab notebook on a few photos from the archive, produced captions such as "a woman wearing a face mask" and "a little girl in a graduation gown", at about two seconds per image on Colab. The plan was to fetch images through the Google Photos API, caption them and write the captions back, on the assumption that Google Photos would index them.

BLIP · Google Colab

Raspberry Pi voice assistant

An Alice-style assistant on ChatGPT

A Russian-language voice assistant in the spirit of Yandex's Alice, built on a Raspberry Pi from a Google AIY Voice kit: press the button, ask a question, and ChatGPT answers, keeping the conversation context for an hour.

More about it

Most of the effort went into the hardware. Google had abandoned the AIY Voice kit and deprecated its assistant library, which pinned the google-auth package below version 2 while everything around it had moved on. The kit's drivers eventually ran with its microphone, speaker and button. The system Python 3.5 was too old for the OpenAI client, so Python 3.7 had to be compiled. In the end an external microphone replaced the kit's own.

The pipeline records the question, converts it from WAV to MP3 with FFmpeg (595 KB down to 70 KB), sends it to OpenAI for Russian speech recognition and passes the text to ChatGPT. Follow-up questions work — "what is the capital of England?", then "and Norway?" — and the session resets after an hour. A wake word was still on the to-do list: for now, recording starts and stops with the button.

Raspberry Pi · Python · OpenAI API · FFmpeg

2021

2 projects

Turntable 3D scanner

An easel, a phone and photogrammetry

A chess piece as bare mesh, as textured model, and the turntable rig that produced both

A rotating platform, an iPhone and an automated pipeline: FFmpeg pulls frames from the video, COLMAP recovers the camera positions and a sparse cloud, OpenMVS densifies and meshes it. One command from video to model.

More about it

The first rig, in March 2021, was cardboard and electrical tape around a phone; within days the parts were being replaced with 3D-printed, partly demountable mounts. The phone records video rather than photos, and a single FFmpeg command cuts it into frames — 500 frames at 2160×2440 on the first serious run. The camera travels around a still object, so the lighting is the same in every frame. A Chinese guardian lion took one minute of filming, three and a half hours of computation, about ten minutes of cutting away noise in Blender and half an hour of preparation before printing.

The limits showed up quickly. A plain white box defeated it: with no texture to match, the reconstruction put all the cameras on one side. Structured light with a projector was the obvious remedy, but the one open-source implementation I found depended on OpenCV 2 and would not build on macOS. Then came lasers: a plan for a stepper-driven red line laser synchronised to a blinking LED, and an Arduino-driven spinning mirror with a strobed line laser, meant to throw a fence of red lines onto featureless surfaces for photogrammetry to latch onto. These stayed experiments. Scanning people was never solved either: hands drift during a 30-second pass, and no open-source photogrammetry tool let me place tie points by hand.

Python · COLMAP · OpenMVS · FFmpeg

Physical chessboard reader

Playing a real board against an engine

A camera watches a real chessboard, a ResNet-18 classifier reads the pieces off the squares and works out what moved, and the move is fed to a chess engine — so the physical board becomes the interface to the virtual game.

More about it

The hardware was an easel, a walking stick and a quantity of tape, which is roughly the right level of engineering for a first run. OpenCV and PIL handle the board detection and square extraction; the network does piece recognition per square, and diffing two consecutive readings gives the move.

Python · PyTorch · OpenCV

2020

2 projects

HAC Autosuggestions

Autocomplete for the Impex and FlexibleSearch consoles

Contextual autocomplete for type and attribute names in the FlexibleSearch console of the SAP Commerce Administration Console, plus a one-line fix that switches on the Impex suggestions SAP had shipped half-finished.

More about it

The HAC source turned out to contain traces of an abandoned suggestions feature. For the Impex console it was almost complete: it failed only because the AJAX call to the type-system endpoint did not send the CSRF token. With the header added, Ctrl-Space suggests commands, types, attributes, modifiers and variables.

The FlexibleSearch console got a new implementation built on CodeMirror hints (HAC still ships CodeMirror 3.11, from 2013). It pops up on its own, with no hotkey: type names after a curly brace, a type's attributes after a dot, and it follows JOINs and aliases. Type and attribute lists come from a service that already exists in the platform but was never used. It is meant for local and development environments only.

JavaScript · CodeMirror · SAP Commerce HAC

E2E CLI

End-to-end API testing from JSON recipes

E2E CLI architecture: recipes merged into a call profile, the call, and smart comparison of the response

A command-line framework for end-to-end testing of cascaded REST APIs — create a product through one service, index it through another, find it through a third — built from small JSON "recipes" instead of test code. I wrote the first version from scratch over a weekend; the team then used it every day for years to test all of our services and integration flows.

More about it

A test is a point in a space of dimensions — environment, country, language, the call itself — and each dimension is a folder of JSON recipes. The tool merges the recipes you pass into one call profile and one payload, with explicit rules for arrays (_replace, _unique), which is how 300 KB payloads with fifteen levels of nesting stay maintainable without being built in code. Values returned by one call — OAuth tokens, cart IDs — are saved through JsonPath into storage files that are themselves recipes, so scenarios chain naturally.

The response is post-processed with JsonPath and checked with a "smart compare" that ignores field order and, by default, array order, and reports exactly what was added, removed or changed; later versions added JSON Schema validation. For debugging it prints a ready-to-run curl for every test and can annotate every value in the merged JSON with the recipe file it came from. Runs in bash on macOS and Linux and in PowerShell on Windows.

Command-line tool · JSON · JsonPath

2010

1 project

Wordrive

A word game, with ports paid for by a phone maker

A word game of my own from around 2010. Its content included a set of one-liners, and a phone manufacturer paid for versions for Android and Bada.

More about it

It was never meant to be a business. A professional editor proofread the game's set of one-liners, and later a phone maker approached me and funded Android and Bada versions.

Mobile game · Android · Bada