CORTEX

Full-stack · Backend · GenAI

Ujjwal Jain

I build products end to end: backends and data pipelines, LLM features with guardrails around them, and the web or extension interfaces people use. I go deep where it matters, down to a database engine or a wire protocol. Each project below links to its code and says what it doesn't do yet.

Bachelor's in Computer Science · BITS Pilani · 8.82 CGPA · 2024–2028

Start here

Three things I would ask you to check first. Each is one claim, with the record that holds the evidence, the method, and what I could not show.

  • Fuze

    Semantic search on the live deployment got 45% faster at its best run (p50 3,026 to 1,661 ms) by cutting about 10 database statements per search to 1. About 900 ms of the remaining time is still unexplained, and the record says so.

    The latency series →

  • CampusSync

    An audit found that every public credential verification failed, because the verifier was handed the private key. It is fixed with a test that reproduces the old failure. Credential lookup fell from 1,172 ms to 0.2 ms, and one earlier speed-up claim was withdrawn.

    The verification bug →The benchmark and the withdrawn claim →

  • CampusSlot

    A rolling update configured as zero-downtime still dropped 0.28% of requests until a preStop delay was added. A deliberately broken release then rolled itself back with 0 of 4,800 requests failing, and a control run shows what the rollback adds.

    The dropped requests →The rollback drill →

Now

Updated

  • Just merged

    Nine Apache Superset pull requests are merged, the latest two on 29 Sep 2026, and so is a crash-recovery fix in Metacog Hypergraph (14 Oct 2026) for a bug found and reported as #91. Pull request

  • Active development

    LEXIS, a retrieval-augmented generation (RAG) system that is still a work in progress. Recent work replaces a placeholder entailment check with a real model and wires in cross-encoder reranking, which is off by default. Repository

  • Active development

    OSS Hunter, an engine that scores a repository's issues for complexity with an LLM and ranks them by graph-propagated importance. Early stage, and the repository is private for now.

  • Just published

    FlashFlow, a Go lab that replays routing policies on identical traffic to show why one collapses under load. Project page →

  • Just fixed

    A security and honesty pass over CampusSync, VaultTabs, RecoveryOS and AgentBrake, including AgentBrake's fail-open bugs. The AgentBrake record →

Featured projects

The 6 projects with the most verifiable engineering. Each page shows the evidence, links to the source files, and says what isn't done.

Fuze

ONGOING

A bookmark manager that recommends saved pages for the project you are building, with its retrieval quality and latency measured.

Personal project, ongoing · Jul 2025 – present · 681 commits

  • On BEIR SciFact (300 queries, run through the production search code) passage retrieval scores nDCG@10 0.718. On a long-document variant it scores 0.504 against 0.016 for one embedding per document.
  • Live semantic-search latency on the deployed Space, 30 samples per endpoint: p50 3,026 ms down to about 1,700 ms (1,661 at the best run, -45%) and SQL statements per search from about 10 to 1, with each run recorded and the unexplained remainder written down.
  • Python
  • Flask
  • PostgreSQL
  • pgvector
  • Redis
  • RQ
  • +6

CampusSync

PROTOTYPE

Multi-tenant certificate verification for universities and recruiters, rebuilt after a security audit.

Personal project · Sep 2025 – Oct 2026 · 234 commits

  • 100 API route files. A test fails the build when a route is neither guarded nor on an explicit public list.
  • 80 test files and 1,432 passing tests, run on main on 16 Oct 2026. They use in-memory fakes for the database.
  • Next.js
  • TypeScript
  • Supabase
  • PostgreSQL
  • Gemini
  • Vitest
  • +1

CampusSlot

PROTOTYPE

A campus room-booking service built to show the delivery side: measured rollouts, a measured rollback, and query costs at scale.

Personal project · Oct 2026 · 92 commits

  • A concurrent-write test on real PostgreSQL creates exactly one booking when identical requests arrive together; separate tests show the database rejects overlaps even when the application check is bypassed.
  • At 200,000 bookings the overlap query read 2,469 pages; a range operator with a GiST index reads 30, and the all-rooms day view went from 21 to 113 requests per second. Synthetic data, one laptop.
  • FastAPI
  • React
  • PostgreSQL
  • Docker
  • Kubernetes
  • Helm
  • +4

RecoveryOS

PROTOTYPE

Recovers failed payments: an LLM may recommend, but only a deterministic policy engine may act.

Razorpay Buildathon, Track 03 · Aug 2026 – Sep 2026

  • Execution is idempotent: an idempotency key plus a PostgreSQL advisory lock, with a unique-constraint backstop. An integration test races two real threads against it.
  • A test walks the syntax tree to prove that execution code cannot reference the AI recommendation.
  • Python
  • FastAPI
  • PostgreSQL
  • Alembic
  • Redis Streams
  • Next.js
  • +4

FlashFlow

PROTOTYPE

A Go lab that replays routing policies on identical traffic and classifies why one of them collapses under load.

Personal project · Aug 2026 – Sep 2026 · 226 commits on 5 days

  • go test ./... on a fresh clone: 24 packages pass, 503 top-level tests, 0 failures. go build, go vet and gofmt are clean. About 46,900 lines of Go, of which 20,284 are 89 single-file experiment programs.
  • Six policies are compared: round-robin, weighted round-robin, least-connections, EWMA, power-of-two-choices by in-flight count, and an adaptive weighted policy.
  • Go
  • net/http
  • GitHub Actions
  • JavaScript dashboard
  • Prometheus text format

MiniDB

PROTOTYPE

A relational database built from scratch: B+ tree, buffer pool, SQL, optimizer, locking and crash recovery.

Course capstone (two people) · Jun 2026

  • 133 tests in 26 suites pass. They include a crash matrix that simulates failures between a WAL flush and a page flush, a 1,000-operation SQL fuzz test against a reference model, and deadlock tests.
  • A 683-line disk-backed B+ tree with split, merge, borrow and bulk-load, and its root persisted through the catalog.
  • TypeScript
  • Node.js
  • Jest
  • sql-parser-cst
All 15 projects

Open source

13 merged pull requests to projects I don't own: 1 in Metacog Hypergraph, 9 in Apache Superset, 2 in Vitest and 1 in Appwrite. Mostly bug fixes with tests, and each was reviewed and merged by a maintainer.

What didn't go to plan

I keep the misses in the record rather than tidying them away. Two examples; the decisions and investigations pages have the rest.

A circuit breaker that could never trip

In AgentBrake I wrote a circuit-breaker policy with open, half-open and reset logic, and unit-tested it. Then I found that nothing in the proxy ever reports a failure to it, because the child's output is piped straight through. I fixed it months later by parsing the server's responses. The lesson: wire the signal before writing the policy.

Read the full record

A 10× target that reached 1.2–2.2×

In MiniDB I expected the vectorized executor to beat the Volcano-style one by about ten times. It reached roughly 1.2 to 2.2×, and the benchmark doc explains the overhead instead of hiding the miss. The lesson: measure first, and publish the number you got.

Read the full record

Writing

All posts

Explore CORTEX

The rest of the site is a small control-plane for my engineering notes. Press Ctrl/⌘ K to search it.