ML/AI engineer and computer science student · Toronto
Max Naidenov
I'm a computer science student at York University in Toronto. I got hooked on AI by studying the architecture behind large language models, and research is what drives me now.
2025 to now · 4 roles
Work history
I started at Neo Financial as a software developer intern, building backend features for support ticketing at a fintech that serves more than a million customers.
- Node.js backend for support ticketing and query systems
- 1,000,000+ customers
- 5+ production features shipped
- Every one through code review and automated tests
Then I joined Pokerly as a machine learning engineer and built computer vision that watches live poker as it is played.
- Real time models that detect game events
- Trained on poker video and hand data
- Labels made with open source models
- Language models fine tuned on GTO theory
At SCHWAI I built Project Brain, the internal knowledge base, and a sandbox that improves prompts against a judge and keeps an edit only if it wins on questions it has not seen.
- RAG with hybrid search, RRF and cross encoder reranking, over MCP
- Prompt sandbox for 4 copilots: LLM judge, about 300 questions, 5 dimensions
- A held out test set caught a run that beat validation but lost to baseline
- LoRA fine tune of an open weight LLM, served and quantized
Project Brain Building an internal knowledge base A self-optimization sandbox for AI systems
Now I am at Nanocore Technologies, building a stereo depth pipeline that turns two handheld phone photos into 3D measurements.
- Python and NumPy, no depth sensor
- Corrects hand shake, block matches along image rows
- Sets scale from a known object
- 3D forecasts with ML models, reported as research output
5 things I’ve built
Projects
A local ML app where an agent does the data prep, the training and the evals, and training only unlocks after five gates pass.
- An agent runs data prep, training and evals
- Training unlocks only after 5 gates pass
- One instruction line: 53% to 79% accuracy
- Invented numbers in reports: 28 of 90 down to 6
Write-up Previous app (v0.1.0) on GitHub Previous app source on GitHub
Tooling that gives coding agents and local models a verified map of the code they are working on.
- A verified code map for coding agents
- TypeScript, Python, Go and Java into one live graph
- Every edge traced to a source line
- A CLI diff fails CI when the architecture drifts
A fix to how DeepEval, an LLM testing framework with 19k stars, scores tool calls.
- A fix to a 19k star LLM testing framework
- Scoring no longer depends on call order
- Hungarian assignment of expected to actual calls
- 5 tests, checked on 3,000 random matrices
5 write-ups
Writing
What I built and what it measured. Pick one and it opens here.
Contact
Get in touch
Resume (PDF)GitHub LinkedIn X About
Skills and education
- Languages
- Python, TypeScript, JavaScript, SQL, C++, Java, Bash
- Machine learning
- PyTorch, Hugging Face, fine tuning, LoRA/QLoRA, NumPy, quantization, ONNX, computer vision
- LLM systems
- RAG, embeddings, vector search, reranking, LLM as judge, evals, AI agents, MCP, Ollama
- Backend and data
- Node.js, FastAPI, PostgreSQL, pgvector, Supabase, Redis, REST APIs
- Tools
- Docker, Linux, Git, GitHub Actions, CI/CD, React, Electron, Tauri, Vitest, pytest
- Education
- York University, B.Sc. Computer Science, expected Summer 2028
Selvage is a thin, hybrid-searchable layer over the places team knowledge actually lives, Slack, wikis, code, and databases. Connectors normalize every source into one Postgres + pgvector table, so the same query serves a person at a CLI, an agent over MCP, or the web UI. Local-first and MIT-licensed, with embeddings running on your own CPU.
Purpose. Coding agents describe a system confidently whether or not they know it. Sequence reads the code first, so every answer can point at the file and line behind it.
Background. A passion project. I built it because the diagrams I relied on kept drifting from the code, and I wanted one place for the parts of an agent harness I actually use: any model, a whiteboard, workflows, and a map that stays true.
SimpleML is a local, click-and-play machine learning app for Windows. You connect an agent (Codex, Claude Code or a local model), then pick a goal or drop in your data. It plans and runs the whole pipeline, data, training, evaluation on sealed test rows and a write-up, with every step visible.
SimpleML, formerly ML Harness.
It has pre-training and post-training kits with environments, research swarms, and a Library of 56 architectures with a picture each. The installer is 297 MB and unsigned, and the repository is private, so there is no public download yet.
Measured on the previous app (v0.1.0). Most people who think they need to fine-tune a model don’t. A clearer prompt, a few examples, or a way to look things up usually does the job, and training is the slow, expensive fix that fails quietly when it is the wrong one. The previous app was the step before that. You described what you wanted in plain words. It looked at your data, scored the model you already had against a trivial baseline, and checked five gates: is there an eval set, is there a baseline, were prompts tried, would retrieval do it, would a cheaper model do it. Training was only possible once all five passed, and the gates lived in a rules file the engine checked, not in a prompt the model could argue with. When a cheaper fix won, it did that instead. For a small job, like training a classifier on a built-in dataset, it wrote the script, ran it in the project’s own Python and reported the number the script printed. It ran on your machine with a model you picked (local through Ollama, or any OpenAI-compatible API), and every number it showed said where it came from. Version 0.1.0 of that app is a free Windows download, linked below.
Project Brain is SCHWAI’s internal enterprise knowledge base, built to improve itself through feedback loops from live usage, open-source models fine-tuned on the organization’s own knowledge so the company operates at higher efficiency over time. It was one app in a larger multi-app platform I built across schwai.com on FastAPI, React, Supabase, Redis, and Cloudflare Stream.
web-vid is a Claude Code plugin that recreates a website as a promo video from the site’s own design tokens and copy, deterministic React scenes rendered to MP4, not a screen recording. An adversarial fidelity pass forbids invented text and colors, so the video stays true to the real product.
revenue-squad is a Python CLI that runs a solo operator’s full outbound B2B workflow, prospect research, cold email, and proposal drafting, by driving the Claude CLI headless through a set of Markdown skills. It never invents a prospect fact: emails are MX-checked and every claim traces back to an evidence URL, enforced at the tool boundary.
A client platform that runs medical intake as an AI-led questionnaire: admin-issued ticketed links open a pre-qualification step, then a checklist-based AI interview for each family member, with binary gates and AI follow-up questions feeding a staged admin workflow. Built on React and TanStack with a FastAPI and PostgreSQL back end and Azure OpenAI.
In practice effort is not the constraint: the reassembly is where the hours go. Sequence reads a repository and hands the structure back as a thing you can point at, services, modules, datastores, topics and the edges between them. On its own tree, scanned on 10 September 2026, that is 1,110 nodes and 2,945 edges, resolved in about five seconds, locally, against your code, with whatever model you attach.
I built it because I could not read a large system quickly and did not want to keep pretending otherwise.
What it is, and whether you can run it
It runs locally against a checkout you already have: no upload, no hosted service, any model you attach. The graph is built from the code rather than described to the model, which is why an agent given it drifts less than one given a summary. On a real scan it maps containment completely and draws one service connector, because that repository has almost no runtime topology to draw.
The part a reader should not have to infer: you can run it. v0.1.8.1 is the current release on the public mirror, for Windows, macOS and Linux (the release, the measured report). It was called CodeForge while I was building it, which is the name you will still find on the older commits. The numbers above were measured on the private tree, so they say how far along this is rather than being something you can yet reproduce.
Visual is the medium, not a feature
An architecture drawn is something you can argue with; the same architecture in paragraphs is homework. Every node carries a kind, service, module, datastore, topic, agent, entry, distinguished without relying on colour, because a diagram that only works if you see hue as I do does not work.
Teaching falls out of that rather than sitting beside it, which is the part I was slowest to understand. Explaining a system and designing one are the same skill pointed in opposite directions: both install a structure in someone’s head and check whether it took. So Teach mode is not a third product but what you get once the design is pinned down in enough formats to re-order it for a learner: take one concept, draw one picture, ask a real comprehension question, withhold the answer until they commit, and reveal it next turn either way.
Two loops decide whether any of this works. An engineer is handed a repository they did not write, runs it locally, and argues with the result, what depends on this, what breaks if I move that, against a model seeing the same graph. And a learner asks a question and gets it drawn part by part, with a question in the middle that finds out whether it landed, which a grader once failed a turn for missing, while the reply was missing the lesson. Neither loop is finished, and I name them because a loop you have named is one you can fail publicly.
Three features I was confident about did not survive measurement
A list of file names carried between turns, so a follow-up question had something to point at, was never used once: fifteen runs with the block moved to three positions, pointed at directly, then instructed outright, and the model named none of the three files only that list could have supplied. A chart tool the model could call whenever a picture would help was proposed zero times across twelve turns, reachable, documented, never reached for. And deleting 2,456 tokens of tool instructions made the model call its tools fifteen times more often, the opposite of what anyone proposed, and it does not transfer to the tier that matters.
Two provisions the model ignores, and one intervention landing on the wrong tier. I would rather have that on a page than shipped quietly.
The distance between working and reaching a screen is where the faults live
A benchmark said teach mode could draw at 12:42. The drawing reached a screen three and a half hours later, and every one of those hours was invisible to every test I had. The same gap explains why the graph is fed to agents as structure rather than described (architecture as a graph).
Design mode took three attempts for a related reason: the capability existed and was unreachable. The prompt saying help the user design a system from scratch was written, and the command line hardcoded it off, the same shape as a --teach flag shipped, documented, and read by nothing. Turning it on was not enough either, two lines of that prompt disagreed, one ordering a clarifying question and one forbidding it, and the model obeyed the wrong one correctly.
The claim underneath Teach mode needed checking, and the checking is the story
Its premise is that the best teaching is interactive and visual, so I had an agent fetch the learning-science evidence with effect sizes read from the papers. It returned twenty sources, then withdrew eight an hour later as never read, and I believed the withdrawal at once, because a retraction sounds like honesty. A third read found every withdrawn number in the papers, verbatim. The correction was the error, and it had already told me not to look.
That is the pattern this project keeps producing, and why I write the failures down rather than the features. The tool exists to stop you holding a system in your head, because a structure you cannot see is one you cannot check. Every finding here is the same thing one level up: something I believed about my own product that stayed believable exactly as long as nobody drew it.
SimpleML is a local, click-and-play machine learning app for Windows. You connect an agent (Codex, Claude Code or a local model), then pick a goal or drop in your data. It plans and runs the pipeline, data, training, evaluation on sealed test rows and a write-up, with every step visible. It has pre-training and post-training kits with environments, research swarms, and a Library of 56 architectures with a picture each.
What it is, and whether you can run it
Concretely: a React interface over a FastAPI engine, in a desktop shell. The installer is 297 MB and unsigned.
The part a reader should not have to infer: the repository is private and there is no public download yet, so this is a page you can read, not a thing you can run. The rest is testimony and should be weighed as such.
The previous app, ML Harness v0.1.0
Everything from here to the end was written about and measured on the previous app, v0.1.0, which SimpleML replaced. Present-tense claims below are about that app, not about SimpleML.
You can run it. v0.1.0 of the previous app is a free Windows download on a public mirror (Previous app (v0.1.0) on GitHub, previous app source on GitHub). Before it shipped it was installed on a clean Windows Sandbox with no Python, Git or Ollama: it opened from the desktop icon in 11 seconds, connected a local model, and finished a small scikit-learn task in 129 seconds.
It walked the decision with you
Someone arrives wanting a model, say a 14-billion-parameter one that can use tools. It proposes an approach and says which of the three it is: pretraining, fine-tuning and low-rank adaptation are not interchangeable, and the difference is most of the cost. It gets data, downloading a set or generating one from a description. It checks the machine and refuses when the thing will not fit, naming the number that refused it. Then it runs.
The output I care about is a model I can use and put on Hugging Face, not a score in a table. That step has not happened, and I was wrong about why: both recipes carry the Hugging Face client, which I read as publishing being a credential away. No code calls it: the library is installed, the upload never written.
Every number carries where it came from
Each value in the ledger is stamped measured, stated, defaulted or asserted, fussy until a default dressed as a measurement has cost you a night. The rule underneath: a model may not mint a fact a person supplies, because a system blurring a generated number with a reported one will eventually train on its own guess.
Generated rows cannot open a gate and cannot be trained on unverified. What is explicitly not claimed is that it can tell a good generated row from a bad one, so a person reads a sample.
And the recipe that trains an adapter also evaluates it, in the same pinned virtualenv: two graders are two instruments, and two scores from them are two facts rather than a comparison.
The instruments were wrong more often than the results
A judge kept 19 of 72 rewrites with nothing wrong, justifying each with a deletion that never happened. A test runner printed Ran 3315 tests... OK where discovery found 3,822, because a runner reports what it ran, never what it should have. A registered prediction about 251 new dependency edges was refuted in two hours, and the measure credited a failed turn with a concept it never used. A corpus count that never said distinct was not a size, 95 was 60.
Three more are worth the click for the fix rather than the fault. A registered precondition turned away nine candidates in ten when reproduced under the null. Seeding an annotator to repeat itself removed the second pass catching its errors, reproducibility bought by deleting the check. Across twenty-five agent and evaluation frameworks, adding a tool takes four lines and none asserts anything about the run itself.
Two of four basic checks are missing from three vendors’ agent logs, and the log arbitrating my GPU records a holder field of 127.0.0.1 for every caller. A liveness probe evicted the 27B evaluation it was written to protect, then called the server down. The same card is how four agents collide: the engine runs models for whichever lane calls it, so two lanes on one endpoint are two streams the lock cannot see.
It refused a training run on my own numbers
Reading wrong_format at 13 of 20, it returned never fine-tune for a format a grammar can enforce, before a GPU-hour was spent. Chasing why cost me a published claim: the lift I credited to a worked example came from one sentence naming what to attend to, 53% to 79% on twenty rows where eight points resolve, three examples adding nothing. The same afternoon a 27B model ran on this 8 GB card at 30.9 tokens per second and beat the 2.6B house model’s 49%, until one line of prompt matched it for free.
The training path is not a plan. Twenty-one LoRA adapters sit in the run directory, the earliest dated 19 August, across two base sizes and two ranks, 3.5 MB on a 135M base, 12 to 24 MB on a 1.7B, one a DPO run over a model the previous app had already fine-tuned and merged. The recipes are pinned, and a preflight refuses a CPU-only PyTorch rather than running twenty times slower in silence. Still missing is what counts: the pre-registered 196-row baseline sits at 32.7% and 35.7%, with no verified win on held-out data yet.
A harness that only helps you train will let you train the wrong thing well. The one worth building reads your numbers back and says don’t. I trust this one because it has done that to me twice, on days I would rather it had agreed.
Every company already has a knowledge base. It’s scattered across Slack threads, Notion pages nobody kept current, a Google Drive folder called “final_v3,” and a few people’s heads. The information exists. Finding it is the hard part, and the person who knows where it lives is usually heads-down on something else.
At SCHWAI I built Project Brain to close that gap. It is a FastAPI backend behind a React frontend, Postgres and Supabase for storage, Redis on the fast path, and a set of background workers that pull company content in and keep it current. One worker ingests books. Others take on the rest of what the company produces and reads.
The reason an enterprise should own this, rather than rent a generic tool, comes down to specificity. A general assistant knows the internet. It doesn’t know your pricing exceptions, why a past deal fell through, or the internal name for the thing three teams argue about. That knowledge is the actual moat, and it should sit somewhere the whole company can query in plain language instead of pinging whoever happened to be there in 2023.
The part that makes it worth building is the feedback loop.
A knowledge base that ships once and then rots is worse than useless, because people trust it right up until it burns them, then stop trusting it entirely. So the design goal was never “index everything once.” It was: every time someone uses it, the system should get a little more current.
Questions people ask reveal what’s missing. Answers people correct become new ground truth. The workers keep pulling in fresh material so the base tracks the company as it actually is this week, not as it was at launch. Live usage is the maintenance mechanism. The tool improves because people lean on it, which is the opposite of how most internal software ages.
On top of that live corpus you stack the models.
The pattern is retrieval first: an open-source model answers, but it answers against the company’s own documents, not its training data. The org’s knowledge is the context; the model is the reader. Open-source matters here because the data is sensitive and the whole thing runs where the company controls it, not inside someone else’s API.
That alone answers most day-to-day questions with real sources attached. Call it the floor.
The ceiling is fine-tuning.
Once you have a running base and a steady stream of real questions, corrections, and preferred answers, you have exactly the material a fine-tune needs. You can teach a model the house style, the vocabulary, the way this specific company reasons about its own work. Retrieval keeps the facts fresh; fine-tuning makes the model fluent in the place it works for.
I want to be honest about where this sits. It’s the direction, and the earlier stages carry most of the weight today. Fine-tuning compounds what retrieval already made possible, and each step is only worth taking once the one before it is solid.
The payoff is efficiency that’s hard to see on any single day and obvious over a quarter. People stop re-asking answered questions. New hires ramp against the same source everyone else uses. Decisions get made against what’s actually true instead of what someone half-remembers.
I think most enterprises end up here, whether they plan to or not.
The knowledge is already the valuable part of the company. Right now it leaks out through turnover and decays through neglect. An internal knowledge base that gets more current the more it’s used, with the company’s own models reading the company’s own corpus, turns that liability into something that compounds.
Project Brain is one company’s version of it. The shape generalizes, so much that I’ve been building an open-source take on the same idea: Selvage, a local-first hybrid-search layer over the same kind of scattered sources, Slack, wikis, code, and databases, queryable by people and agents alike.
I think the most important open question in software right now is how you use a model as an agent, and my answer is graphs.
An agent is a fast, tireless, literal worker with no memory of why. Hand it a task and it produces something that runs. Whether that something matches what you meant is a separate question, and it’s the question that decides whether agents are actually useful or just quick at making a mess.
The failure mode is always the same. You give the agent loose context, a paragraph of intent and a pile of files, and it fills the gaps with guesses. A POST where you specified GET. A route mounted at the wrong path. A write to a table that was supposed to be read-only. Each one is small. Together they’re drift, and drift is how a system quietly stops matching its own design.
So the thing I keep chasing is this: feed the agent deterministic, structured data about the system, and it stops guessing. Give it the exact shape of what you want and it builds against that shape. Sequence is my attempt to make that real.
You start on an infinite canvas and draw the system: services, data stores, the edges between them, the contracts on those edges. That drawing isn’t decoration. It’s a structured file, archgraph.json, and it’s the source of truth.
From the graph, Sequence renders a scaffolding brief: the routes you specified, the stores you declared, the contract on every edge, and a concrete task list per service, with the rules that govern all of it written into the brief itself. The rendering is a pure function of the spec, so the same graph always produces a byte-identical brief. Then an agent builds from that brief and nothing else. It never sees this repository or my conventions, only the document the graph rendered, which is the point: if the brief does not say it, the agent cannot know it, and I find that out on the first run rather than in review. The first version of the code comes out of the spec instead of drifting from it on day one.
Then the loop closes in both directions. sequence scan reads the generated code back into the graph, so the canvas reflects what’s actually in the files. And sequence diff compares the two. When the implementation stops matching the spec, wrong method, wrong path, wrong table, diff exits 3. In CI, a non-zero exit is a failed build.
That’s the part I care about most: spec-drift becomes a CI failure class.
We already treat a broken test as a red build. A failing type check, a lint error, a formatting slip, all of them block the merge automatically, which is why they mostly don’t happen anymore. Architecture never had that enforcement. It lived in someone’s head and a diagram that went stale two sprints ago, and it relied on a senior engineer noticing in review. Reviewers are busy and human.
Put the architecture in CI and it stops being a matter of vigilance. The build knows the shape you agreed on. The moment the code walks away from it, the pipeline says so, in the same breath it complains about a type error. No meeting required.
There’s a second way in, for systems that already exist. Reverse mode reads a repo statically, its compose file, its Kubernetes manifests, its Helm charts, and infers the graph from what’s there. You don’t have to start greenfield to get a checkable picture of what you actually built.
The whole thing is local-first and runs on 127.0.0.1. Your architecture isn’t something I want to see, and it doesn’t need to leave your machine.
Here’s where I think this goes.
As agents write more of the code, the scarce skill stops being typing and becomes specifying: describing the system precisely enough that a literal worker builds the right thing. That specification has to live somewhere machine-checkable, or it’s just a suggestion the agent is free to ignore.
A graph is a good home for it. It’s the contract between what a human meant and what the agent produced, and unlike a diagram on a wiki, it fails the build when the two disagree. This is the same idea underneath everything I’m working toward: the way to get accurate, trustworthy work out of a model is to hand it structured, deterministic ground truth and check its output against that ground truth, automatically, every time.
The more code agents write, the more that contract is worth having. I’d rather review a diff against the architecture than squint at 4,000 lines hoping to notice the shape changed.
SCHWAI runs a handful of internal AI copilots. One writes summaries, one helps devs, one handles admin, one works sales. Each is a model wrapped in a system prompt, and the prompt is where most of the quality lives. Change the wording and the answers change. The hard part is knowing whether a change actually helped, or whether you just talked yourself into liking it.
So I built a sandbox that improves a copilot by rewriting its system prompt against a measured reward. No retraining. No weight updates, no gradients. It’s model-agnostic too, so swapping the underlying model is a config change, not a rebuild.
The loop is simple to say and finicky to get honest.
First it generates a bank of about 300 realistic questions, either from seeds or from real logged usage. Then it runs the copilot over all of them and scores every answer 1 to 5 on 5 quality dimensions, with a second model acting as judge. On top of the judge sit deterministic hard-gates: a leaked client name or a broken output format is an automatic veto that no high score can buy back.
Then a strong model proposes one small edit to the system prompt, aimed at whichever dimension scored worst. The edit is an anchored diff: an exact snippet to find plus its replacement. If the anchor isn’t in the prompt verbatim, the edit is rejected. That one rule stops the model from quietly rewriting the whole prompt when you asked for a nudge.
Keep the edit only if it measurably beats questions the proposer never saw, and only if it regresses no strong dimension. Then repeat, drilling one weakness at a time. I call it focus mode; it’s coordinate ascent by another name. When the loop settles on a winner, it scores that winner once on a held-out test set and writes a scorecard a human can read.
It runs locally against a copy of the data, streams a live dashboard, and never touches the production prompt. What comes out is a reviewed suggestion. A human stays the gatekeeper.
The honest part is the whole point, so let me spend a paragraph on it.
Train, validation, test. If you keep adopting rounds against the same validation set, that set slowly turns into a target you’re optimizing straight at, and the score stops meaning anything. Winner’s curse, multiple comparisons, whatever you want to call it. So the winner gets scored once on a test set it was never selected against.
That discipline caught the system fooling itself. One run looked like a big jump on the validation set. On the never-optimized test questions it came out lower than the baseline it started from. Most tools would have reported the validation number and called it a win. This one reported the truth and killed the run.
There’s also a noise floor. Score the baseline twice, treat the wobble between the two runs as noise, and express every candidate’s gain as an effect size in units of that noise. A gain several times the noise is real. A gain smaller than the noise is luck wearing a nice outfit.
Sometimes the most useful output is a shrug backed by data. On the grounded dimension the loop tried twice and moved the score by nothing. That flat result was itself the finding: the gap lived in retrieval, so the fix belonged in the corpus rather than the prompt. Knowing which lever to pull next saved days of guessing at the wrong one.
I also gave the proposer a memory. Early on it guessed fresh every round and kept re-proposing near-duplicates of edits it had just been told didn’t work, so very few landed. Now every edit it tries, and whether it landed, gets logged to a persistent ledger, and each round it studies the ones that worked before proposing the next. In-context few-shot, experience replay, same idea. Acceptance should climb the longer it runs.
The results came out the honest way. The dimensions that started weakest, conciseness and tone, moved the most. The ones that were already strong barely budged, which is what you’d expect when there’s less room to gain. And grounded didn’t move at all, for the reason above.
I ran the same sandbox across all 4 copilots, summary, dev, admin, and sales, and on held-out questions it lifted answer quality by roughly 10% on average, with the whole program running a good bit more efficiently within a couple of days.
None of the shape is new, and I’d rather say so. The anchored-diff-from-critique idea echoes ProTeGi and the automatic-prompt-optimization line, where the judge’s critique reads as a textual gradient and the diff is the step. The generate-score-select loop is the shape APE, OPRO, and DSPy all use. The judge is LLM-as-judge. What none of them touch is weights, and that’s the next frontier.
Because that’s what this really is: a self-improvement environment. A measured reward, held-out proof, a human gate. Point that same environment at an open-source model and let it update weights, and you have an RL-style loop where the model changes how it thinks inside the sandbox, not just the instructions wrapped around it. Once the edit ledger holds a few hundred context-edit-outcome tuples, you can fine-tune an open model to emit better edits directly. Real weight-learning, but only once the in-context version plateaus. The ledger is already the dataset.
That’s the direction I want to take into research: sandboxes where powerful models improve themselves under honest measurement. This one was the first step. I want to be straight about where it sits, though. Today it optimizes prompts and touches no weights, and the earlier stages carry the weight. The rest is where it’s headed.