Skip to content
Nirav Vaghasiya

AI/ML EngineerResearcherOpen-source systems

Nirav VaghasiyaBuilding intelligent systems from the ground up.

AI/ML Engineer and researcher working across deep learning, LLM systems, agentic AI and machine-learning research.

  • 01Deep learning
  • 02LLM systems
  • 03Agentic AI
  • 04ML research

01Selected work

Systems that remember, reason and stay honest.

Open-source runtimes, frameworks and evaluation harnesses for LLM applications, presented with source-linked evidence, documentation and stated limitations.

MEMORY STORE · 8 TYPESsuperseded → current, never deletedrecallRETRIEVALmulti-signal · budgetedtoken budget≤ capobserve → filter → attend → retrieve → reason → storeconsolidate · forget every N turns

Cognitive runtime for AI agents

Published on PyPI · runtime in alpha

BrainOS

A neuroscience-inspired cognitive runtime that gives long-lived agents typed memory, budget-aware retrieval, working memory, consolidation and safety behind one small Python API.

50-turn prompt-token benchmark

Source (opens in a new tab)

424,361 → 79,381

Author-reported simulated conversation; counted with tiktoken (cl100k_base).

  • Memory systems
  • Retrieval
  • Continual learning
  • Agent safety
100%0%18.Bd6 · BLUNDER74% → 50%LLM COACH NOTEfree prosecheck_faithfulnessnumbers must match

Grounded LLM annotation

Live demo on Hugging Face Spaces

Chess Analysis Engine

Paste a game and get Stockfish evaluations, move labels, accuracy and ACPL — plus coach notes whose selected numerical and move-label claims are checked against engine output before display.

Immortal Game regression · 18.Bd6

Source (opens in a new tab)

74.3% → 50.0% · Blunder

Depth-16 Stockfish fixture; 288 centipawns lost; engine preferred Re1.

  • LLM evaluation
  • Faithfulness
  • LangGraph
  • RAG
THINKllmACTtoolOBSERVEresultLLM3 providersMEMORYwindow+summaryTOOLS@tool → schemaRAGtf-idf / embedone file · two dependencies · fail closed

Single-file agentic framework

v0.4.0 · pre-1.0

Unchained

An agentic AI framework — tools, memory, RAG, structured output and multi-agent routing — written as one readable Python file with exactly two dependencies.

Offline test surface

Source (opens in a new tab)

488 test functions

Counted from three public test modules; CI spans Python 3.9–3.13.

  • Agents
  • Tool calling
  • RAG
  • Multi-agent orchestration

Supporting work

ROUTERCONVERSATIONGRAMMARVOCABULARYCULTURALEVALaccept · revise · abstain → learner model → FSRS reviewLANGGRAPH · 7 SKILLS · CEFR

Multi-agent adaptive tutor

2026

Polyglot Swarm

A self-hostable multi-agent language tutor that turns conversation into per-skill mastery evidence, schedules review with FSRS and plans the next most valuable thing to practise.

5-arm ablation · 30 ADRs

Deterministic fake-LLM mode; no study with real learners and CEFR is not human-validated.

  • Multi-agent systems
  • Learner modelling
CONDITIONS × CATEGORIESABCDEsingle · multi · temporal · conflict · distractor · x-session · abstainRecall@Kevidence-in-promptpaired t · ddegradation AUC9-label failures

Context-engineering experiments

2026

BrainOS Context Lab

An experimental platform for testing whether external cognitive memory can shrink prompt context in long conversations without losing task performance — with controlled baselines, ablations and a failure taxonomy.

Controlled comparison design

Source (opens in a new tab)

5 conditions · 4 ablations

Current observations use one seed/length tier, an estimated token counter and no model in the loop.

  • Evaluation design
  • Benchmarks
14 MODULES · 104 NOTEBOOKSsoftmax(QKᵀ / √dₖ) VW′ = W + BA (LoRA, r ≪ d)

Mathematics curriculum

2026

Maths for AI

104 Jupyter notebooks across 14 modules — from linear algebra and calculus to information theory, statistical learning theory and the mathematics behind transformers, LoRA and diffusion — each with a from-scratch NumPy or PyTorch implementation.

Verified curriculum footprint

Source (opens in a new tab)

104 notebooks · 14 modules

Counted from numbered curriculum folders; excludes template and test-fixture notebooks.

  • Deep learning foundations
  • Optimisation
HNSW · TRIES · KV CACHE · BEAM SEARCH>>> run in browser · pyodide worker

Interactive knowledge base

2026

Algorithms for AI

43 in-depth guides connecting classic data structures and algorithms to where they appear in AI/ML/LLM systems, with in-browser Python via Pyodide/WebAssembly and step-by-step algorithm animations.

Verified repository content

Source (opens in a new tab)

43 guides · 43 practice pages

Repository count; the currently deployed GitHub Pages build still serves the earlier 31-guide version.

  • Algorithms
  • Interactive learning

Proposed study design. No experimental findings or public thesis artifact are claimed on this site.

02Proposed research direction

How does dataset structure affect the effectiveness of deep neural network training?

Model architecture gets most of the attention, but balance, diversity, size, augmentation and preprocessing can set the ceiling on what training achieves. This proposed study would treat dataset structure as the independent variable and ask how each dimension changes what a model learns and how well it generalises.

Proposed pipelinedata → model → generalisation
  1. Dataset characteristics

    Balance, diversity, size, augmentation, preprocessing

  2. Model architecture

    Convolutional networks and Transformers

  3. Training

    Fixed budgets and controlled schedules

  4. Evaluation

    Held-out and shifted test sets

  5. Generalization

    The gap between fitting and understanding

Proposed protocol: vary one data property while holding architecture and training budget fixed, then measure held-out and shifted-set generalisation. No findings are claimed.

Variables

  • Class balance
  • Diversity
  • Dataset size
  • Augmentation
  • Preprocessing
  • Architecture sensitivity

03Repository writing

Technical notes, published with the code.

Architecture documents, security models and evaluation write-ups—not a fabricated publication history. Each entry opens its source repository.

04About

I treat evaluation as part of the build.

I’m Nirav Vaghasiya, an AI/ML engineer and researcher. My public work focuses on the infrastructure around language models: memory, retrieval, tool use, orchestration and the checks that keep generated output grounded.

Across my repositories, I put deterministic components first and generative ones last. I document limitations beside the evaluation that supports each claim.

05Contact

Working on agents, memory or evaluation? Let's talk.

Email is the fastest route. LinkedIn works too, and the code is always open for inspection.