Tirth Patel

Software engineer, AI systems and backend. Agent infrastructure, retrieval, APIs, and model benchmarks, each shipped with tests and numbers.

Noise in, structure out. That is the job. Move the pointer to disturb it.
01 / 04

Substrate

A local-first layer that gives any MCP-compatible agent persistent memory, a task ledger, file search, and a safety gate for shell commands. 17 tools, no network calls, 58 tests.

  1. 17MCP tools
  2. 58tests
  3. 0network calls

Python 3.10 to 3.12, Model Context Protocol, SQLite FTS5, pytest, ruff

Full case study
Try the gate. Type a shell command; the verdict is computed in your browser by a port of the real rules.
Targets system path '~/projects' for deletionHARD_BLOCK
Chained parts, command substitutions, and interpreter -c payloads are each classified; the worst result wins. Unknown commands default to NEEDS_CONFIRMATION.
02 / 04

Forest Growth & Yield Analytics

A full-stack platform that fits, benchmarks, and serves basal-area growth models for 13 species and forest-unit groups, built for scientists at Ontario's Ministry of Natural Resources and Forestry.

  1. 17algorithms benchmarked
  2. 13model groups
  3. 89tests in CI

Python 3.11, FastAPI, SQLAlchemy 2.0, Alembic, scikit-learn

Full case study
Projection. Drag the sliders; the curve is the model equation with example coefficients.
18.726.634.442.350.1012.525 yrBA m²/ha43.6 m²/ha
22 m²/ha
25 years
RGR = 0.0277 per year for this stand (AGS 0.72, TCR 3, DQ 20 cm, q 1.3, cut 0). Coefficients are from the public demo fit on synthetic data (n=1633), not the production model.
03 / 04

ContextBridge

Portable, privacy-conscious memory for LLMs. Extracts typed memory from ChatGPT and Claude conversations, redacts secrets before storage, and retrieves only what the next task needs, with every pick explained.

  1. 93.2%less injected context
  2. 201offline tests
  3. 86.7%retrieval MRR

Python 3.11 to 3.13, Pydantic 2, FAISS, SQLite, Flask

Full case study
One memory package, rendered for three model families.
<context>
  <identity>
    <item>Tirth, software engineer in Toronto</item>
  </identity>
  <projects>
    <item>ContextBridge: portable memory for LLMs (Python, FAISS)</item>
  </projects>
  <decisions>
    <item>BM25 first, embeddings blended in optionally</item>
    <item>Redact secrets before storage</item>
  </decisions>
  <open_tasks>
    <item>Raise retrieval precision@3 above 76.7%</item>
  </open_tasks>
  <preferences>
    <item>Clean architecture; small modules</item>
  </preferences>
</context>
Example package. The real prompt builder adds the retrieved items only.
04 / 04

Instax

Semantic photo search over CLIP embeddings with pgvector, plus a written plan for turning the prototype into a product.

  1. 512vector dimensions
  2. 3search modes
  3. 1strategy document

Python, open_clip (CLIP ViT-B/32), PyTorch, PostgreSQL, pgvector

Full case study
Retrieval pipeline
text / image CLIP ViT-B/32 512-d pgvector HNSW top-k
CLIP embeds each image to 512 dimensions; pgvector (HNSW, cosine) does the search; three endpoints: text, image, location.

Positions

What I hold to when I build, and the work where you can check it.

  1. A metric without an eval is a guess.

    ContextBridge ships its own offline eval suite. Precision, recall, MRR, and redaction recall run on every commit, and CI fails if any of them drops below its floor.

    Receipt: ContextBridge eval suite
  2. Keep the model out of the safety path.

    A safety gate has to hold when the model is the thing being attacked. Substrate classifies shell commands with plain deterministic code, and every bypass found in review is pinned shut by a regression test.

    Receipt: Substrate safety gate
  3. Random splits flatter the model.

    Plots measured twice leak into both sides of a random split. The growth benchmark scores 17 algorithms with plot-grouped and temporal cross-validation, prints the naive split beside them, and tests each one against the equation already in production.

    Receipt: Growth model benchmark
  4. Local by default. Network by permission.

    Substrate makes zero network calls in its default config. ContextBridge runs on 127.0.0.1, and a transcript leaves the machine only when you pick a vendor extractor.

    Receipt: Substrate and ContextBridge
  5. Redact before you store.

    Secrets and personal data are masked before anything reaches disk, and the masking is measured: 100% redaction recall with zero false positives on the ContextBridge eval set.

    Receipt: ContextBridge redaction
  6. Write down what it does not do.

    The public growth-tool edition lists exactly what was removed and why. Substrate keeps the review that ended its first version in its docs folder.

    Receipt: Public edition README

About

I am a software engineer in Toronto, working on AI systems and backends. I take the parts of a system where a wrong answer costs something: the gate that decides whether an agent may run a command, the retrieval step that picks what a model sees, the benchmark that says which model to trust, the API other people build on.

Currently building ContextBridge, portable memory for LLMs with hybrid retrieval, PII redaction, and its own eval suite, and Substrate, an MCP server for agent memory and permission-gated execution. Previously built the Forest Growth and Yield Analytics System for scientists at Ontario's Ministry of Natural Resources and Forestry, with a 17-algorithm benchmark on real inventory data.

My defaults: typed interfaces, deterministic behaviour where it matters, numbers that come from a test or an eval, and a README that says what the system does not do yet.

Experience

Software Developer, Industry Partner Project

Client: Ontario Ministry of Natural Resources and Forestry / Sep 2025 to Apr 2026
  • Built a full-stack platform (FastAPI, SQLAlchemy 2.0, Alembic, React 19, TypeScript) that fits, benchmarks, and serves basal-area growth models for 13 species and forest-unit groups on MNRF inventory data.
  • Benchmarked 17 algorithms, from OLS to XGBoost and mixed-effects models, under plot-grouped, temporal, and naive cross-validation, with paired t-tests against the production equation and split-conformal prediction intervals.
  • 25 REST endpoints, async training jobs, one Alembic chain across SQLite, PostgreSQL, and SQL Server, and CI gates: 89 pytest tests, mypy, Playwright with axe accessibility scans.

Stack

Languages
Python, TypeScript, JavaScript, SQL, Java, C#, Bash
AI and LLM
RAG, BM25 and embedding retrieval, FAISS, MCP, OpenAI, Anthropic, Ollama, retrieval evals
ML and data
scikit-learn, XGBoost, LightGBM, statsmodels, pandas, NumPy, conformal prediction
Backend
FastAPI, Flask, Pydantic 2, SQLAlchemy 2.0, Alembic, PostgreSQL, SQLite FTS5, SQL Server
Front end
React 19, Next.js, Vite, Tailwind, Recharts
Quality
pytest, Playwright, axe, ruff, mypy, GitHub Actions, Docker

Full résumé

Working on something that has to be right?
Let's talk.