Aman Behera

Writing

Stories behind the projects, interactive explainers you can play with, and notes on systems and machine learning.

notSoSmartOCR: building an OCR that knows when it's wrong

The story behind document extraction you can inspect: why a humble "I'm not sure" became the whole design, told with the film and the animations I made along the way.

5 min readdocument ai, ocr, product

Film

Which way is up? LevelHead in 99 seconds

A short film about a deceptively hard question for document pipelines, and a training-free answer: deskew before you classify.

3 min readdocument ai, research, film

Film

Does a prompt-injection defense speak Hindi?

I trained a prompt-injection defense on English and attacked it in ten other languages. It held. Then I found the two places where it doesn't, and what fixes one of them.

7 min readai safety, alignment, multilingual

What Happens When You Search Like an Indian Shopper

I typed हल्दी, 'rice 1kg' and a pile of typos into Blinkit, Zepto and Instamart, then watched Zomato eat 400 MB of RAM. Findings, guesses, and fixes.

14 min readsearch, recsys, ios, memory

From a spinning arrow to a straight page

Winding a signal around a circle, reading a spectrum by eye, and following a real deskewer line by line, including the bug that made it give up on phone photos.

1 min readSeeing straight · part 2interactive, fourier, computer vision

Fourier for images, hands on

Three classic readings on the Fourier transform of an image, turned into stripes you can rotate, filters you can switch and spectra you can click.

1 min readSeeing straight · part 1interactive, fourier, computer vision

Not So Skewed: a deskewer that runs in your browser

Drop in a crooked page and watch a spectral deskewer straighten it step by step, with a robustness sweep and a bench of real phone photos. Nothing leaves your machine.

1 min readSeeing straight · part 3interactive, computer vision, tools

The Leiden Algorithm: How GraphRAG Finds Order Inside Knowledge Graphs

From modularity and Louvain's disconnected-communities bug to Leiden's refinement phase, and why GraphRAG bets on it.

25 min readrag, graphs, algorithms

Writing C++ the Machine Can Run Fast

Cache locality, branch prediction, why the stack is cheap, what optimization flags actually do, and why the size of a variable matters. Notes on the gap between source and silicon.

10 min readcpp, performance, systems

The Many Flavours of Constness in C++

const, const_cast, constexpr, consteval, constinit. What each one promises, how the compiler sees it, and when work moves from runtime to compile time.

9 min readcpp, systems

SWAR Parsing Internals

How SIMD-Within-A-Register turns ordinary 64-bit integers into 8-lane parallel byte processors.

3 min readsystems, performance