Skip to content
Nirav Vaghasiya

About

I build the infrastructure that makes language-model systems dependable.

I’m an AI/ML engineer and researcher. In my own words, I build agentic frameworks, cognitive runtimes, and evaluation systems for LLM applications. The work is public: a cognitive runtime published on PyPI that gives agents typed, budgeted memory with supersession and quarantine; a single-file agent framework with 488 offline tests and a fail-closed authorization path; and a chess analysis engine, live on Hugging Face Spaces, whose selected numerical and move-label claims are checked against engine output before the commentary is shown.

Around those systems I’m building an experimental platform for context engineering with controlled baselines and effect sizes, a multi-agent language tutor built around a transparent learner model, a 104-notebook mathematics curriculum for AI, and an interactive algorithms knowledge base that runs Python in the browser.

My research interest is how the structure of a dataset — its balance, diversity, size, augmentation and preprocessing — may shape what convolutional and attention-based networks learn and how well they generalise. I present that work here as a proposed study design, not as completed research. The same habit runs through my engineering: change one thing at a time, measure generalisation rather than fit, and publish limitations with the evidence.

How the work is built

Four habits, each visible in the repositories.

  1. 01

    Deterministic first, generative last

    In the chess engine the parser, evaluator and classifier never touch a model; the language model writes last and its output is verified. In Unchained a tool call is validated and authorized in Python before it runs.

  2. 02

    Nothing silently overwritten

    BrainOS supersedes conflicting memories instead of deleting them and keeps provenance on every record, so the runtime can answer why it believes something and what it believed before.

  3. 03

    Evaluate before claiming

    Ablation ladders, paired statistics with effect sizes, calibration error and faithfulness harnesses ship with the code — and so do written limitations, including the Context Lab's refusal to call early numbers results.

  4. 04

    Documentation is a claim about code

    Unchained's benchmark counts lines live rather than quoting a number, a pull request exists solely to correct README claims, and BrainOS generates its neuroscience-evidence document from source.

Toolbox

What the code is written with.

AI / Machine Learning

  • PyTorch & NumPy
  • CNNs & Transformers
  • Optimisation & information theory
  • LoRA / parameter-efficient fine-tuning
  • Statistical learning theory

LLM Systems

  • RAG (TF-IDF → embeddings, ChromaDB)
  • Memory & context engineering
  • Structured output with Pydantic
  • Faithfulness verification
  • OpenAI · Anthropic · Ollama APIs

Agentic AI

  • ReAct agent loops & tool calling
  • LangGraph state machines
  • Multi-agent routing & synthesis
  • Tool authorization, budgets & audit
  • MCP & LangGraph adapters

Software Engineering

  • Python 3.9–3.13 · TypeScript
  • FastAPI · Gradio · Streamlit · Next.js
  • SQLite · PostgreSQL
  • pytest · mypy · ruff · CI matrices
  • Docker · Hugging Face Spaces · PyPI

Research

  • Ablation studies & baselines
  • Recall@K · MRR · nDCG · calibration (ECE)
  • Paired tests & effect sizes
  • Reproducible fixtures & seeds
  • Evidence-graded documentation

7 public AI/ML repositories profiled here · sources, caveats and verification basis are listed on every case study.