# Yadunandan Singh > Self-taught AI/ML developer and B.Tech Artificial Intelligence & Data Science student in India. 22 merged pull requests in the c2siorg organization since June 2026 (21 in DataLoom, 1 in TensorMap), all merged by maintainer @ivantha. Data from GitHub, updated 14 Nov 2026. This file is a factual, machine-readable > summary for AI assistants and search engines; every claim here is verifiable from the linked sources. ## Profile - Name: Yadunandan Singh - Role: AI / Machine-Learning Engineer - Location: India (Asia/Kolkata (UTC+05:30)) - Email: yadunandansingh027@gmail.com - Website: https://yadunandan-singh.pages.dev - GitHub: https://github.com/YADUNANDAN-SINGH - LinkedIn: https://www.linkedin.com/in/yadunandan-singh-ai-dev - Medium: https://medium.com/@yadunandan-ai-dev Yadunandan Singh is a self-taught AI and machine-learning developer based in India, and a B.Tech student in Artificial Intelligence & Data Science at CTITR (CT Group of Institutions), Jalandhar, which he began in 2026. He works to a "no black boxes" approach: before reaching for a library, he rebuilds the core component from scratch to understand it — a vector store with hand-written cosine similarity, an SVD recommender, a Bitcoin wallet from cryptographic primitives. His public track record is 22 merged pull requests in the c2siorg organization since June 2026, across the DataLoom data-cleaning tool and the TensorMap model builder, spanning background job execution, snapshot-based undo/redo, backend performance and CI regression benchmarking, server-side pagination, CI security, pandas transformations and React UI work. Approach: "No black boxes": rebuilds core components from scratch (vector store, recommender, crypto wallet) before relying on libraries. ## Education - B.Tech in Artificial Intelligence & Data Science — CTITR (CT Group of Institutions), Jalandhar, began 2026 (in progress) - 18.06 Linear Algebra — MIT OpenCourseWare (self-directed) (completed) ## Awards - Second place, CT BuildFest 2.0 cybersecurity hackathon (CT Group of Institutions, Jalandhar, 2026-10-31): Wrote the code for Veracity, a live scam-call and AI-voice detector, over 30 hours for the six-member team Coffee to Code. The story: https://yadunandan-singh.pages.dev/blog/first-hackathon-scam-call-detector/ ## Technical skills - Languages: Python, TypeScript / JavaScript, Rust (learning; used for Prism-RAG's vector store and bitcoin-wallet-rs), SQL - Backend & data: FastAPI, pandas (profiling, transformations, time-series resampling), PostgreSQL, SQLAlchemy & Alembic, background job execution, REST API design, server-side pagination - Frontend: React, Vite, Tailwind CSS, theming with semantic CSS tokens - AI / ML: retrieval-augmented generation (RAG), vector search and cosine similarity, sentence-transformers embeddings, local LLM serving with Ollama and streaming responses, TensorFlow (CNNs), SVD-based recommender systems, linear algebra (completed MIT OCW 18.06) - Systems & tooling: Axum, Tokio and ndarray (Rust), WebAssembly, Docker Compose multi-service setups, Git (rebase, squash, fork workflows), Bitcoin primitives (secp256k1, P2WPKH, Esplora API on signet) - CI/CD & testing: GitHub Actions (including secure workflow design for fork PRs), pytest & pytest-benchmark (CI regression gates), Vitest, Playwright end-to-end tests ## Projects - [Prism-RAG](https://github.com/YADUNANDAN-SINGH/Prism-RAG): Privacy-first local RAG engine with a from-scratch Rust vector store, running entirely on your own machine. Stack: Rust (Axum, Tokio, ndarray), Python (FastAPI, sentence-transformers), React, Ollama, Docker Compose - [Veracity](https://github.com/YADUNANDAN-SINGH/Veracity): Live scam-call and AI-voice detector for ordinary phone calls, running entirely offline on a laptop, with a PayPal payment gate. Stack: Python (FastAPI, faster-whisper, PyTorch Spectra-0 / wav2vec2 XLS-R), Ollama (Llama 3.1 8B), PayPal Orders & Payments APIs, React, SQLite, scrcpy, BlackHole - [GlassBox](https://github.com/YADUNANDAN-SINGH/GlassBox-Rust-SVD-recommendation-system): Zero-knowledge recommendation engine running client-side in the browser, with SVD compiled to WebAssembly. Stack: Rust, WebAssembly, Leptos, SurrealDB - [bitcoin-wallet-rs](https://github.com/YADUNANDAN-SINGH/bitcoin-wallet-rs): Bitcoin wallet built up from cryptographic primitives rather than a wallet library. Stack: Rust, secp256k1, Esplora API - [Neuro-Symbolic Math Solver](https://github.com/YADUNANDAN-SINGH/Neuro-Symbolic-Solver): Solves handwritten equations by pairing a TensorFlow CNN recogniser with a deterministic symbolic engine, so its answers are computed, not generated. Stack: TensorFlow, FastAPI, React, Docker - [Django SVD Face Auth](https://github.com/YADUNANDAN-SINGH/django-svd-face-auth): Face-recognition login built on Singular Value Decomposition instead of a pretrained face-recognition library. Stack: Django, OpenCV, NumPy, Docker - [SVD-Based YouTube Recommender](https://github.com/YADUNANDAN-SINGH/YouTube-video-recommendation-model-with-SVD): Content-based video recommender using TF-IDF and Truncated SVD. Stack: Flask, scikit-learn, SVD - Rust Actix Quiz Game (private repository): Quiz service with server-side score validation, built on Rust and Actix Web. Stack: Rust, Actix Web, Vanilla JS, Docker - [Geometric Transformation Visualizer](https://github.com/YADUNANDAN-SINGH/Geometric-Transformation-Visualizer-): Interactive tool that visualises 2D matrix transformations in real time. Stack: Python, NumPy, Matplotlib - [SVD Image Compressor](https://github.com/YADUNANDAN-SINGH/Image_Compression_via_Low-Rank_Matrix-_Approximation): Image compression implemented from scratch through low-rank matrix approximation. Stack: Python, NumPy, Flask - [AI Image Recognition Web App](https://github.com/YADUNANDAN-SINGH/AI-Image-Recognition-webapp): CNN image classifier trained on CIFAR-10 and served through a web API. Stack: Flask, TensorFlow, JavaScript - [Delhi NCR Property Price Predictor](https://github.com/YADUNANDAN-SINGH/Delhi-NCR-property-price-predictor): Machine-learning pipeline predicting residential property prices in the Delhi NCR region. Stack: Python, pandas, scikit-learn ## Open-source contributions 22 merged pull requests in the c2siorg organization since June 2026 (21 in DataLoom, 1 in TensorMap), all merged by maintainer @ivantha. Data from GitHub, updated 14 Nov 2026. Repositories: https://github.com/c2siorg/dataloom (Open-source data-transformation platform (FastAPI + React)), https://github.com/c2siorg/tensormap (Open-source platform for building ML models without writing code). Full record with write-ups: https://yadunandan-singh.pages.dev/open-source/ - [DataLoom #563](https://github.com/c2siorg/dataloom/pull/563) — "perf(backend): add pytest-benchmark suite that fails PRs on regressions" (Performance; closes #562), merged 2026-10-28, +229/−0 in 7 files. Added an 11-benchmark `pytest-benchmark` suite on DataLoom's backend data path, plus a pull-request CI workflow that compares against `main` and fails on regressions above 50%. Result (from the PR): Baseline mins on the 100k-row CSV range from 1.32 ms (`test_infer_datetime_columns[order_id]`) to 128 ms (`test_read_csv_uncached`, with `test_assess_quality` at 65.6 ms). Reverting #517's datetime pre-gate failed the check as expected (+3,226%, +3,305% and +127%), while A/A runs on unchanged code passed (worst +7.2% locally with warmup, +16.8% across three runs on a 2-vCPU Linux VM). - [DataLoom #540](https://github.com/c2siorg/dataloom/pull/540) — "feat: run pipeline Runs and reverts as background jobs with progress and cancel" (Feature; part of #537), merged 2026-10-27, +3835/−257 in 46 files. Moved pipeline Runs and checkpoint reverts into background jobs backed by a `jobs` table and an in-process executor, with `202` submission, live step progress, cooperative cancel and held workspace reads (phase 1 of #537). Result (from the PR): Live smoke test on a 100 MB (1.1M-row) CSV with a 180-step pipeline (Apple M5, PostgreSQL 16): `main` timed out on the client at 30.0 s and committed at 36.9 s (retry → 400); the job endpoint returned `202` in 14 ms, reported 38 progress updates and succeeded at 39.6 s (revert: `202` in 6 ms). Cancelling at step 22 stopped in 0.53 s with SHA-256 and change log unchanged; SIGTERM exited cleanly in 0.3 s. - [DataLoom #554](https://github.com/c2siorg/dataloom/pull/554) — "perf(frontend): virtualize columns in Table for wide datasets" (Performance; closes #551), merged 2026-10-13, +696/−7 in 4 files. Above 50 data columns, the Table renders only the columns inside the horizontal viewport, so a wide CSV no longer puts tens of thousands of cells in the DOM. - [DataLoom #536](https://github.com/c2siorg/dataloom/pull/536) — "feat: enforce upload limit while streaming and sample-gate profiling" (Feature; part of #533), merged 2026-10-13, +1364/−70 in 30 files. Enforced the upload size limit while the request body streams in, and added sampled pre-gates that let profiling skip work a sample proves unnecessary (parts 1 and 3 of #533). Result (from the PR): On the PR's synthetic CSVs (2 vCPU / 7 GB Linux, Python 3.12.3, pandas 3.0.1): `assess_quality` went from 15.9 s to 1.7 s at 10 MB and from 155.1 s to 14.5 s at 100 MB, with byte-identical JSON output and unchanged peak memory. - [DataLoom #526](https://github.com/c2siorg/dataloom/pull/526) — "feat: snapshot-based undo and redo instead of replaying the change log" (Feature; closes #525), merged 2026-10-02, +2026/−171 in 29 files. Replaced replay-based undo with byte-exact snapshots, added Redo, and fixed the three undo bugs described in #525. Result (from the PR): Undoing the latest step on a 5 MB, 100k-row CSV took 370 ms to 960 ms on `main` (1 to 50 logged steps) and 33 ms to 43 ms with snapshots; redo takes about 37 ms. - [DataLoom #488](https://github.com/c2siorg/dataloom/pull/488) — "feat: add a standardizeDates transformation for columns with mixed date formats" (Feature; closes #487), merged 2026-09-29, +668/−2 in 11 files. Added a `standardizeDates` transformation that rewrites a mixed-format date column into one format, and wired it to the Quality panel's date-format finding, which previously had no fix button. - [DataLoom #521](https://github.com/c2siorg/dataloom/pull/521) — "perf(backend): cache parsed DataFrames keyed on path, mtime and size" (Performance; closes #520), merged 2026-09-27, +546/−4 in 9 files. Added a process-local, size-bounded LRU cache in front of `read_table_safe`, so repeat reads of an unchanged dataset file skip the parse and the datetime inference. Result (from the PR): On a 200,000-row × 5-column CSV (8.3 MB), `read_table_safe` took 282.7 ms cold and 0.091 ms on a cache hit (mean of 20). - [DataLoom #517](https://github.com/c2siorg/dataloom/pull/517) — "perf(backend): sampled pre-gate for datetime inference" (Performance; closes #515), merged 2026-09-23, +191/−3 in 2 files. `_infer_datetime_columns` ran a full regex-and-parse pass over every value of every object column on every dataset read, even for plainly non-date columns. Added a seeded 1,000-value random sample that pre-screens each column before the full inference runs, so only plausible date columns pay for it; avoids full-column scans on non-date columns without changing conversion behaviour. Result (from the PR): Best of 3 on Apple M5, Python 3.13, pandas 3.0.1: a 1M-row free-text or order-ID column went from 0.481 s to 0.007 s (69×), a 100k-row text column from 0.052 s to 0.002 s (26×), and a 1M-row column of real dates was unaffected (0.683 s vs 0.701 s, within noise). - [DataLoom #507](https://github.com/c2siorg/dataloom/pull/507) — "[Fix] Paginate every write-path endpoint instead of returning the full dataset" (Fix; closes #506), merged 2026-09-09, +828/−116 in 26 files. Found that every write-path endpoint — upload, transform-apply, save, undo, revert, file-append and pipeline-apply — returned the full dataset instead of the requested page, because the pagination logic only ran in preview mode. Lifted it into a shared `paginate_dataframe()` helper applied uniformly across the endpoints, with matching frontend changes. Result (from the PR): On a 121,500-row project, save, undo, revert, upload, file-append and pipeline-apply each returned about 9 MB, up to 2,200× more data than the client asked for; they now return only the requested page. - [DataLoom #465](https://github.com/c2siorg/dataloom/pull/465) — "feat: add profiling options dropdown to workspace tab bar '+' button" (Feature; closes #464), merged 2026-08-08, +451/−37 in 8 files. Made the workspace tab bar's '+' button open a dropdown of the profiling options, so the controls are reachable from the tab bar rather than only the ribbon menu. - [DataLoom #472](https://github.com/c2siorg/dataloom/pull/472) — "feat: add edit button () and modal to dataset cards on Homescreen" (Feature; closes #471), merged 2026-08-03, +573/−31 in 6 files. Gave the Homescreen dataset cards an overflow (kebab) menu holding Edit and Delete, plus an Edit Project modal, reducing the number of controls visible on each card. He proposed the change in issue #471 and revised the design after maintainer feedback. - [DataLoom #470](https://github.com/c2siorg/dataloom/pull/470) — "feat: download rendered charts and the correlation matrix as PNG" (Feature; closes #469), merged 2026-08-03, +788/−17 in 8 files. Added PNG export for rendered charts and for the correlation matrix, so analysis produced in the app can be taken out of it. - [DataLoom #467](https://github.com/c2siorg/dataloom/pull/467) — "feat(auth): add live password strength meter to password creation forms" (Feature; addresses #466), merged 2026-08-03, +86/−2 in 6 files. Added a reusable `PasswordStrengthMeter` component giving live feedback as a password is typed, wired into the sign-up, reset-password and change-password forms. - [DataLoom #458](https://github.com/c2siorg/dataloom/pull/458) — "feat: Add instant hover tooltips to MenuNavbar buttons and tabs" (Feature), merged 2026-07-25, +238/−21 in 5 files. Replaced the browser's delayed native tooltips on the MenuNavbar buttons and tabs with instant hover tooltips, and wrote explanations of what each control does. - [DataLoom #460](https://github.com/c2siorg/dataloom/pull/460) — "feat: add quick theme toggle button to top navbar" (Feature; closes #459), merged 2026-07-24, +15/−1 in 1 file. Added a quick light/dark theme toggle to the top navbar, replacing a multi-step trip through the settings panel. - [DataLoom #453](https://github.com/c2siorg/dataloom/pull/453) — "fix: implement proper dark mode styling for Quality tab and assessment panel" (Fix; closes #452), merged 2026-07-23, +130/−36 in 4 files. Fixed dark mode on the Quality tab and Quality Assessment panel by replacing hardcoded Tailwind light classes with semantic CSS theme tokens, so the components follow the active theme. - [DataLoom #455](https://github.com/c2siorg/dataloom/pull/455) — "fix: run lint on pull_request and comment via workflow_run" (CI; closes #454), merged 2026-07-23, +201/−106 in 2 files. A CI security fix. Split the lint workflow along the trust boundary: linting runs on `pull_request` with read-only permissions, while a separate `workflow_run` job holds `pull-requests: write` to post comments. This closed a "pwn request" privilege-escalation risk from fork pull requests instead of disabling the checkout guard. - [DataLoom #408](https://github.com/c2siorg/dataloom/pull/408) — "feat: add hover tooltips to toolbar icons" (Feature; closes #406), merged 2026-07-05, +41/−17 in 6 files. Added hover tooltips to the toolbar icons so each tool explains itself instead of having to be clicked to be understood. - [DataLoom #410](https://github.com/c2siorg/dataloom/pull/410) — "feat: apply-preview workflow for all transformations" (Feature; follows up #405), merged 2026-07-05, +444/−499 in 20 files. A large cross-cutting refactor extending the preview-before-apply workflow to all 12 transformation forms, so no transformation can change the dataset without explicit confirmation. - [DataLoom #383](https://github.com/c2siorg/dataloom/pull/383) — "fix: add preview-before-persist flow for row-reducing transforms" (Fix; addresses #374), merged 2026-06-27, +484/−330 in 19 files. Introduced a preview-before-persist flow for row-reducing transformations, so users see the result before their data is changed rather than after. - [TensorMap #367](https://github.com/c2siorg/tensormap/pull/367) — "fix: resolve JSON serialization error for NaN values in dataset preview" (Fix; closes #366), merged 2026-06-21, +3/−1 in 1 file. Fixed NaN values breaking JSON serialization, which had made the dataset preview fail on any CSV containing empty cells. - [DataLoom #348](https://github.com/c2siorg/dataloom/pull/348) — "fix: resolve strict case-sensitivity in string filtering" (Fix; closes #327), merged 2026-06-14, +26/−8 in 2 files. Made string filtering case-insensitive, so a filter for "cash" no longer silently missed rows containing "Cash" or "CASH". ### Open issues he opened - [DataLoom #601](https://github.com/c2siorg/dataloom/issues/601) — "[RFC] Deterministic operation suggestions, low-memory targets, and optional local AI assistant", opened 2026-10-27. - [DataLoom #537](https://github.com/c2siorg/dataloom/issues/537) — "[Feature] Run slow operations as background jobs with progress reporting", opened 2026-09-30. - [DataLoom #533](https://github.com/c2siorg/dataloom/issues/533) — "[Feature] Lift the 10 MB upload cap safely with streamed upload and sample-based profiling", opened 2026-09-29. - [DataLoom #524](https://github.com/c2siorg/dataloom/issues/524) — "[Feature] Use Parquet for the internal working copy so dtypes persist between requests", opened 2026-09-27. ### Code review - [DataLoom #457](https://github.com/c2siorg/dataloom/pull/457) — "feat: add paginated preview support for transformations" by @SHIVAM-KUMAR-59. Raised two findings on another contributor's paginated-preview PR: an in-flight race in `fetchPreviewPage`, which the author fixed in the PR, and a full re-transform on every page change, which the author agreed with and recorded as a follow-up. - [DataLoom #412](https://github.com/c2siorg/dataloom/pull/412) — "fix(security): bump pyjwt and python-multipart to patched releases" by @anxkhn. Pointed out that the new regression test imports `packaging` without declaring it as a dev dependency. ## Writing Yadunandan Singh has written 11 articles, all on his blog at https://yadunandan-singh.pages.dev/blog/ (first published on Medium, rewritten for the site). Each entry links to the article, gives its publication date and a summary, and links a plain-markdown copy of the full text. Every article in full, in one file: https://yadunandan-singh.pages.dev/llms-full.txt - [Three Signals, One Verdict, and a Payment That Waits](https://yadunandan-singh.pages.dev/blog/veracity-scam-call-detector-architecture/) (published 2026-11-08; topics: System Design, Cybersecurity, Deepfake Detection; full text as markdown: https://yadunandan-singh.pages.dev/blog/veracity-scam-call-detector-architecture.md): In Part 2 of his first-hackathon series, Yadunandan Singh explains how Veracity, the scam-call detector that won second place at CT BuildFest 2.0, works. An Android phone on a real call is connected to a laptop by USB; scrcpy and BlackHole bring the caller's voice into a FastAPI backend that checks three signals at once: the caller's number (libphonenumber and a transparent rule score), the voice (an AI-voice model, now Spectra-0, scoring a 4-second window every second) and the words (Whisper, scam rules in English, Hinglish and Hindi, and a local Llama 3.1 8B that may only cite quotes found in the transcript). A weighted fusion lets any one strong signal raise the risk on its own, and every call ends in a JSON evidence report. He has since taken Veracity into the PayPal AI Hackathon, where a payment gate holds PayPal payments authorized during a risky call until the caller is verified. Lessons from the build are saved for Part 3. - [30 Hours, One Laptop, and a Scam-Call Detector](https://yadunandan-singh.pages.dev/blog/first-hackathon-scam-call-detector/) (published 2026-11-01; topics: Hackathon, Cybersecurity, Deepfake Detection; full text as markdown: https://yadunandan-singh.pages.dev/blog/first-hackathon-scam-call-detector.md): Yadunandan Singh recounts his first hackathon, CT BuildFest 2.0 in Jalandhar, where Veracity, which he coded over 30 hours for his six-member team Coffee to Code, won second place. During a live call, Veracity checks the caller's number, how likely the voice is AI-generated (wav2vec2) and the words (Whisper plus Llama 3.1 run locally) for scam patterns in English, Hindi and Hinglish, warns the user mid-call and builds an evidence report for the 1930 helpline. Part 1 of 2: the build, the mentors' evaluation and lessons on teamwork. - [I Used AI to Predict My University Exam Paper, So I Turned It Into an Open-Source Claude Skill](https://yadunandan-singh.pages.dev/blog/exam-paper-predictor/) (published 2026-10-26; topics: Claude, Open Source, Learning; full text as markdown: https://yadunandan-singh.pages.dev/blog/exam-paper-predictor.md): Yadunandan Singh describes how a last-minute hostel experiment with previous year question papers (PYQs) and Claude produced a mock exam that overlapped the real paper by roughly 90%. He packaged the workflow into exam-paper-predictor, a free, open-source Claude skill for university, board, entrance and professional exams in any country or language. The skill collects 5 to 20 years of past papers, maps section and topic weightage, backtests its own predictions on held-out past years before generating a mock paper, exports ready-to-use PDFs (mock paper, solutions and important topics), and scores its prediction against the real paper afterwards. - [How to Find Your First Open-Source Project in One Evening](https://yadunandan-singh.pages.dev/blog/find-your-first-open-source-project/) (published 2026-07-24; topics: Open Source, GitHub, Career; full text as markdown: https://yadunandan-singh.pages.dev/blog/find-your-first-open-source-project.md): Yadunandan Singh explains the method he used to go from never having opened a pull request to eight merged pull requests in the c2siorg organisation (DataLoom and TensorMap) within forty days. Answer three questions on paper (your strongest language, your domain and your realistic weekly hours), turn them into one targeted AI search prompt, then spend 90 seconds vetting each suggested repository. The second half is an honest, step-by-step account of a first pull request, from local setup to review and merge. - [ChatGPT Failed My Sister’s Live Class, So I Built a Neuro-Symbolic Math Solver](https://yadunandan-singh.pages.dev/blog/neuro-symbolic-math-solver/) (published 2026-05-30; topics: Machine Learning, Computer Vision, Neuro-Symbolic AI; full text as markdown: https://yadunandan-singh.pages.dev/blog/neuro-symbolic-math-solver.md): After watching ChatGPT answer a simple numerical with an essay during his sister's live physics class, Yadunandan Singh built a neuro-symbolic math solver. A React canvas sends a handwritten equation to a FastAPI backend, which normalises the image's polarity, segments each symbol with OpenCV, classifies it with a CNN trained from scratch on MNIST plus 24,000 synthetic operator images, and evaluates the expression deterministically, so the answer is exact rather than generated. - [Stop Vibe Coding: How Elite Developers Actually Use AI](https://yadunandan-singh.pages.dev/blog/stop-vibe-coding/) (published 2026-04-07; topics: AI-Assisted Coding, Software Engineering, Research; full text as markdown: https://yadunandan-singh.pages.dev/blog/stop-vibe-coding.md): Yadunandan Singh reviews what research says about AI-assisted programming: a December 2025 study found that experienced developers keep tight control of AI agents rather than "vibe coding", and METR's randomised trial found developers who felt 20% faster were measured 19% slower. He sets out a seven-step workflow drawn from that research and Addy Osmani's process: spec first, small steps, full context, immediate tests, line-by-line review, a second model's opinion, and regular practice without AI. - [How I Built a Face Authentication App in Django: A Complete ML Learning Journey](https://yadunandan-singh.pages.dev/blog/django-face-authentication-app/) (published 2025-12-22; topics: Machine Learning, Django, Learning; full text as markdown: https://yadunandan-singh.pages.dev/blog/django-face-authentication-app.md): Yadunandan Singh describes building a Django web app that users log in to with their face, using the eigenfaces method: greyscale 100 × 100 face images are flattened, centred on the mean face and decomposed with SVD in NumPy, and logins are matched by Euclidean distance with a rejection threshold. Because one photo per user wasn't enough to train on, OpenCV generates eight synthetic variations of each sign-up photo. The post also sets out his method for learning a new framework through a project without copying AI-generated code. - [Should You Be Scared of Agentic AI? Here’s the Reality](https://yadunandan-singh.pages.dev/blog/should-you-be-scared-of-agentic-ai/) (published 2025-12-05; topics: Agentic AI, AI-Assisted Coding, Career; full text as markdown: https://yadunandan-singh.pages.dev/blog/should-you-be-scared-of-agentic-ai.md): Yadunandan Singh explains what agentic AI is (systems that plan, act across tools and check their own results) and reports on testing Google Antigravity, launched with Gemini 3 in November 2025, by generating a portfolio site with React, Django and OTP authentication. His conclusion: agents are excellent for prototypes and internal tools but weak for long-lived production code, beginners should not use them to write their main code, and AI rewards developers with strong fundamentals rather than replacing them. - [Don’t Be a Dumb Computer: SVD Explained With a YouTube Recommender](https://yadunandan-singh.pages.dev/blog/svd-explained-youtube-recommender/) (published 2025-11-17; topics: Linear Algebra, Machine Learning, Recommender Systems; full text as markdown: https://yadunandan-singh.pages.dev/blog/svd-explained-youtube-recommender.md): Yadunandan Singh explains Singular Value Decomposition by working a small example by hand: a 3 × 4 matrix of liked and disliked videos decomposes into concept strengths of 1.41, 0.92 and 0.20, and truncating to k = 2 keeps "STEM" and "entertainment" while discarding noise. He then shows how his YouTube recommender uses TF-IDF and scikit-learn's TruncatedSVD to place videos on that concept map, builds a taste profile as the average liked vector minus the average disliked one, and ranks candidates by cosine similarity. - [I Stopped Solving Problems and Built a Tool Instead: How a Visualizer Taught Me Real Linear Algebra](https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer/) (published 2025-10-14; topics: Linear Algebra, Mathematics, Python; full text as markdown: https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer.md): Yadunandan Singh built an interactive visualiser that shows what a 2 × 2 matrix does to the unit square, and uses it to explain linear algebra through hand-worked examples. A shape is stored as a 2 × 5 matrix of vertices, so one multiplication transforms every point; a matrix's columns show where the basis vectors land; the determinant is the factor by which area scales, negative for reflections and zero when space collapses onto a line; and eigenvectors are the directions that only stretch. - [How to Build Your Own Image Recognition Model as Your First AI Project](https://yadunandan-singh.pages.dev/blog/first-image-recognition-model/) (published 2025-09-24; topics: Machine Learning, Computer Vision, Beginners; full text as markdown: https://yadunandan-singh.pages.dev/blog/first-image-recognition-model.md): Yadunandan Singh documents his first hands-on AI project: a convolutional neural network trained on CIFAR-10 with TensorFlow and Keras and served through a Flask web app. The guide covers how images become 32 × 32 × 3 tensors, normalisation, data augmentation, three Conv2D and pooling blocks, dropout, and the compile and fit settings, plus a 1,563-epoch, eight-hour experiment in which strong augmentation and dropout kept validation accuracy improving instead of overfitting. ## Pages - [Full profile (plain HTML)](https://yadunandan-singh.pages.dev/profile/): everything below in one static page. - [about.md](https://yadunandan-singh.pages.dev/about.md): this profile as plain markdown. - [Portfolio home](https://yadunandan-singh.pages.dev/): projects, writing and open-source history. - [Experience](https://yadunandan-singh.pages.dev/about/): open-source record and skills. - [Projects](https://yadunandan-singh.pages.dev/library/): project list with repository links. - [Blog](https://yadunandan-singh.pages.dev/blog/): long-form articles, each with its own page. - [llms-full.txt](https://yadunandan-singh.pages.dev/llms-full.txt): this file plus the full text of every article. - [Blog RSS feed](https://yadunandan-singh.pages.dev/blog/rss.xml): every article with its summary and full text. - [Photographs](https://yadunandan-singh.pages.dev/photos/): official photographs. --- # Articles by Yadunandan Singh, full text ## Three Signals, One Verdict, and a Payment That Waits - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2026-11-08 · updated 2026-11-08 - URL: https://yadunandan-singh.pages.dev/blog/veracity-scam-call-detector-architecture/ - Topics: System Design, Cybersecurity, Deepfake Detection - First published on Medium: https://medium.com/@yadunandan-ai-dev Summary: In Part 2 of his first-hackathon series, Yadunandan Singh explains how Veracity, the scam-call detector that won second place at CT BuildFest 2.0, works. An Android phone on a real call is connected to a laptop by USB; scrcpy and BlackHole bring the caller's voice into a FastAPI backend that checks three signals at once: the caller's number (libphonenumber and a transparent rule score), the voice (an AI-voice model, now Spectra-0, scoring a 4-second window every second) and the words (Whisper, scam rules in English, Hinglish and Hindi, and a local Llama 3.1 8B that may only cite quotes found in the transcript). A weighted fusion lets any one strong signal raise the risk on its own, and every call ends in a JSON evidence report. He has since taken Veracity into the PayPal AI Hackathon, where a payment gate holds PayPal payments authorized during a risky call until the caller is verified. Lessons from the build are saved for Part 3. Key takeaways: - Veracity checks three signals during a live call: the caller's number, whether the voice is AI-generated, and whether the words follow a scam script. - Getting call audio was the hardest part: Android blocks call recording, so scrcpy captures the caller's side over USB and BlackHole feeds it to Python. - A weighted average alone hides a real person reading a scam script, so any single strong signal raises the risk score on its own. - The local LLM can point at evidence but can't invent it: its flags are kept only if the quote really appears in the transcript. - For the PayPal AI Hackathon, payments are authorized but held until the call checks out, then captured or voided. **New here? Start with Part 1: [30 Hours, One Laptop, and a Scam-Call Detector](https://yadunandan-singh.pages.dev/blog/first-hackathon-scam-call-detector).** It's the story of my first hackathon, CT BuildFest 2.0, where my team won second place with Veracity. Part 1 was about the 30 hours: the team, the long night, the evaluation and the trophy. It barely touched how Veracity actually works. This part is the build itself: why it exists, how it fits together, and the decisions behind each piece. At the end of Part 1, I promised you lessons and mistakes. They're still coming, in Part 3. Once I started writing them down, I realised most of them only make sense after you've seen what I built. So first, the machine. ### Why Veracity exists A cloned voice is cheap to make. [McAfee's researchers](https://www.mcafee.com/blogs/privacy-identity-protection/artificial-imposters-cybercriminals-turn-to-ai-voice-cloning-for-a-new-breed-of-scam/) found that three seconds of someone's audio was enough for a clone with an 85% voice match. In their survey of 7,000 people, 70% weren't confident they could tell a clone from the real voice. The losses are now big enough to get their own line in official reports. The FBI's 2025 Internet Crime Report [counted 22,364 complaints that involved AI, with about $893 million lost](https://www.secureworld.io/industry-news/ai-enabled-fraud-topped-893m-fbi). That includes "distress scams": a cloned voice of a family member calls in a crisis and asks for money. When I looked at how people are protected from these calls, I kept finding the same gap. Protection works before the call, as a "spam likely" label on a number. Or it works after the call, as a complaint once the money is gone. The scam happens in between: a few panicked minutes on the phone while you decide whether to send the money. Veracity is built for those few minutes. ### The core idea: three signals, one verdict A scam call usually gives itself away in three places: 1. **The number.** Is it valid? Is it international? Has anyone reported it? 2. **The voice.** Is it a real person, or generated by AI? 3. **The words.** Do they follow a script, like police, a lawyer, "don't tell anyone" or "send it right now"? No single signal is reliable on its own. A real person can read a scam script in their own voice. A scammer can call from an ordinary-looking number. And your real cousin can ask you for money. So Veracity listens to all three at once, while the call is still going on, and combines them into one risk score with reasons you can read. Two rules shaped every decision after that: - **It runs on the laptop.** The call is analysed in memory on your own machine and isn't uploaded anywhere. That's a privacy decision, and also a hackathon one: a demo that depends on someone else's server can die on stage. - **Every verdict comes with evidence.** Not "this feels like a scam", but the caller's exact words, the second they said them, and how each score was built. People ignore a warning that can't explain itself. ### The architecture at a glance Here is the whole path, from the phone in your hand to the verdict on the screen: ```text Android phone, on a real call │ USB cable: adb + scrcpy pull the caller's voice ▼ Mac sound output → BlackHole (a virtual microphone) │ 0.1 s blocks, resampled to mono 16 kHz ▼ FastAPI backend, on the laptop │ ├── Number libphonenumber + a rule score ├── Voice AI-voice model, 4 s window every 1 s ├── Words Whisper → scam rules → local LLM │ ▼ Risk fusion: one score, with reasons │ WebSocket events ▼ React dashboard: live alerts, then an evidence report │ added for the PayPal AI Hackathon ▼ Payment gate → PayPal: hold, release or void ``` There are two programs. The **backend** (Python, FastAPI) does the real work: it captures the audio, runs the models and keeps the scores. The **dashboard** (React, Vite) only draws what the backend sends it, over a WebSocket, as it happens. It walks you through four screens: check the setup, check the number, the live call, and the report. ### Step zero: getting the call audio at all The hardest problem in Veracity had nothing to do with AI. It was getting the sound of a phone call into Python. Android doesn't let ordinary apps record calls, so I didn't write an app. Veracity uses [scrcpy](https://github.com/Genymobile/scrcpy), an open-source tool that mirrors an Android phone to a computer over USB. scrcpy runs its capture code on the phone through adb, and since version 3.2 it can capture the caller's side of a call (its `voice-call-downlink` source). scrcpy plays that audio on the Mac. To get it into Python, the Mac's sound output is set to a Multi-Output Device: your speakers plus [BlackHole](https://github.com/ExistentialAudio/BlackHole), a virtual audio driver. Python then reads BlackHole as if it were a microphone, in 0.1-second blocks, and turns them into mono 16 kHz audio, which is what the speech models expect. The backend also watches the phone itself. It reads the call state over adb (`dumpsys telephony.registry`), so the dashboard notices when the phone rings and fills in the caller's number when Android shares it. No app has to be installed on the phone. Is a USB cable a real product? No. A shipped version would need the phone maker or the network on board. But the cable proves the whole pipeline end to end, on a real call, today. ### Signal 1: the number The number check is the simplest layer, and it's boring on purpose. It uses [libphonenumber](https://github.com/daviddrysdale/python-phonenumbers), the Python version of Google's phone-number library, which works fully offline. From the number alone it works out whether it's valid, its type (mobile, landline, toll-free), the country, the region and the carrier it was first issued to. Then a transparent rule score adds points, each with a reason you can read: | Signal | Points | | --- | ---: | | Not a valid number | +40 | | International number | +25 | | Reported by the community (more reports, more points) | up to +30 | | A report in the last 7 days | +10 | | India's 140 telemarketing series | +5 | | India's 1600 series, used only by regulated banks and agencies | −20 | I'd planned a machine-learning model on the digits, and the report still has an empty slot for it. But digits alone carry very little signal, and a rule you can explain beats a model you can't. There's also one thing this layer can never do: unmask a spoofed number. It checks the caller ID the network shows you, nothing more. ### Signal 2: the voice Every second, Veracity takes the last 4 seconds of the caller's audio and asks an AI-voice model one question: how likely is it that this speech was generated? It skips silence, and it waits until it has 3 seconds of speech. A shorter clip has to be repeated to fill the model's 4-second window, and that repetition sounds synthetic to the model. One window on its own is noisy, so the scores are smoothed with a moving average. The verdict only turns *Likely AI* after **three windows in a row** score 0.75 or more. Once a call has been *Likely AI*, it stays flagged, even if a real person speaks afterwards. At BuildFest the model was a wav2vec2 deepfake classifier. While preparing for the PayPal hackathon, I tested it on speech from newer generators like Google Veo and ElevenLabs, and it called most of them human. So I replaced it with [Spectra-0](https://huggingface.co/lab260/spectra_0), an anti-spoofing network built on XLS-R. I tested it on 40 minutes of AI speech and 81 minutes of real people, all pushed through simulated phone lines. It flagged **85%** of the AI calls (the old model caught 39%) and **1.1%** of the real people. That testing also exposed a bug in my audio code. I was resampling every 0.1-second block on its own, which put a tiny click at each block edge, and those clicks were enough to throw the model off. The audio is now resampled as one continuous stream. And the honest limit: an AI voice played from a speaker across a room is mostly missed (19% caught). The room's echo hides what the model listens for. ### Signal 3: the words The transcript comes from Whisper large-v3-turbo, through [faster-whisper](https://github.com/SYSTRAN/faster-whisper), running on the laptop's CPU. The audio goes to it in chunks of 6 to 12 seconds, cut at the next pause where there is one, so words don't get split between two chunks. Hindi on phone audio is rough for Whisper, so I tuned it. The language is set instead of detected, because auto-detection picked Romanian and German on real calls. The temperature stays near zero, so unclear audio doesn't turn into word salad. And repeated three-word phrases are blocked, so it can't get stuck in a loop. Then two layers read the text. **Layer 1: scam rules.** These are plain regular expressions in 12 categories, in English, Hinglish and Hindi: OTP and PIN requests, police and officials, arrest threats, payment pressure, remote-access apps, secrecy, KYC and blocked accounts, parcels, family emergencies, prizes, urgency, and identity claims like "it's me, your grandson" (the 12th, added for the PayPal version). Whisper often misspells Hindi words on phone audio, so before matching, both the text and the patterns are "folded": letters Whisper mixes up become one letter. The evidence shown to you is still cut from the original words. Each category has a severity, and the script score adds them up. Some combinations get a bonus, because together they are the shape of a known scam: police plus payment pressure (the "digital arrest" scam), a family emergency plus payment, or "it's me" plus payment. **Layer 2: a local LLM.** About every 16 seconds, Llama 3.1 8B (through [Ollama](https://ollama.com/)) reads the transcript so far and answers in a fixed JSON schema: is it a scam, what type, and red flags, each with the caller's exact quote. It runs on its own thread, so a slow answer never holds up the transcript. This is the rule I'm proudest of: **a flag from the LLM is kept only if its quote really appears in one line of the transcript.** The LLM can point at evidence. It can't invent it. And if Ollama isn't running, the rules carry on alone. ### Fusion: one strong signal is enough Three scores from 0 to 100 have to become one verdict. The obvious way is a weighted average, and that's where Veracity starts: ```python WEIGHTS = {"number": 0.25, "voice": 0.40, "script": 0.35} VOICE_ALONE = 85 # a voice peak this high is enough on its own SCRIPT_ALONE = 80 # so is a script score this high score = round( WEIGHTS["number"] * (number_score or 0) + WEIGHTS["voice"] * voice_peak + WEIGHTS["script"] * script_score ) if voice_peak >= VOICE_ALONE: score = max(score, voice_peak) if voice_verdict == "LIKELY_AI": score = max(score, voice_peak, HIGH) # HIGH = 70 if script_score >= SCRIPT_ALONE: score = max(score, script_score) ``` But an average alone hides the most common scam of all: a real person reading a script, from an ordinary number. The voice says human and the number looks fine, so the average comes out low even when the words are screaming scam. So any single signal that is strong enough raises the score on its own, and a voice confirmed as *Likely AI* is always high risk. The final score maps to a level: **70 or more is high risk, 40 or more is medium.** Next to it, Veracity shows the top reasons, biggest contribution first, in plain language. ![Veracity's live-call screen during a real test call: the AI-voice likelihood is 16% and marked Likely human, the script score is 92 out of 100 with a strong scam signal, and the transcript highlights "do not tell anyone", "right now", "police" and "lawyer" as red flags.](https://yadunandan-singh.pages.dev/blog/veracity-scam-call-detector-architecture/veracity-live-call-script-score.webp "A real test call. The voice is human, but the words score 92/100, and every red flag is marked where it was said.") ### The report: evidence, not a vibe When the call ends, Veracity builds a JSON evidence report. It holds the call's times and how the audio was captured, the number check with every reason, each voice window it scored, and every red flag with the caller's exact words and the second they said them. On top sit the overall score, its top reasons, and next steps for where you live. In India, that means calling 1930 and filing on cybercrime.gov.in if you lost money, or reporting the number on Chakshu if you didn't. When someone gets scammed, they often don't know what to put in the complaint. The report is that record, ready to attach. Every report also says plainly that it's evidence, not proof: the AI-voice score is a model's estimate, and the transcript can have mistakes. If you turn on *Save call audio*, the report stores the recording's SHA-256 hash, so anyone can later check the file wasn't changed. ### How the code is organised A few structural choices kept the build manageable under hackathon pressure: - **Logic and web code live apart.** In the backend, `routes/` holds only web code, and `feature/` holds the logic with no FastAPI imports. Every feature can be tested without starting a server. - **The live call runs on three threads.** The audio thread publishes sound levels, scores the voice every second and cuts chunks for Whisper. The transcriber thread runs Whisper and the rules. The LLM gets its own thread, so it can be slow without slowing anything else down. - **Everything is an event.** Each result goes out over the WebSocket as a small event: `level`, `voice`, `transcript`, `flag`, `script`, `alert`, `report`. A dashboard that connects late still gets everything that already happened. - **The dashboard has layers too.** `api/` knows the URLs and JSON shapes, `hooks/` holds the loading and error state, `pages/` and `components/` only draw. If the backend renames a field, only `api/` changes. - **No phone? No problem.** With `VERA_FAKE=1`, the backend replays scripted sample calls through the same pipeline, so the dashboard can be built and demoed without a phone plugged in. At BuildFest, Veracity had 13 automated tests. Today it has 134, and they run without a phone, the models or a PayPal account. ### From a warning to the money: the PayPal AI Hackathon After BuildFest, one thing kept bothering me. Veracity warns you during the call, but the money still moves wherever you send it. Phone apps warn you about calls, and payment apps warn you about payments, but nothing connects the two. So I've taken Veracity into the **PayPal AI Hackathon**, and built that connection: **Protected Send**. You approve the payment in PayPal as usual, but the order's intent is `AUTHORIZE`. PayPal reserves the money, and nothing is sent yet. Veracity's payment gate then reads the call's risk at that moment, checking these rows from top to bottom: | When PayPal authorizes, the call… | The money | | --- | --- | | is high risk, has a *Likely AI* voice, or matches a known scam script | **Held as a likely scam.** Released only after you call the person back on the number saved in your phone, and then only after a 15-minute cooling-off | | is still going on | **Held** until it ends, then decided again with the final report | | is medium risk, or the caller says they're family and asks for money | **Held until you call them back.** "They confirmed" releases it; "they didn't ask" cancels it | | is low risk | **Released:** PayPal captures the payment | | (nobody decides within 72 hours) | **Cancelled** automatically | You can't press "they confirmed" while the call is still on, because the caller could be the one telling you to. Under the hood, it's PayPal's Orders and Payments APIs (authorize, then capture or void), with every money-moving request made idempotent and every PayPal response logged on the payment for audit. Most of PayPal's users are outside India, so this version also knows the scams they get: the "Grandma, it's me" call, the fake lawyer asking for bail money, and the US places to report them (the FTC, the FBI's IC3 and the Elder Fraud Hotline). On 6 November we tested it on two real phone calls, in the PayPal sandbox with test money. The same tester made both calls, from the same phone, in the same voice. Only the words changed: | | A fake grandson | The real grandson | | --- | --- | --- | | What he said | A car crash, a police fine, a lawyer, "do not tell anyone" | Short on money for Mom's birthday cake | | Call risk | **92 / 100**, high | **15 / 100**, low | | The money | $3,000 held, then voided after the callback | $50 held during the call, released when it ended | ![A Protected Send card in the PayPal sandbox: $3,000 approved in PayPal, held by Veracity, then cancelled, with the message "Cancelled. The money never left your account."](https://yadunandan-singh.pages.dev/blog/veracity-scam-call-detector-architecture/veracity-protected-send-cancelled.webp "The fake grandson's $3,000: approved in PayPal, held by Veracity, then voided.") That second call matters as much as the first. A tool that blocks your real grandson is a tool you uninstall. Judges can run the whole thing in Docker, either replaying sample calls or uploading their own recording through the real models. I'll share how the hackathon goes once the results are out. ### What it can't do yet I'd rather you hear the limits from me than find them yourself: - **A cloned voice played from a speaker across a room is mostly missed.** The room's echo hides it. - **It needs a laptop and a USB cable,** and call-audio support varies from phone to phone. - **Money has to go through Protected Send.** Veracity can't pause a payment made inside the PayPal app or anywhere else. - **It can't unmask a spoofed number.** It checks the caller ID the network shows. - **The evidence is still small:** a handful of real calls, plus 48 written test calls for the scam rules. ### Coming in Part 3 Part 3 is the one I promised you at the end of Part 1: what building Veracity taught me. It covers what changes when you build a real product instead of a tutorial project, how I actually used AI coding assistants to build it (and why you still have to understand every line you ship), and the mistakes I'd avoid at my next hackathon. Until then, the code is open. [Veracity is on my GitHub](https://github.com/YADUNANDAN-SINGH/Veracity), and there's a [demo video](https://youtu.be/7DbctZZKWP8) if you want to see it catch a call. And if you haven't read it yet, [Part 1](https://yadunandan-singh.pages.dev/blog/first-hackathon-scam-call-detector) is the story of the 30 hours where it all started. --- ## 30 Hours, One Laptop, and a Scam-Call Detector - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2026-11-01 · updated 2026-11-08 - URL: https://yadunandan-singh.pages.dev/blog/first-hackathon-scam-call-detector/ - Topics: Hackathon, Cybersecurity, Deepfake Detection - First published on Medium: https://medium.com/@yadunandan-ai-dev/30-hours-one-laptop-and-a-scam-call-detector-e915bce8dbb9 Summary: Yadunandan Singh recounts his first hackathon, CT BuildFest 2.0 in Jalandhar, where Veracity, which he coded over 30 hours for his six-member team Coffee to Code, won second place. During a live call, Veracity checks the caller's number, how likely the voice is AI-generated (wav2vec2) and the words (Whisper plus Llama 3.1 run locally) for scam patterns in English, Hindi and Hinglish, warns the user mid-call and builds an evidence report for the 1930 helpline. Part 1 of 2: the build, the mentors' evaluation and lessons on teamwork. Key takeaways: - Veracity checks the caller's number, the voice and the words at once, and warns you while you're still on the call. - Everything runs locally, so a call never leaves your own machine. - An evidence report for the 1930 helpline or cybercrime.gov.in makes a scam something a victim can report. - You don't have to write the code to be the reason the code gets written. - Carrying the whole build alone is a weakness; hand work off early. Imagine your phone rings and it's your brother's voice. He sounds panicked, he's in trouble, and he needs money right now. Except it isn't him. It's an AI clone of his voice, made from a few seconds of audio he once posted online. Calls like this are hitting more and more families in India, and in the middle of a call, almost nobody can tell a real voice from a fake one. That was the problem I took to my first-ever hackathon, CT BuildFest 2.0 at my college in Jalandhar. The project was **Veracity**, a tool that listens to a live call and tells you whether the voice on the other end is real. I spent the 30 hours of the event coding, breaking and fixing it. This is the story of those 30 hours, and what they taught me about building real products. ### What Veracity does Veracity sits between you and a suspicious call and runs three checks at the same time: 1. **Who is calling?** It looks at the caller's number and checks it against public data for warning signs. 2. **Is the voice real?** It listens to the call live and shows a percentage: how likely it is that the voice is AI-generated. 3. **What are they saying?** It watches the conversation for classic scam patterns, like panic, secrecy and sudden requests for money, in English, Hindi and Hinglish. The three checks combine into a single risk score. If the call looks like a scam, Veracity warns you while you're still on the line, not after the money is gone. For the technically curious: a wav2vec2 deepfake model scores the voice every second, Whisper transcribes the call, and a set of scam rules plus Llama 3.1, running locally through Ollama, read the transcript. A FastAPI backend streams all of it to a React dashboard. Two decisions mattered most to me. First, everything runs locally on your own machine, so your calls never get uploaded anywhere. Second, Veracity creates an evidence report you can attach to a complaint on the national cybercrime helpline (1930) or cybercrime.gov.in. When someone gets scammed, they often don't know what to put in that complaint. Veracity hands them a ready record. ### Six people, one laptop, 30 hours Our team, Coffee to Code, had six members. Srishti led the team, with Muskan and Ananya from 5th semester, and Shantnu, Shubham and me from 1st semester. I wrote Veracity's code, so for 30 hours that laptop barely left my hands. Written like that, it sounds like a solo story. It wasn't. Somewhere in the middle of the night, the stress caught up with me. Every time it did, my teammates calmed me down and kept talking to me so I could keep going. I honestly don't know if I'd have made it to morning without them. That's the first thing this hackathon taught me: you don't have to write the code to be the reason the code gets written. Looking back, carrying the whole build alone was also a weakness. My team could have done much more if I'd handed work off early, and that's one of the mistakes I'll unpack in Part 3. ![Yadunandan Singh and his five teammates from team Coffee to Code in a selfie at CT BuildFest 2.0 in Jalandhar, one of them holding up the second-place trophy.](https://yadunandan-singh.pages.dev/blog/first-hackathon-scam-call-detector/yadunandan-singh-hackathon-team.webp "Team Coffee to Code with our second-place trophy at CT BuildFest 2.0.") ### The evaluation When the mentors reached our table, I walked them through Veracity myself, from the problem to the live demo. Then the counter-questions started. They went from deep technical details all the way to how an ordinary person would actually use it. At one point they wanted to see more of my work, so we scrolled through my GitHub profile together. The feedback I'll remember most came at the end: the mentors told me Veracity could seriously be expanded into a real business. At my first hackathon, hearing that meant a lot. ### Second place, and what I'm taking home Veracity won second place. As a first-semester student at my first hackathon, I'm proud of that. I won't pretend I'm fully satisfied, though. I came for first, and that hunger is coming with me to the next one. Srishti, our team lead, went up on stage to accept the trophy. When she came back down, she handed it to me and said I deserved it. That one gesture says a lot about the kind of leader she is. But the trophy isn't the main thing I'm taking home. Two lessons are. **I learned what working on an actual product feels like.** Tutorials and side projects give you clean problems. A product gives you a real user, a hard deadline, a demo that has to work in front of people, and questions you can't predict. Every decision suddenly had a cost: what to build, what to cut, what might break on stage. **I got a real sense of how AI is used in actual development.** It's easy to put "AI-powered" on a slide. It's a completely different thing to make AI work inside a live, messy situation like a real phone call, where it has to be fast, right, and useful to someone who isn't technical. Building Veracity under pressure showed me where AI genuinely helps, where it falls short, and why you still have to understand everything you ship. ![A hand holding the CT BuildFest 2.0 cybersecurity hackathon trophy, which reads 2nd Place, Track Excellence Award, CT Group of Institutions.](https://yadunandan-singh.pages.dev/blog/first-hackathon-scam-call-detector/ct-buildfest-second-place-trophy.webp "The CT BuildFest 2.0 second-place trophy.") ### Read Part 2 Part 2 is up: [Three Signals, One Verdict, and a Payment That Waits](https://yadunandan-singh.pages.dev/blog/veracity-scam-call-detector-architecture). It covers why Veracity exists, how it works, and what I built on top of it for the PayPal AI Hackathon. The lessons and mistakes I promised here have moved to Part 3. If you want to see the project, [Veracity is on my GitHub](https://github.com/YADUNANDAN-SINGH/Veracity). And if you're a first-year wondering whether you're ready for a hackathon: you are. Go to one. --- ## I Used AI to Predict My University Exam Paper, So I Turned It Into an Open-Source Claude Skill - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2026-10-26 · updated 2026-10-26 - URL: https://yadunandan-singh.pages.dev/blog/exam-paper-predictor/ - Topics: Claude, Open Source, Learning - First published on Medium: https://medium.com/@yadunandan-ai-dev Summary: Yadunandan Singh describes how a last-minute hostel experiment with previous year question papers (PYQs) and Claude produced a mock exam that overlapped the real paper by roughly 90%. He packaged the workflow into exam-paper-predictor, a free, open-source Claude skill for university, board, entrance and professional exams in any country or language. The skill collects 5 to 20 years of past papers, maps section and topic weightage, backtests its own predictions on held-out past years before generating a mock paper, exports ready-to-use PDFs (mock paper, solutions and important topics), and scores its prediction against the real paper afterwards. Key takeaways: - University exams follow repeatable patterns in topic weightage, question styles and marks distribution across years. - Feeding real past papers (even a phone photo of an old paper) to Claude turns hours of manual PYQ filtering into a focused revision plan and mock paper. - exam-paper-predictor is a free, open-source Claude skill for university, school board, entrance and professional exams in any language. - Before predicting an upcoming paper, the skill backtests itself on held-out past years and grades its prediction against the real paper afterwards. - Use predictions to prioritise high-weightage topics and timed mock practice, not as an excuse to skip the rest of the syllabus. I live in a hostel while pursuing my bachelor's degree in AI and ML. If you've ever lived in a college hostel, you already know how the semester goes. On normal days, almost nobody studies. There are late-night conversations, cricket in the corridor, gym sessions and random trips for chai at midnight. Books stay closed. Then the exam date sheet comes out, and the whole hostel turns into a library overnight. The real problem with last-minute exam preparation is simple: there is never enough time to study everything. The syllabus is huge, the first paper is a few days away, and you're left with one question: > *What is actually important, and what can I safely skip?* Normally, answering that question is a project of its own. You have to comb through the syllabus, ask seniors, dig up previous year question papers (PYQs), and figure out which topics keep repeating. By the time you finish filtering, you've spent the very hours you were trying to save. So I tried something different. I gave the filtering job to AI. ### Step 1: Using AI to find the most important topics I started small. With a few structured prompts, I asked Claude to go through my syllabus and give me: - a list of the most important topics for each unit, - the most expected questions across the syllabus, and - a clean important-questions PDF I could revise from. This alone changed how I prepared before exams. Instead of reading every page of every chapter in order, I had a focused list to start from. I wasn't guessing any more: I had a revision plan. Still, that wasn't the part that surprised me. ### Step 2: The night it matched the real paper One night before an exam, I borrowed an old university question paper from a senior, took a photo of it on my phone, and shared the image with Claude. I asked it to study the pattern (the sections, the marks distribution, the types of questions, and which units carried the most weight) and generate a full mock paper for my upcoming exam. Then the real exam happened. When I compared the mock paper with the actual question paper, the overlap was around **90–95%**. Not word for word, of course, but the same topics, the same question styles and the same weightage. Questions I had practised the night before were sitting right there in the exam hall. I want to be honest here: this was my experience on my papers, and one strong result is not proof that it works every time. Syllabuses change, examiners change, and some papers are deliberately unpredictable. Still, it worked well enough that I couldn't stop thinking about one question: > *Why should only I have this?* Every student in every hostel faces the same exam-night problem. So I decided to package the whole workflow into something anyone could use. ### Introducing exam-paper-predictor: an open-source Claude skill [exam-paper-predictor](https://github.com/YADUNANDAN-SINGH/exam-paper-predictor) is a free, open-source Claude skill that predicts an upcoming exam paper from real past papers. I didn't build it only for my university. It's designed to be universal, and works across: - **University and college exams:** semester, midterm, end-semester, finals and resits - **School board exams** - **Entrance and competitive exams** - **Professional and licensing exams** It works in any country and in any language. #### What the skill actually does Here is the full workflow from input to post-exam grading: ```text 1. Collect past papers 5–20 years of PYQs (found automatically or uploaded, including photos) 2. Map the exam pattern sections, marks, question types, chapter and topic weightage 3. Backtest on past years hold out a past paper, predict it from earlier years, score the match 4. Generate the PDFs mock question paper, full solutions, and high-weightage revision sheet 5. Grade the prediction compare against the real paper once the exam is over ``` **1. Collects past papers.** It searches for 5 to 20 years of previous year question papers on its own, or works with the ones you hand it, including a phone photo of a senior's old paper. **2. Maps the exam pattern.** It breaks down sections, marks distribution, question types, and both topic-wise and chapter-wise weightage across the years. **3. Backtests its own predictions.** This is the part I'm most proud of. Before predicting your upcoming exam, the skill tests itself on past years: *"If I only had the papers before 2023, how well would I have predicted the 2023 paper?"* You see how reliable the pattern is on real held-out papers before you trust it for your own revision. **4. Generates ready-to-use PDFs.** In one run, it produces: - mock question paper PDFs laid out in the real exam format, - separate step-by-step solutions PDFs, and - an important-topics PDF for quick revision. **5. Scores itself after the exam.** Once the real paper is out, you can feed it back to the skill and it will grade how accurate its prediction was. That last step matters: a tool that predicts exams should be willing to be graded too. ### Why past papers work so well with AI There is nothing magical going on here. University exams aren't random. Most question papers are set by a small committee of examiners following a fixed syllabus and a fixed marking scheme. Over five or ten years, clear patterns form: - some topics appear almost every single year, - numerical and derivation questions return with only the numbers or framing changed, and - marks are distributed across units in a fairly consistent way. Humans spot these patterns too: that's what toppers and helpful seniors have always done. The difference is time. It takes a person hours or days to cross-reference ten years of papers carefully. AI can do that analysis in minutes, then turn the distribution into a realistic mock paper with complete solutions. In other words, **AI isn't replacing studying. It's replacing the filtering:** the part that eats your evening before you even open the book. ### How to use it The skill is open source on GitHub: [YADUNANDAN-SINGH/exam-paper-predictor](https://github.com/YADUNANDAN-SINGH/exam-paper-predictor). Add it as a skill in Claude (the repository's README walks through the setup step by step), then ask in plain language: ```prompt Here are the last 5 years of my Data Structures end-semester papers. Predict this year's paper and give me a mock paper, solutions and the important topics. ``` Or, if you don't have the past papers on hand: ```prompt What are the most important topics for my Class 12 physics board exam? ``` The more real past papers you give it, the sharper the weightage map and the mock paper become. ### A word of advice, from one student to another Please don't use this as an excuse to study only five questions. Use it the way I do: 1. **Cover the high-weightage topics first**, so the most likely marks are secure even if you're short on time. 2. **Practise the generated mock paper under real exam timing**, without looking at the solutions PDF. 3. **Go back to the rest of the syllabus** with whatever time remains. Predictions can miss. Understanding the subject never does. That's the same principle I wrote about in [Stop Vibe Coding](https://yadunandan-singh.pages.dev/blog/stop-vibe-coding/): AI is at its best when it sharpens your preparation, not when you hand your thinking over to it. ### What's next My own December end-semester exams are coming up, and I'm going to use them as a clean, public test: generate the prediction before the exam, publish it, and score it honestly against the real paper afterwards. I'll share the results whether they're great or humbling. If this sounds useful for your own exams: - **Star the repository on [GitHub](https://github.com/YADUNANDAN-SINGH/exam-paper-predictor):** it genuinely helps other students find it. - **Try it on your next exam** and let me know how closely it matched. - **Contribute:** open an issue or a pull request if you want to improve the prompts, formatting or board-specific rules for your university. Every hostel has that one night before the exam where the whole corridor panics together. I can't take away the panic, but I hope this gives you back a few hours. If you test it on an upcoming paper, I'd love to hear how it did on [LinkedIn](https://www.linkedin.com/in/yadunandan-singh-ai-dev/). --- ## How to Find Your First Open-Source Project in One Evening - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2026-07-24 · updated 2026-10-19 - URL: https://yadunandan-singh.pages.dev/blog/find-your-first-open-source-project/ - Topics: Open Source, GitHub, Career - First published on Medium: https://medium.com/@yadunandan-ai-dev/how-to-find-your-first-open-source-project-in-one-evening-ab936a19d9dd Summary: Yadunandan Singh explains the method he used to go from never having opened a pull request to eight merged pull requests in the c2siorg organisation (DataLoom and TensorMap) within forty days. Answer three questions on paper (your strongest language, your domain and your realistic weekly hours), turn them into one targeted AI search prompt, then spend 90 seconds vetting each suggested repository. The second half is an honest, step-by-step account of a first pull request, from local setup to review and merge. Key takeaways: - Decide your language, domain and realistic weekly hours on paper before you search GitHub. - Turn those answers into one specific search prompt: at least 50 stars, your stack, actively accepting contributors. - Vet each repository in 90 seconds: a commit in the last 30 days, reviews within a week, a real CONTRIBUTING.md and a welcoming tone in the issues. - Start with small fixes; showing up consistently matters more than skill on day one. - Review delays are normal: never wait idle, and ping politely once after a week. I'm 18. Forty days before I wrote the first version of this post, I had never opened a pull request. By the time I published it, I had eight merged across two projects in the [c2siorg](https://github.com/c2siorg) organisation. None of that came from being unusually talented. It came from a method for the part nobody teaches: choosing *where* to contribute. This post is that method, followed by an honest, step-by-step account of what a first pull request actually feels like. ### The one line that sent me to GitHub at midnight I was half-watching a YouTube video when someone said that open source can completely change how you think about software engineering. I don't remember the channel or the video. I remember the line. I didn't announce anything. No "Day 1 of my open-source journey" post, no telling friends. I just wanted to find out whether it was true. There was another reason, and I'd rather be honest about it because everyone has it: contributing to open source carries status. Every class has one person who works on real projects, and once people find out, it's all they talk about. That's a nice side effect. It isn't a reason. A reason has to survive week three, when you're reading 4,000 lines of someone else's code at 1 a.m. and none of it makes sense. Curiosity survives that. Status doesn't. ### The hard part isn't contributing. It's choosing. Every tutorial says "start contributing to open source." Almost none of them say where. So you search GitHub for "good first issue" and run straight into the real beginner problem: hundreds of millions of repositories, issues that were claimed eight months ago and never closed, projects whose last commit was in 2021, and maintainers who never reply. You bounce between five repositories in one evening and contribute to none of them. That's exactly where I was. Here's what got me out. ### Step 1: Answer three questions on paper Before you open GitHub, get a notebook and a pen and write the answers down. Typing them isn't the same, and you'll need them in Step 2. 1. **Which language am I genuinely good at?** Not learning. Not "did a course in." Good at. If you can't debug in it without looking up the syntax, it doesn't go on the list. 2. **If I had to build one polished project from scratch, what would it be, and in what stack?** This question quietly tells you your domain. If your answer involves dataframes and model training, your repository lives in the ML-tooling world. If it involves routes and authentication, it lives somewhere else entirely. Write the frameworks and libraries down by name. 3. **How many hours a week can I realistically give this, for three months rather than one excited weekend?** Be brutal. Six hours you actually keep beats forty hours that disappear after ten days. Maintainers notice who comes back. Consistency is the real currency of open source, and it's the one thing you can offer on day one that has nothing to do with skill. ### Step 2: Turn your answers into one search prompt Now open an AI assistant (Copilot, ChatGPT and Claude all work the same here) and paste this in, filling the brackets with what you just wrote: ```prompt I'm looking for an open-source organisation to contribute to. Find projects that meet all of these criteria: at least 50 stars, well regarded in [your field], built in [your language], using frameworks or libraries like [your frameworks], and actively accepting new contributors. For each one, tell me the last commit date and how quickly recent pull requests were reviewed. ``` This is almost exactly what I typed: ```prompt I'm looking for an open-source organisation to contribute to. Find projects that meet all of these criteria: at least 50 stars, well regarded in the data/ML space, built in Python or Rust, using frameworks or libraries like pandas, TensorFlow or scikit-learn, and actively accepting new contributors. ``` Without the three answers from Step 1, that prompt is empty. That's why the notebook comes first. ### Step 3: Spend 90 seconds verifying each suggestion Don't trust the list blindly. The model will hand you ten repositories and some of them will be dead. Open each one and check four things: - **Last commit:** within the past 30 days. Any older and you'll wait forever for a review. - **Open pull requests:** are recent ones getting comments within a week? Open two and read the review threads. - **A `CONTRIBUTING.md` that actually exists** and explains how to run the project locally. - **The tone in the issues:** read three issue threads. Within a minute you'll know whether beginners get helped or ignored. That last check matters more than the star count, and almost nobody tells you so. ### Why I picked DataLoom I ended up at [DataLoom](https://github.com/c2siorg/DataLoom), a data-cleaning and transformation tool in the c2siorg organisation. It passed all four checks, it sat exactly in the domain I'd written on paper, and it was small enough that I could eventually hold most of it in my head. For a first project, that matters far more than prestige. My first contribution went in on 15 June 2026. Forty days later I had eight merged pull requests across DataLoom and its sibling project, [TensorMap](https://github.com/c2siorg/tensormap). ![My closed pull requests on the c2siorg/DataLoom repository, including fixes for case-sensitive string filtering, dark-mode styling and the lint workflow, and features such as toolbar tooltips and an apply-preview workflow.](https://yadunandan-singh.pages.dev/blog/find-your-first-open-source-project/pull-requests.webp "My pull requests on DataLoom after the first forty days: small fixes first, bigger features later, and a couple that needed a second attempt.") None of it was glamorous at first. A case-sensitivity bug in string filtering. Hover tooltips on toolbar icons. A dark-mode panel that was still using hard-coded light-theme classes. Then bigger things: a preview-before-apply flow rolled out across all twelve transformation forms, and a CI change that split the lint workflow so untrusted pull-request code no longer runs with write permissions. You don't start at the CI security fix. You start at the tooltip. That's the whole point. ### What your first pull request actually feels like This is the part I wish someone had walked me through, one moment at a time. **You open the repository and feel like the least qualified person alive.** Everyone else's pull requests look surgical. The issue titles are full of acronyms you've never seen. That feeling is not a signal. Everyone on the contributors list felt it, and most of them still do on a new codebase. **You fork it, clone it, and try to run it locally.** This alone can eat your first evening. Mine involved Docker Compose, a Postgres container and a missing environment variable that took an hour to find. When it finally boots, that's your first real win, and it's bigger than it feels. **You find a bug.** A small one, but a real one. You open an issue and write, "Can I work on this?" **Someone replies: "Go ahead, it's yours."** This is the moment everything turns. A stranger with commit rights on a project you admire has just handed you a piece of it, in public, with your username attached. That isn't encouragement. It's permission, and it feels heavier. **You write the fix in forty minutes and spend three hours on the commit message.** Then you press "Create pull request" with a million thoughts in your head, most of them about how it'll look when they reject it. **Then: nothing.** Hours. Sometimes days. This is the stage that breaks people, so read the next section before it happens to you. **Then a comment: "needs revision."** You'll read it as rejection. It isn't. A maintainer spent part of their evening reading code from someone they've never met, and cared enough to tell you how to make it better. It's the most under-appreciated gift in the whole ecosystem. You push a fix in ten minutes and start waiting again. **Then the icon turns purple. Merged.** Code you wrote on your laptop, in your room, while doubting every line, is now running on the machines of people who will never know your name. I won't try to name that feeling. Go and get it. ### The waiting is normal Maintainers are volunteers with jobs, degrees, families and a review queue. A few hours to a few days is completely normal, and silence is almost never about you. Two rules fixed this for me: 1. **Never wait idle.** The moment a pull request goes up, start on the next issue. If you're always a few issues deep, review latency stops being emotionally expensive. 2. **Ping once, politely, after a week.** "Hi, just checking whether this needs anything from my side." That's the whole message. ### Nobody judged me The biggest fear every new contributor carries is looking stupid in public, and it's the permanent, searchable, screenshot-able kind of public. Here's what actually happened. I asked beginner questions and got real answers. I proposed a feature, another contributor pushed back with a better-reasoned design, and I changed direction, without a trace of condescension anywhere in the thread. Before the forty days were up, I reviewed someone else's pull request for the first time and raised two issues with the approach. They fixed one immediately and recorded the other as a follow-up. That isn't luck. It's what a healthy project looks like, and it's exactly what you're screening for when you read those issue threads in Step 3. The person who wrote "go ahead" on my first issue and the maintainer who merged my first pull request have no idea they did anything. They did everything. ### So, has open source changed my life? Honestly, I don't know yet, and I'm not going to pretend otherwise. But here's what I can measure: - I can read a large codebase I didn't write and find my way around it. - I can take a review comment without my ego getting involved. - I've been wrong in public, in writing, in front of better engineers, and nothing bad happened. - I have a public record of real work, which at 18 and without a computer-science degree is worth more than another certificate. That isn't "life-changing" yet. It's a lot more than I had in May. ### Your turn Do Step 1 tonight: three questions, on paper. By the end of the evening you'll have a repository, and not long after, a first pull request. If this is the post that gets you there, I'd genuinely like to hear about it: which repository you picked, and what that first "merged" notification felt like. [Send me an email](mailto:yadunandansingh027@gmail.com) or message me on [LinkedIn](https://www.linkedin.com/in/yadunandan-singh-ai-dev/). --- ## ChatGPT Failed My Sister’s Live Class, So I Built a Neuro-Symbolic Math Solver - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2026-05-30 · updated 2026-10-19 - URL: https://yadunandan-singh.pages.dev/blog/neuro-symbolic-math-solver/ - Topics: Machine Learning, Computer Vision, Neuro-Symbolic AI - First published on Medium: https://medium.com/@yadunandan-ai-dev/chatgpt-failed-my-sisters-live-class-so-i-built-a-neuro-symbolic-ai-math-solver-from-scratch-38a809494b67 Summary: After watching ChatGPT answer a simple numerical with an essay during his sister's live physics class, Yadunandan Singh built a neuro-symbolic math solver. A React canvas sends a handwritten equation to a FastAPI backend, which normalises the image's polarity, segments each symbol with OpenCV, classifies it with a CNN trained from scratch on MNIST plus 24,000 synthetic operator images, and evaluates the expression deterministically, so the answer is exact rather than generated. Key takeaways: - Use a neural network for the fuzzy part (reading handwriting) and deterministic code for the exact part (the arithmetic). - Normalise image polarity by mean brightness so every input becomes white symbols on a black background. - Segment symbols with OpenCV external contours, drop specks under 50 px² and sort the boxes left to right. - A 14-class CNN trained on MNIST plus synthetic operators passed 99% training accuracy in ten epochs. - The MVP handles single-line arithmetic; multi-line problems and calculus are the next step. Somewhere on the internet I once read: *"You can make almost anything, as long as you can turn raw data into numbers."* Most of my projects are some version of that idea, and this one is no different. What makes it worth writing about is where it came from, and why the most important design decision was to keep a large language model out of it. ### The problem: generative AI under pressure I was sitting with my elder sister, an online teacher, while she took a live physics class for twenty students. She was close to the end of the lesson and needed to get through one last numerical before time ran out. When we're in a hurry, our brains sometimes switch into lazy mode. She went blank halfway through the calculation. In a panic she started typing the problem into ChatGPT, then uploaded a photo of it, hoping for a quick answer. It went the wrong way. The chatbot dug too deep: it over-explained the theory, hallucinated along the way, and produced a long, polished essay when all she needed was one hard number. That's when it clicked for me. **Sometimes we don't need a long, polished answer. We need a precise one.** She wasn't trying to learn a new concept; she was confirming steps she already knew. So I built the [Neuro-Symbolic Math Solver](https://github.com/YADUNANDAN-SINGH/Neuro-Symbolic-Solver): a lightweight web app where you draw an equation or upload a photo of one, and get back the exact answer. No essays. No hallucinations. ### How it works, end to end Before the details, here's the whole pipeline in one place: ```text draw or upload → base64 image → FastAPI 1. normalise polarity (white symbols on black, always) 2. segment characters (OpenCV contours, left to right) 3. classify each one (CNN trained from scratch, 14 classes) 4. evaluate exactly ("12+34" → 46) 5. return JSON → React shows the answer ``` The neural network handles the part that is genuinely fuzzy: reading messy handwriting. Plain, deterministic code handles the part that must be exact: the arithmetic. That split is what "neuro-symbolic" means here. ### Phase 1: A frictionless frontend (React and Vite) The goal was to capture an equation with as little friction as possible. I chose React with Vite for speed and had my coding agent (Antigravity) scaffold the interface from this prompt: ```prompt Design a frontend website interacting with the user. Features: the goal is a frictionless user experience. Tech stack: React JS, Google Fonts. Component 1: a drag-and-drop upload zone, plus an HTML5 element allowing users to hand-draw an equation directly on the screen. Component 2: capture the image or canvas data as a Base64-encoded string and send it asynchronously to the backend via a POST request. Keep the application lightweight. ``` If you're wondering why I'm happy to admit an agent wrote my boilerplate: UI scaffolding is exactly the kind of work AI is good at, and the interesting engineering was elsewhere. I wrote about where that line sits in [Stop Vibe Coding](https://yadunandan-singh.pages.dev/blog/stop-vibe-coding/) and in [Should You Be Scared of Agentic AI?](https://yadunandan-singh.pages.dev/blog/should-you-be-scared-of-agentic-ai/) ### Phase 2: The backend and image polarity (FastAPI) This is the part where I don't hand anything to AI. A FastAPI server receives the image and does the heavy lifting. The first problem is subtle. One person uploads a photo of dark ink on white paper; another draws white strokes on a dark digital canvas. The rest of the pipeline needs one consistent format, so `convert_base64_to_matrix` measures the image's mean brightness and picks the threshold accordingly: ```python brightness = cv2.mean(image)[0] if brightness < 127: # Dark background: the strokes are already the bright pixels. _, binary = cv2.threshold(image, 127, 255, cv2.THRESH_BINARY) else: # Light background: invert, so dark ink becomes white foreground. _, binary = cv2.threshold(image, 127, 255, cv2.THRESH_BINARY_INV) ``` Whatever comes in, what goes out is always **white symbols on a black background**, which is exactly what the next step expects. ### Phase 3: Character segmentation (OpenCV) Next, every symbol has to be isolated. `cv2.findContours` finds the connected white regions. I use `RETR_EXTERNAL`, which keeps only outer contours, so the hole inside a "0" or an "8" isn't counted as a separate symbol. Anything under 50 square pixels is treated as noise and dropped. The remaining bounding boxes are sorted by their x-coordinate, so the equation reads left to right: ```python contours, _ = cv2.findContours(binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) boxes = [cv2.boundingRect(c) for c in contours if cv2.contourArea(c) > 50] boxes.sort(key=lambda box: box[0]) # left-to-right reading order ``` Each cropped symbol then gets a 20-pixel black border, so it sits centred like the training data, and is resized to **28 × 28 pixels**. Why 28 × 28? That's where the deep learning comes in. ### Phase 4: The "neuro" part (training a CNN in Colab) I didn't want to call an external API or borrow someone else's pre-trained model, so I trained a convolutional neural network from scratch with TensorFlow and Keras. It needs to recognise 14 classes: the digits 0 to 9 and the operators `+`, `-`, `*` and `/`. Digits are easy, because MNIST provides 60,000 labelled handwritten examples. Operators are not, and instead of hunting for a dataset I generated one. In a Colab notebook, a short script draws each operator with `cv2.line`, randomising stroke thickness and position so the samples look like messy handwriting rather than perfect glyphs: ```python thickness = np.random.randint(1, 4) ox, oy = np.random.randint(-4, 5), np.random.randint(-4, 5) # random offset plus = np.zeros((28, 28), dtype=np.uint8) cv2.line(plus, (14 + ox, 6 + oy), (14 + ox, 22 + oy), 255, thickness) cv2.line(plus, (6 + ox, 14 + oy), (22 + ox, 14 + oy), 255, thickness) ``` Six thousand samples per operator gave me 24,000 synthetic symbols to combine with the 60,000 MNIST digits. The network itself is deliberately small: two convolution and pooling stages, then a dense layer and a 14-way softmax. ```python model = tf.keras.Sequential([ tf.keras.layers.Conv2D(32, (3, 3), activation="relu", input_shape=(28, 28, 1)), tf.keras.layers.MaxPooling2D(2, 2), tf.keras.layers.Conv2D(64, (3, 3), activation="relu"), tf.keras.layers.MaxPooling2D(2, 2), tf.keras.layers.Flatten(), tf.keras.layers.Dense(128, activation="relu"), tf.keras.layers.Dense(14, activation="softmax"), # 0-9 and + - * / ]) ``` After ten epochs in Colab it passed 99% training accuracy, and I exported it as `mvp_math_solver.h5` for the live app. ### Phase 5: Real-time inference (TensorFlow in the backend) Training a model in a notebook and serving it in a web app are different problems. The backend loads the `.h5` model **once**, when the server starts, so no request pays the cost of reading weights from disk. When an equation arrives, OpenCV cuts it into those 28 × 28 boxes, and `model.predict()` classifies each one independently. The predicted class indices map back to characters, and the drawing becomes a plain string such as `"12+34"`. ### Phase 6: The "symbolic" part (exact evaluation) This is where the architecture earns its name. Why not hand that string to an LLM? Because LLMs predict; they don't calculate. Instead, the string is evaluated deterministically. Because the CNN can only ever output its 14 classes, the only strings that can reach the evaluator are made of digits and the four basic operators. That constraint is what makes it safe to pass the expression to Python's built-in `eval()`: there is no path for arbitrary text to get there. The day the vocabulary grows (brackets, variables, functions), that guarantee goes away, and `eval()` has to be replaced with a proper expression parser. The result is exact, repeatable maths every time. That's the appeal of neuro-symbolic AI: **the fuzzy pattern recognition of a neural network, combined with the strict, rule-based logic of mathematics.** ### Phase 7: Putting it together Once the expression is evaluated, FastAPI returns a small JSON payload (the recognised expression and the answer) and the React frontend shows it. No typing out formulas. No waiting for a chatbot to finish "thinking" and writing paragraphs. Draw it, send it, get the answer. ### Limitations and what's next This is an MVP, and I'd rather be clear about where it stops. It handles single-line arithmetic well. Multi-line problems, calculus or integrals are beyond it today, both because the vocabulary is limited to 14 symbols and because the segmentation assumes one line read left to right. I'm building it in public, and extending it to multi-line problems and richer mathematical reasoning is the direction I'm working towards. The code is on [GitHub](https://github.com/YADUNANDAN-SINGH/Neuro-Symbolic-Solver), and a star there genuinely helps me keep going. ### The takeaway That's how a moment of live-class panic turned into a project. Building it reminded me that we don't always need a massive generative model to solve an everyday problem. Sometimes a small, targeted system built from scratch does the job faster, more safely and more reliably, precisely because it can't make things up. If you have thoughts on neuro-symbolic architectures, or ideas for the next version, I'd love to hear them on [LinkedIn](https://www.linkedin.com/in/yadunandan-singh-ai-dev/). --- ## Stop Vibe Coding: How Elite Developers Actually Use AI - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2026-04-07 · updated 2026-10-19 - URL: https://yadunandan-singh.pages.dev/blog/stop-vibe-coding/ - Topics: AI-Assisted Coding, Software Engineering, Research - First published on Medium: https://medium.com/@yadunandan-ai-dev/stop-vibe-coding-how-elite-developers-actually-use-ai-backed-by-real-research-da32f95c0039 Summary: Yadunandan Singh reviews what research says about AI-assisted programming: a December 2025 study found that experienced developers keep tight control of AI agents rather than "vibe coding", and METR's randomised trial found developers who felt 20% faster were measured 19% slower. He sets out a seven-step workflow drawn from that research and Addy Osmani's process: spec first, small steps, full context, immediate tests, line-by-line review, a second model's opinion, and regular practice without AI. Key takeaways: - Experienced developers plan, review every diff and work in small steps; they don't vibe code. - Feeling faster isn't being faster: in METR's trial, developers who believed AI made them 20% faster were 19% slower. - Write a spec first, give the model full context, and break work into small, testable chunks. - Test immediately and review every line; don't ship code you can't explain. - Practise without AI regularly to avoid skill decay. There's a line from a senior engineer with more than fifteen years of experience that I keep coming back to: > "I don't vibe code. I work with AI." That one sentence sums up what a growing body of research keeps finding, and it has real consequences for how you should be using AI coding tools right now. ### What the research actually found In December 2025, a team of researchers published a study with a title that gives the game away: [*Professional Software Developers Don't Vibe, They Control*](https://arxiv.org/abs/2512.14012). They watched 13 experienced developers work with AI agents (tools like Claude Code, Cursor and GitHub Copilot) in live sessions, then surveyed 99 more about how they use them. The developers valued agents as a productivity boost, but none of them handed over control. They planned before implementing. They read the diffs and tested the output. They broke big plans into small, deliberate steps, and they insisted on software quality over raw speed. The paper's own advice to developers is blunt: *do not expect to "vibe."* The same picture shows up at scale. In [Stack Overflow's 2025 Developer Survey](https://survey.stackoverflow.co/2025/ai) (more than 49,000 respondents), most developers said vibe coding is not part of their professional work, and the single most common frustration with AI tools, chosen by 66%, was code that is *"almost right, but not quite."* The best engineers aren't simply moving faster. They're moving more deliberately. ### The illusion of speed This is where it gets uncomfortable. In a randomised controlled trial, [METR](https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/) asked 16 experienced open-source developers to complete 246 real tasks, with AI tools either allowed or not. Before starting, the developers predicted AI would make them **24% faster**. Afterwards, they still believed it had made them **20% faster**. The measurement said they were **19% slower**. The study has caveats worth knowing: it looked at large, mature codebases the developers already knew well, using early-2025 tools. But the gap between perception and reality is the lesson. **The feeling of productivity is not productivity.** AI produces a lot of output quickly, and much of the time it "saves" goes straight back into debugging, rethinking and unpicking what it confidently got wrong. Those mistakes also compound quietly. [CodeRabbit analysed 470 open-source pull requests](https://www.coderabbit.ai/blog/state-of-ai-vs-human-code-generation-report) (320 co-authored by AI, 150 written by people) and found that the AI-assisted ones had: - about **1.7× more issues** overall - **75% more logic and correctness errors** - **1.5–2× more security issues** - **more than 3× the readability problems** CodeRabbit sells AI code review, so read it with that in mind, but it matches what most developers experience: *the code works, until it really doesn't.* ### What experienced developers do differently Experienced engineers don't use AI as a replacement for thinking. They treat it like a fast, overconfident junior developer: genuinely useful, and never unsupervised. They hand it the work where it shines: - boilerplate and scaffolding - test generation - refactoring - exploring unfamiliar APIs And they stay hands-on for the work where mistakes are expensive: - architecture decisions - core business logic - complex debugging - security-sensitive code The difference isn't talent or tooling. It's discipline. ### The seven-step workflow What follows is synthesised from Addy Osmani's [LLM coding workflow](https://addyosmani.com/blog/ai-coding-workflow/), the study above, and the patterns that keep showing up in surveys of professional developers. #### 1. Spec first, code later Before a single line of code, force clarity. Work *with* the AI to pin down requirements, edge cases, data models and architecture. Osmani, borrowing Les Orchard's phrase, calls it a "waterfall in 15 minutes": a short, structured planning phase that makes everything after it smoother. **How to do it:** describe your idea, then ask the AI to question you until every requirement, edge case and constraint is covered. Collect the answers in a `spec.md` file and treat it as the source of truth. #### 2. Break everything into tiny steps One developer in the study told their agent, in so many words, to *"do just step 1."* That's the level of control to aim for. Some participants built plans of more than seventy steps, and still executed them one small chunk at a time. Small scope means fewer hallucinations, more coherent output and an easy rollback when something breaks. - **Instead of:** "Build a full authentication system." - **Try:** "Write a function that hashes passwords with bcrypt. Don't touch anything else." #### 3. Give it all the context AI isn't smart; it's literal. It does exactly what you describe, including every ambiguity you left in. Before a session, give it: - the relevant source files - API documentation - constraints and invariants - anti-patterns to avoid - the libraries and naming conventions already in use Tools such as `gitingest` or `repo2txt` can bundle a codebase into a form a model can read efficiently. The rule is simple: poor context in, poor code out. #### 4. Generate, then test immediately This is where most people slip: they generate, assume it works, and move on. Professionals run a tight loop instead: **generate → test → fix → repeat** Without tests, AI assumes its code works, and confidence is dangerous when it's wrong. Use test-driven development where you can: write the tests first (or have the AI write them), implement against them, run them after every chunk, and don't move on until they pass. #### 5. Review every line A good rule: *if you can't explain it to a junior developer, you don't understand it well enough to keep it.* One survey respondent in the study said they would "read every line of code before accepting." If something looks right but you don't know *why* it works, that's a red flag, not a green light. A classic example is an inverted permission check that lets deactivated users into admin tools: it reads fine at a glance, passes a happy-path test, and can sit unnoticed for weeks. Don't ship what you can't explain. #### 6. Get a second opinion Don't rely on a single model. Generate with one and review with another; if Claude wrote it, ask Gemini to critique it. Different models have different blind spots. Then add the automated layer: linters, static analysers and dependency scanners such as SonarQube or Snyk. They take minutes to set up and catch what both people and models miss. It's cheap insurance against expensive bugs. #### 7. Code without AI, regularly This is the step most people skip, and the one with the longest-term consequences: skill decay. Lean on AI for everything and the things you used to know start to feel unfamiliar. So practise deliberately without it: no autocomplete, no chat, no suggestions. Rust exercises are particularly good for this, because ownership, borrowing and lifetimes demand an understanding that AI can't shortcut for you. Osmani puts the risk well: without a solid base, AI can lead to *"Dunning-Kruger on steroids."* AI amplifies skill. It can't replace skill that was never built. ### The four most common mistakes **1. Prompting without thinking.** "Build me X" produces something that looks like ten developers worked on it without talking to each other. *Fix:* write the spec first. Fifteen minutes of planning saves hours. **2. Asking for too much at once.** Big, monolithic prompts lose coherence. The model contradicts its earlier decisions and drops requirements you set ten paragraphs ago. *Fix:* one function, one bug or one feature at a time. **3. Giving no context.** Vague prompts produce vague code. *Fix:* show the relevant files, state the constraints and name the libraries and patterns. **4. Skipping tests.** Without a test suite, "almost right" goes to production, and you find out what "not quite" means at the worst possible moment. *Fix:* write the tests first and let them be the safety net that makes AI-assisted coding viable. ### How I use this in my own work I follow this split in my own projects. When I built my [neuro-symbolic math solver](https://yadunandan-singh.pages.dev/blog/neuro-symbolic-math-solver/), an agent scaffolded the React interface from a detailed prompt, but I wrote the image-processing pipeline, trained the model and designed the evaluation step myself, because that's where a confident mistake would have broken everything. My [open-source pull requests](https://yadunandan-singh.pages.dev/about) follow the same rule: AI can help me explore an unfamiliar codebase, but nothing goes up for review that I can't explain line by line. ### The one-line formula > **Spec first. Small steps. Maximum context. Test everything. Review every line. Cross-check with a second model. Code without AI every week.** The gap between an average developer and an excellent one isn't talent, years of experience or access to better tools. It's discipline, control, and the willingness to review everything before it ships. ### A final thought Most professional developers have already rejected vibe coding, not because AI isn't powerful, but because they understand what it is. AI is a force multiplier, and like every force multiplier it scales whatever you bring to it. Bring sloppy thinking and you get sloppy code, fast. Bring disciplined engineering habits and you get something genuinely remarkable. The developers who will win with AI aren't the ones who trust it most. They're the ones who understand it most clearly, and use it accordingly. ### Sources - Huang, Reyna, Lerner, Xia and Hempel, [*Professional Software Developers Don't Vibe, They Control: AI Agent Use for Coding in 2025*](https://arxiv.org/abs/2512.14012), arXiv, December 2025. - METR, [*Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity*](https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/), July 2025. - CodeRabbit, [*State of AI vs. Human Code Generation*](https://www.coderabbit.ai/blog/state-of-ai-vs-human-code-generation-report), December 2025. - Stack Overflow, [*2025 Developer Survey: AI*](https://survey.stackoverflow.co/2025/ai). - Addy Osmani, [*My LLM coding workflow going into 2026*](https://addyosmani.com/blog/ai-coding-workflow/). --- ## How I Built a Face Authentication App in Django: A Complete ML Learning Journey - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2025-12-22 · updated 2026-10-19 - URL: https://yadunandan-singh.pages.dev/blog/django-face-authentication-app/ - Topics: Machine Learning, Django, Learning - First published on Medium: https://medium.com/@yadunandan-ai-dev/how-i-built-a-face-authentication-app-in-django-a-complete-ml-learning-journey-6ea0a8bbc2ef Summary: Yadunandan Singh describes building a Django web app that users log in to with their face, using the eigenfaces method: greyscale 100 × 100 face images are flattened, centred on the mean face and decomposed with SVD in NumPy, and logins are matched by Euclidean distance with a rejection threshold. Because one photo per user wasn't enough to train on, OpenCV generates eight synthetic variations of each sign-up photo. The post also sets out his method for learning a new framework through a project without copying AI-generated code. Key takeaways: - Choose a project that builds on what you already know and stretches you in one new direction. - Learn the new framework from documentation and tutorials first, and write down your architecture before coding. - Tell your AI assistant to guide and review, not to write the code for you. - Eigenfaces: flatten each face, subtract the mean face, run SVD, and match logins by distance in eigenface space. - When data is scarce, generate it: one photo becomes nine with flips, lighting, noise, blur, tilt and contrast changes. Every developer knows the moment when a concept finally clicks and everything falls into place. For me, it came while building a face-authentication app in Django from scratch: an app you sign up to with your face and your name, and log in to with your face alone. This post is about that project, but mostly it's about the process behind it. If you're tired of generic tutorials and want to build something that actually teaches you, this is the method I'd hand you. ### Phase 0: Choose a project that fits your level Here's the uncomfortable truth: most "Top 5 Projects to Land Your Dream Job" articles never tell you what you need to know *first*. They sell the destination and skip the road. Think back to maths at school. Solving your first equation for *x* felt good because it built on things you already understood. Now imagine being handed advanced calculus without ever learning algebra. That's what happens when a beginner jumps straight into a complex project with no foundation, and the result is predictable: anxiety, burnout, and a voice in your head saying coding isn't for you. #### Let an assistant match a project to you Instead of picking from a listicle, have a real conversation with an AI assistant about what you already know and what you want to learn: ```prompt Hi, I'm an AI/ML learner looking for challenging projects that match my current skills. Here's what I know: - Programming language: [your preferred language] - Maths I'm comfortable with: [SVD, linear algebra, etc.] - What I want to learn: [Django, FastAPI, TensorFlow, etc.] Can you suggest 2–3 projects that would challenge me while building on what I already know? ``` That's how I found this project. I was comfortable with SVD and wanted to learn Django, and face authentication sat exactly where the two overlap. ### Phase 1: Preparation, the part everyone skips You've chosen a project. Now resist the urge to open your editor. #### Step 1: Learn the new technology without shortcuts For me the new technology was Django; for you it might be React or PyTorch. Either way, don't let AI write the code yet. - **Watch tutorials from people who explain the *why*,** not just the keystrokes. - **Read the official documentation.** Yes, really. - **Give it a day or two.** Rushing this stage produces shallow understanding that collapses the first time something breaks. - **Ask yourself why you're learning it.** The answer shapes how you'll use it. Once you've done the research, use AI to clear up specific doubts, not to hand you answers. #### Step 2: Write down your architecture Open a notebook, paper or digital, and answer three questions: 1. What problem am I solving? 2. Which technologies will I use, and **why**? "Because it's the thing I wanted to learn" doesn't count; give a real reason. 3. How do those pieces fit together? Here's what I wrote for Django: *"I'm using Django as my web framework because it structures code logically and has built-in security features, which matter for authentication."* This one exercise is the difference between copying code and engineering a system. #### Step 3: Give your AI chat clear boundaries Start a fresh chat for the project and set the rules before anything else: ```prompt Your role is to assist and document my learning journey. Do NOT provide me code. Instead, help me think through problems and validate my solutions. ``` That single rule changed everything for me. I learned instead of copy-pasting, and the conversation turned into a record of every decision I made. ### Phase 2: Building it This is the visible half of the work: the code that shows how you think. Write it as if someone else will read it, because one day someone will. Comment the parts that aren't obvious, check for bugs at every step, and debug properly rather than poking at things until they work. When you hit a wall, and you will, follow the same order every time: 1. **Search for it yourself** and give it a genuine 30 minutes. 2. **Try different approaches**, and note what didn't work. 3. **Then ask the AI**, explaining both the problem *and* what you tried. 4. **Learn from the answer.** Don't just paste it in. ### How the app works The recognition is linear algebra, not a pre-trained face-recognition library. It's the classic *eigenfaces* method, built on Singular Value Decomposition with NumPy. **Training.** Every stored face goes through the same preparation: OpenCV reads it in greyscale (colour is just noise for this method) and resizes it to 100 × 100 pixels. The 2D image is then flattened into one long column of 10,000 numbers, and the columns for every face are placed side by side in a matrix. I subtract the *mean face*, the average of all the columns, so what's left is how each face differs from average, and run SVD on that centred matrix: ```python mean_face = data_matrix.mean(axis=1).reshape(-1, 1) centered_matrix = data_matrix - mean_face U, S, Vt = np.linalg.svd(centered_matrix, full_matrices=False) weights = np.dot(U.T, centered_matrix) # each face's coordinates in "eigenface" space ``` The columns of `U` are the eigenfaces: the directions in which faces in the dataset vary the most. Each face is stored as its `weights`, its coordinates along those directions, which is a far more compact description than 10,000 raw pixels. **Logging in.** The photo from the webcam goes through exactly the same steps: greyscale, 100 × 100, flatten, subtract the mean face, and project onto the eigenfaces. The app then measures the Euclidean distance from that vector to every stored face. The closest one wins, but only if it is closer than a fixed threshold; otherwise the login is rejected rather than matched to the least-bad candidate. The whole thing is Dockerised, so it runs the same way on any machine. ### The problem I didn't see coming My first version trained badly. One photo per person wasn't enough. Recognising a face reliably needs that face under different lighting, at slightly different angles, from cameras of different quality. But I couldn't expect every new user to upload ten photos. So instead of asking for more data, I generated it. When you sign up, an augmenter takes your one real photo and uses **OpenCV to create eight synthetic variations**: a mirror image, a brighter and a darker copy, a grainy copy that imitates a poor camera sensor, a blurred one for out-of-focus shots, a 5° tilt each way, and a high-contrast version. Here are a few of them: ```python flip = cv2.flip(img, 1) # mirror image M_bright = np.ones(img.shape, dtype="uint8") * 40 bright = cv2.add(img, M_bright) # brighter lighting dark = cv2.subtract(img, M_bright) # darker lighting blur = cv2.GaussianBlur(img, (5, 5), 0) # out-of-focus shot M_left = cv2.getRotationMatrix2D((cols / 2, rows / 2), 5, 1) rot_left = cv2.warpAffine(img, M_left, (cols, rows)) # head tilted 5° ``` One photo becomes nine training images. That fixed the training problem, and it taught me something I've used ever since: when the data you need doesn't exist, you can often manufacture it from the data you have. The finished app does something I still find satisfying. You sign up with your face and name, and from then on you log in with your face. There's no password to guess, leak or forget. I added a notes feature for signed-in users too, which turned it into a small private notebook with your face as the key. One honest caveat: this is a learning project, not bank-grade biometrics. A simple matcher like this can be fooled by a good enough photo, which is why production systems add liveness checks on top. ### Four lessons that changed how I build **1. Confidence comes from building, not watching.** You learn a framework by fighting with it, not by watching someone else use it. **2. Architecture matters more than code.** Thinking it through before writing anything saved me from rebuilding halfway through. **3. Problems are learning opportunities in disguise.** The synthetic-image problem became the most interesting part of the whole project. **4. Document everything.** My AI chat history became a learning journal, and I still go back to it to revise concepts. ### Why this approach works None of this is about being perfect. It's about: - building real confidence through real challenges, - learning a framework deeply, not just its syntax, - ending up with a project you're genuinely proud of, and - developing problem-solving habits that carry over to every project after it. Follow this process and you won't just build a face-authentication app. You'll build the habits of someone who can learn any technology. ### What's next If this resonates, I'd love to hear about the project you're planning; tell me about it on [LinkedIn](https://www.linkedin.com/in/yadunandan-singh-ai-dev/). The code for this one is on [GitHub](https://github.com/YADUNANDAN-SINGH/django-svd-face-auth), and a star there genuinely helps me keep writing breakdowns like this. Your next great project is waiting. Stop preparing to build, and start building. --- ## Should You Be Scared of Agentic AI? Here’s the Reality - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2025-12-05 · updated 2026-10-19 - URL: https://yadunandan-singh.pages.dev/blog/should-you-be-scared-of-agentic-ai/ - Topics: Agentic AI, AI-Assisted Coding, Career - First published on Medium: https://medium.com/@yadunandan-ai-dev/should-you-be-scared-of-agentic-ai-heres-the-reality-189088104d78 Summary: Yadunandan Singh explains what agentic AI is (systems that plan, act across tools and check their own results) and reports on testing Google Antigravity, launched with Gemini 3 in November 2025, by generating a portfolio site with React, Django and OTP authentication. His conclusion: agents are excellent for prototypes and internal tools but weak for long-lived production code, beginners should not use them to write their main code, and AI rewards developers with strong fundamentals rather than replacing them. Key takeaways: - Agentic AI plans, carries out and checks multi-step tasks across the editor, terminal and browser. - AI raises team productivity, but a codebase nobody understands makes a product fragile. - Antigravity multiplies expertise; it works best for prototypes, throwaway code and internal tools. - Beginners should build fundamentals by hand and use AI to accelerate learning, not to avoid it. - Developers who master AI will outpace those who don't; skilled developers aren't being replaced. If you've read my posts before, thank you. I usually write about building models and the maths behind them, but this one is about something that will affect every developer over the next few years: **agentic AI**. When Google announced Gemini 3 alongside Antigravity, its agent-first development environment, the reaction among programmers I know was intense. More than one friend said some version of: > "This is the end of jobs!" I don't agree, but I understand the fear. So I wanted to break down what agentic AI actually is, what Antigravity can and can't do (I tested it), and what all of this really means for a career in software. ### What is agentic AI? Agentic AI refers to systems that don't just answer questions. They **plan, carry out tasks, make decisions and work towards a goal on their own.** A traditional AI tool responds when you prompt it. An agentic system can: - plan a sequence of tasks, - carry them out across several tools (the editor, the terminal, the browser), - check the results and change its approach, and - do all of that with very little human supervision. That's why businesses are paying attention: an agent that reliably handles routine work is very appealing. It also raises fair questions about jobs, code quality and long-term maintainability. ### How agentic AI really changes teams Let's be direct: AI raises productivity. A team of 20 engineers with strong AI tools might deliver what a team of 30 could a few years ago. That doesn't automatically mean mass layoffs, but it does mean teams will reorganise around the people who use AI well. There's a flip side. Used carelessly, AI creates long-term problems, especially when developers lean on tools they don't fully understand. One risk stands above the rest: > If your team can't understand or maintain the AI-generated codebase, your product becomes fragile. AI can speed development up, but without human oversight, architectural consistency and maintainability are the first things to go. So the message isn't "AI will destroy jobs". It's this: **AI will reward developers who know how to use it, and it will expose the gaps of those who don't.** ### What is Google Antigravity? Antigravity is Google's agent-first development platform, launched with Gemini 3 in November 2025. It's built to let AI agents do real software-engineering work across your editor, terminal and browser. It lets Gemini 3 write, change, test and run code on its own, and it introduces **Artifacts**: a transparent record of what the agent is doing, so you can inspect its plan and its work instead of trusting a black box. #### What it can do From Google's demos and documentation, Antigravity can: - scaffold an application from a plain-language prompt, - debug and refactor existing code, - run commands in an integrated terminal, and - verify its own output and adjust automatically. It's powerful, but it isn't magic. One prompt does not produce production-ready code. Human review and several rounds of refinement are still essential. #### Who it's really for Antigravity shines in the hands of **experienced developers**: people who understand the underlying technologies, can tell when the agent's output is right or subtly wrong, and know when to correct or override its decisions. In other words: > **Antigravity multiplies expertise. It doesn't replace it.** ### What I learned testing it I tested Antigravity by having it generate a complete portfolio website with React, a Django backend and OTP authentication. It produced a working first draft quickly, and that was genuinely impressive. It also showed me some practical limits: - Specific UI and UX requirements took careful prompting and several iterations. - AI-generated code can be harder to edit than code you wrote yourself, because you don't carry its structure in your head. - For larger changes, it often felt faster to rewrite a section by hand than to keep prompting. Here's where I'd use it, and where I wouldn't: | Where it excels | Where it falls short | |---|---| | Prototypes | Production systems where maintainability is critical | | Throwaway code | Specialised domains that need deep understanding | | Internal tools | Code that will live and evolve for years | | Rapid iteration | | ### A word for beginners Here's my honest take: **if you're a student or early in your career, don't use Antigravity to write your main code.** Not because AI is dangerous, but because learning needs the very things an agent takes away: - debugging problems yourself, - troubleshooting and experimenting, - the productive struggle with hard concepts, - writing, rewriting and iterating, and - understanding architecture from first principles. Skip those and you skip the experiences that turn you into an engineer. Use AI to **accelerate** your learning, not to **avoid** it. Once the fundamentals are solid, you can use tools like Antigravity responsibly and with confidence. ### The bigger picture What matters most is this: agentic AI can amplify a strong engineering culture, but it can't replace one. A start-up that fires experienced people recklessly, depends entirely on AI output and skips human review will still hit the same walls: maintainability collapses, technical debt piles up, nobody is providing critical oversight, and wrong assumptions get baked into the code. Tools don't fix organisational problems. **People do.** ### Final thoughts Agentic AI, and Gemini 3 with Antigravity in particular, is a real leap forward. It will reshape how we build software, how we learn, and how teams work. But here's what I believe: - AI won't replace skilled developers. - **Developers who master AI will outpace those who don't.** - Companies that deploy AI recklessly may move faster at first, but they won't necessarily last longer. The path forward is clear: **learn the fundamentals, use AI wisely, and remember that human experience is still irreplaceable.** I later turned these ideas into a concrete, research-backed workflow in [Stop Vibe Coding](https://yadunandan-singh.pages.dev/blog/stop-vibe-coding/). Are you excited about agentic AI, or worried? I'd like to hear which, and why, on [LinkedIn](https://www.linkedin.com/in/yadunandan-singh-ai-dev/). --- ## Don’t Be a Dumb Computer: SVD Explained With a YouTube Recommender - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2025-11-17 · updated 2026-10-19 - URL: https://yadunandan-singh.pages.dev/blog/svd-explained-youtube-recommender/ - Topics: Linear Algebra, Machine Learning, Recommender Systems - First published on Medium: https://medium.com/@yadunandan-ai-dev/dont-be-a-dumb-computer-svd-explained-subtitle-i-built-a-youtube-recommender-to-finally-155eabfbcbe6 Summary: Yadunandan Singh explains Singular Value Decomposition by working a small example by hand: a 3 × 4 matrix of liked and disliked videos decomposes into concept strengths of 1.41, 0.92 and 0.20, and truncating to k = 2 keeps "STEM" and "entertainment" while discarding noise. He then shows how his YouTube recommender uses TF-IDF and scikit-learn's TruncatedSVD to place videos on that concept map, builds a taste profile as the average liked vector minus the average disliked one, and ranks candidates by cosine similarity. Key takeaways: - SVD factors any matrix into U Σ Vᵀ: video-to-concept, concept strength, and concept-to-feature. - Keeping only the k strongest concepts (truncation) removes noise and makes the model faster. - TruncatedSVD.fit_transform returns U_k scaled by Σ_k: each item's coordinates on the concept map. - A taste profile is the average liked vector minus the average disliked vector. - Cosine similarity ranks candidates by how closely they point in the profile's direction. Have you ever wondered how YouTube, Netflix or Spotify know what you want to watch or hear next, without you ever telling them? It makes the experience feel almost effortless, and if you know anything about how computers work, you can guess what's underneath: maths. But not the dry, exam-paper kind. By the end of this post you'll know exactly which maths it is, you'll have worked through it by hand on a tiny example, and you'll see how a computer runs the same steps in a few lines of Python. I built a small [YouTube recommender](https://github.com/YADUNANDAN-SINGH/YouTube-video-recommendation-model-with-SVD) to understand it properly, and that's what we'll follow. ### The idea: describe videos with numbers Singular Value Decomposition (SVD) is the technique at the heart of many recommendation systems, and it starts with a single matrix. Let's build one by hand. Imagine describing videos with four features: how much each one is about **Physics**, **Maths**, **Vlogs** and **Funny** content. Here are three videos a viewer has rated: two they liked and one they hated. ```math Physics Maths Vlogs Funny Liked 1 [ 0.7 0.5 0.0 0.0 ] Liked 2 [ 0.7 0.9 0.0 0.0 ] Hated 1 [ 0.0 0.0 0.7 0.6 ] ``` This is our **matrix A**: 3 videos × 4 features, and the input to everything that follows. As humans, we see the pattern straight away. The two liked videos are both "STEM"; the hated one is "entertainment". We'd never recommend this person a vlog. The computer sees none of that. To it, these are just twelve numbers. It is a "dumb computer", and our job is to give it a method for finding the pattern itself. So let's understand the method first, and then teach it to the machine. ### The formula: A = U Σ Vᵀ SVD says that **any** matrix A can be broken into three special matrices: ```math A = U · Σ · Vᵀ ``` - **A** is what we *have*: the input data. - **U**, **Σ** and **Vᵀ** are what we *get*: three new matrices that describe the same data in a much more useful way. Geometrically, SVD describes any transformation as three simple moves: a rotation, a stretch along the axes, and another rotation. ![Three diagrams: a circle with axes, the same circle stretched into a wide ellipse, and a circle again in a new orientation.](https://yadunandan-singh.pages.dev/blog/svd-explained-youtube-recommender/svd-rotate-stretch-rotate.webp "SVD in pictures: rotate (Vᵀ), stretch (Σ), rotate again (U).") Reading the picture from left to right, start with a circle of points. **Vᵀ** rotates it, **Σ** stretches it into an ellipse (the "squeezed" one), and **U** rotates the result into its final position. We hand matrix A to the computer, tell it to run SVD, and it calculates the three matrices for us. Here's what comes back, and what each one means. ### 1. Σ: how strong each concept is **Σ** (often written S in code) is a list of *singular values*. Each one measures how important a hidden "concept" in the data is, and they always come sorted from strongest to weakest. For our matrix: ```math Σ = [ 1.41, 0.92, 0.20 ] │ │ └── concept 3: noise │ └────────── concept 2: "entertainment" └────────────────── concept 1: "STEM" ``` You can check this yourself in two lines of NumPy: ```python import numpy as np A = np.array([[0.7, 0.5, 0.0, 0.0], [0.7, 0.9, 0.0, 0.0], [0.0, 0.0, 0.7, 0.6]]) U, S, Vt = np.linalg.svd(A, full_matrices=False) print(S.round(2)) # [1.41 0.92 0.2 ] ``` This is the key result. It tells the computer that "STEM" (1.41) is the strongest pattern in the data, "entertainment" (0.92) is second, and the third concept (0.20) is weak. ### What is k, and why does it matter? **k is the number of concepts we decide to keep.** SVD found three, ranked by strength: 1. **Strength 1.41, "STEM".** The main pattern. 2. **Strength 0.92, "entertainment".** The second pattern. 3. **Strength 0.20, "noise".** Look at its recipe (the third row of Vᵀ) and you'll find it is roughly *Physics minus Maths*. It captures the one tiny difference between the two liked videos: one leans slightly more towards Physics, the other towards Maths. True, but irrelevant to what this person likes. So we have a choice: - **k = 3** keeps everything, including the noise. The computer can get distracted by details that don't matter. - **k = 1** keeps only "STEM". Too simple: the computer would know you like STEM, but not that you dislike entertainment. - **k = 2** is the sweet spot. Keep the two strong concepts and throw the noise away. Throwing away the weakest concepts is called **truncation**, which is why the code uses `TruncatedSVD`. It makes the system faster *and* smarter, because it forces the computer to focus on the big patterns rather than the noise. ### 2. Vᵀ: the recipe book **Vᵀ** tells us what each concept is made of. Its columns are our original features, and with k = 2 it has two rows, one recipe per concept: ```math Physics Maths Vlogs Funny Concept 1 [ 0.69 0.72 0.00 0.00 ] ← "STEM" Concept 2 [ 0.00 0.00 0.76 0.65 ] ← "entertainment" ``` Exactly what we'd hoped for. Concept 1 is roughly 0.7 × Physics + 0.7 × Maths; concept 2 is Vlogs plus Funny. One thing that trips everyone up: if you run this in NumPy, the first row may come back as `[-0.69, -0.72, 0, 0]`. That isn't a different answer. SVD can flip the sign of a concept as long as it flips the matching column of U too, and the product is identical. I've used the positive signs here because they're easier to read. ### 3. U: the video–concept map **U** says how much each **video** uses each **concept**. With 3 videos and k = 2 concepts, the truncated `U_k` is 3 × 2: ```math STEM Entertainment Liked 1 [ 0.60 0.00 ] Liked 2 [ 0.80 0.00 ] Hated 1 [ 0.00 1.00 ] ``` Now the computer can see what we saw at the start: both liked videos sit entirely on the STEM axis, and the hated video sits entirely on the entertainment axis. ### The "aha" moment: we don't need to rebuild A We went to all the trouble of computing A = U Σ Vᵀ, but for a recommender we **never multiply them back together**. What we want is a map. Every video becomes a point on a small, clean "subway map": instead of four messy features (Physics, Maths, Vlogs, Funny), each video is described by just two coordinates, STEM and entertainment. In my project, that's this line in `svd_engine.py`: ```python svd = TruncatedSVD(n_components=5) svd_matrix = svd.fit_transform(tfidf_matrix) ``` In the real project, matrix A isn't hand-written. It's built with TF-IDF from each video's title, description and tags, so it has thousands of word columns, and I keep k = 5 concepts. `fit_transform` runs the whole decomposition, keeps the k strongest concepts and returns each video's coordinates on the map. One precise detail: what it returns is `U_k` **scaled by the strengths** in Σ, so a stronger concept spreads the videos further apart. For our toy example the map coordinates are: ```math STEM Entertainment Liked 1 [ 0.85 0.00 ] 0.60 × 1.41 Liked 2 [ 1.13 0.00 ] 0.80 × 1.41 Hated 1 [ 0.00 0.92 ] 1.00 × 0.92 ``` That's how you teach a "dumb computer" to be smart. It doesn't learn what "STEM" means. It discovers that some features always move together, and puts them on a shared axis. ### Finding your taste with cosine similarity Every video is now a point on the map. Next, we need to find *you* on it. #### Step 1: Build a taste profile This is the part of `svd_engine.py` that turns ratings into a single vector: ```python avg_liked_video = np.mean(liked_svd_vectors, axis=0) avg_hated_video = np.mean(hated_svd_vectors, axis=0) profile = avg_liked_video - avg_hated_video ``` With our numbers: ```math average liked = ([0.85, 0.00] + [1.13, 0.00]) / 2 = [ 0.99, 0.00 ] average hated = [ 0.00, 0.92 ] profile = average liked − average hated = [ 0.99, −0.92 ] ``` This profile is your **taste compass**. It points strongly *towards* STEM (+0.99) and strongly *away from* entertainment (−0.92): subtracting what you hated pushes the compass in the opposite direction. #### Step 2: Measure with cosine similarity Now take two candidate videos: another STEM video (mostly Physics and Maths) and another vlog (mostly Vlogs and Funny). In my engine the candidates are rows of the same matrix, so they land on the map in the same `fit_transform` call. In the toy example, placing them on the map gives: ```math Candidate 1 (STEM) = [ 0.99, 0.00 ] Candidate 2 (vlog) = [ 0.07, 0.93 ] ``` **Cosine similarity** measures the angle between two vectors. It's a ruler, not a factory: it doesn't create anything new, it only measures how closely two directions agree, from +1 (same direction) to −1 (opposite). ```math similarity(profile, Candidate 1) = +0.73 similarity(profile, Candidate 2) = −0.62 ``` Why +0.73 rather than something closer to 1? Because the compass points towards STEM *and* away from entertainment, while the STEM candidate is simply neutral about entertainment. Close in direction, not identical. The vlog points almost exactly where you said you didn't want to go, so its score is strongly negative. The engine computes this score for every candidate, sorts them from highest to lowest, and the top of the list is your recommendation. **Candidate 1 wins.** ### The whole pipeline Put together, the recommender is five steps: ```text 1. Describe every video as numbers TF-IDF over titles, descriptions and tags 2. Find the hidden concepts TruncatedSVD, keeping the k strongest 3. Place every video on the map its coordinates along those k concepts 4. Build a taste profile average(liked) − average(hated) 5. Rank the candidates cosine similarity to the profile ``` The code that turns this maths into something a computer can run, along with a small Flask interface for trying it on real YouTube videos, is on [GitHub](https://github.com/YADUNANDAN-SINGH/YouTube-video-recommendation-model-with-SVD). If the geometry here felt shaky, the post where I built a [matrix transformation visualiser](https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer/) is the foundation this one sits on. And I later took the same idea further in [GlassBox](https://github.com/YADUNANDAN-SINGH/GlassBox-Rust-SVD-recommendation-system), which runs SVD entirely in the browser with Rust and WebAssembly. --- ## I Stopped Solving Problems and Built a Tool Instead: How a Visualizer Taught Me Real Linear Algebra - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2025-10-14 · updated 2026-10-19 - URL: https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer/ - Topics: Linear Algebra, Mathematics, Python - First published on Medium: https://medium.com/@yadunandan-ai-dev/i-stopped-solving-problems-and-built-a-tool-instead-how-a-visualizer-taught-me-real-linear-algebra-17ea52847001 Summary: Yadunandan Singh built an interactive visualiser that shows what a 2 × 2 matrix does to the unit square, and uses it to explain linear algebra through hand-worked examples. A shape is stored as a 2 × 5 matrix of vertices, so one multiplication transforms every point; a matrix's columns show where the basis vectors land; the determinant is the factor by which area scales, negative for reflections and zero when space collapses onto a line; and eigenvectors are the directions that only stretch. Key takeaways: - Calculating by hand builds the intuition you need to design mathematical algorithms. - Store a shape as a matrix of column vectors and one multiplication transforms every vertex. - A matrix's columns are where the basis vectors î and ĵ land. - The determinant is area scaling: negative means mirrored, zero means collapsed onto a line. - Eigenvectors keep their direction and only stretch, by their eigenvalue. For weeks I was deep in linear algebra theory: matrices, determinants, eigenvalues, one practice set after another. Then a question started bothering me. **What good is all this theory if I don't know what these transformations actually look like?** That question changed my plan. I put the practice problems down and set myself a new goal: build something that makes linear algebra visible. The result was an interactive [geometric transformation visualiser](https://github.com/YADUNANDAN-SINGH/Geometric-Transformation-Visualizer-). You type in a 2 × 2 matrix and watch what it does to a square, along with its determinant. It taught me more than the problem sets had. Not just how matrices work, but how to think about them geometrically and algebraically at the same time. This post documents the whole journey: the questions I had, the insights, and the calculations I worked through by hand. All you need is basic familiarity with matrices and some curiosity about how they move space around. ### Part 1: Why manual calculation still matters in the age of AI Every calculation these days can be done by a calculator or an AI. Type in a matrix multiplication, press enter, and the answer appears instantly. So why do it by hand? Isn't that a waste of time? Here's what I found: **without manual calculation, you can't design mathematical algorithms.** Let me explain why. ![A glowing human brain surrounded by thought bubbles on the left, facing a circuit-board chip labelled AI surrounded by charts and binary on the right.](https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer/mind-vs-computer.webp "The same calculation looks very different to a mind and to a machine.") #### How your mind sees a calculation, and how a computer does Say you multiply these two matrices by hand: ```math [ 2 1 ] [ 1 0 ] [ 0 3 ] × [ 0 1 ] ``` While you work, your mind is doing much more than arithmetic: - You see the **structure**: rows of the first matrix meet columns of the second. - You understand that each entry of the result is a **dot product**. - You feel the relationship between input and output. - You spot patterns: *"the second matrix is the identity, so nothing changes. The answer is just the first matrix."* The computer sees `a[0][0] * b[0][0] + a[0][1] * b[1][0]` and executes it. Blind, mechanical steps, with no idea what is happening geometrically and no way to tell you why it matters. It's faster, yes. But it's a calculator, not a mathematician. #### Designing an algorithm needs intuition When I sat down to design the engine for the visualiser, I had to answer three questions: 1. How do I represent a shape mathematically? 2. How do I apply a transformation to every point of that shape? 3. How do I know whether the result is correct? Every answer came from hours of multiplying matrices by hand. Because of that practice I *knew* that a shape is a collection of vertex vectors, that a transformation is matrix multiplication applied to each vertex, and that the determinant tells me what happened to area and orientation. Without it, I'd have been designing blind. #### The paradox: you rarely need it, but you can't skip it ![A glowing wireframe figure with a hand on its chin, surrounded by paradoxes such as 'This statement is false'.](https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer/manual-calculation-paradox.webp "We rarely calculate by hand in real work, yet the practice is what builds the intuition.") In real work you'll almost never multiply two 2 × 2 matrices by hand. But the boring practice of doing it is exactly what builds the mental models you need to architect a solution. It's like cooking. You might use a food processor every day, but if you never learned to chop by hand you wouldn't understand how the angle of a cut changes the texture, why different vegetables need different techniques, or what a sharp blade does differently. Manual practice builds knowledge that lives in your intuition, not just your memory, and when you design algorithms, that intuition is everything. #### The moment it clicked My first plan for the algorithm was "multiply the matrix by the shape, done". But I didn't really understand *why* that worked until I pushed three points through a matrix by hand: ```math [ 0 -1 ] [ 1 ] [ 0 ] [ 1 0 ] [ 0 ] = [ 1 ] (1, 0) → (0, 1) [ 0 -1 ] [ 0 ] [ -1 ] [ 1 0 ] [ 1 ] = [ 0 ] (0, 1) → (-1, 0) [ 0 -1 ] [ 1 ] [ -1 ] [ 1 0 ] [ 1 ] = [ 1 ] (1, 1) → (-1, 1) ``` Right goes to up, up goes to left, and the corner swings round with them. This matrix rotates every point 90° anticlockwise. Doing the calculation revealed the geometry hidden in the algebra. **Calculators give you answers. Manual calculation gives you understanding**, and understanding is what lets you design algorithms that work. ### Part 2: Representing a shape as a matrix ![Coloured dots scattered on a pair of axes.](https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer/shape-as-matrix.webp "A shape is just a set of points, and each point is a vector.") A shape in 2D is just a collection of points, and each point is a vector with an x and a y coordinate. The point (1, 0), for example, is the column vector: ```math v = [ 1 ] [ 0 ] ``` I wanted to visualise transformations of the unit square, whose four corners are (0, 0), (1, 0), (1, 1) and (0, 1). One small trick: to draw it as a closed outline, I repeat the starting point at the end, so the square is defined by **five** points. I store all of them in a single **2 × 5 matrix**, one vertex per column: ```math S = [ 0 1 1 0 0 ] ← x-coordinates [ 0 0 1 1 0 ] ← y-coordinates │ │ │ │ └── (0, 0) back to the start │ │ │ └───── (0, 1) top-left │ │ └──────── (1, 1) top-right │ └─────────── (1, 0) bottom-right └────────────── (0, 0) start ``` #### Why columns and not rows? This was one of my first questions. The answer is convention, but a convention that makes everything else clean. We write a transformation as **A · v**: matrix on the left, vector on the right. For that product to work, v has to be a column: ```math [ a b ] [ 1 ] [ a·1 + b·0 ] [ a ] [ c d ] [ 0 ] = [ c·1 + d·0 ] = [ c ] ``` If the point were a row, `[1 0]`, you'd have to multiply from the other side, `[1 0] × A`, which gives `[a b]`: the first row of A rather than the first column. To get the right answer with rows, you would have to use the transpose of A everywhere. With columns, the natural formula **A · v** just works, and as we'll see, it lets you transform every vertex at once. ### Part 3: A matrix is a transformation ![A wireframe cube on the left stretched by lines into a distorted shape on the right, under the heading Understanding Matrix Transformations.](https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer/matrix-as-transformation.webp "A 2 × 2 matrix describes how all of 2D space is moved.") This is the core idea of linear algebra: **a 2 × 2 matrix describes a transformation of 2D space.** Rotation, scaling, shearing and reflection can all be written as a matrix. So when someone types four numbers into the visualiser, they aren't just entering data. They're defining how space itself should bend. The secret is in the columns. Space has two basic directions, the *basis vectors* î = (1, 0) pointing right and ĵ = (0, 1) pointing up, and the columns of the matrix say where each of them lands: ```math A = [ a b ] first column (a, c) = where î lands [ c d ] second column (b, d) = where ĵ lands ``` #### Worked by hand: a 90° rotation The 90° anticlockwise rotation matrix is: ```math A = [ 0 -1 ] [ 1 0 ] ``` Its columns say that î = (1, 0) lands on (0, 1), so right becomes up, and ĵ = (0, 1) lands on (−1, 0), so up becomes left. That's exactly a quarter turn. Let's confirm it on all four corners of the square: ```math (0, 0) → [ 0·0 + (-1)·0 , 1·0 + 0·0 ] = ( 0, 0) (1, 0) → [ 0·1 + (-1)·0 , 1·1 + 0·0 ] = ( 0, 1) (1, 1) → [ 0·1 + (-1)·1 , 1·1 + 0·1 ] = (-1, 1) (0, 1) → [ 0·0 + (-1)·1 , 1·0 + 0·1 ] = (-1, 0) ``` The square has turned 90° anticlockwise. The corner that sat at the bottom right, (1, 0), now sits at the top, (0, 1). #### The shortcut: one multiplication for every vertex Here's the elegant part. Because S holds every vertex as a column, I don't need to transform them one at a time. A single matrix multiplication does all five at once: ```math [ 0 -1 ] [ 0 1 1 0 0 ] [ 0 0 -1 -1 0 ] S_transformed = [ 1 0 ] × [ 0 0 1 1 0 ] = [ 0 1 1 0 0 ] ``` Each column of the result is one transformed vertex, the same answers as above. That one line is the core algorithm of the whole project: ```math S_transformed = A × S_original ``` ### Part 4: The determinant is area scaling With transformations working, I wanted to understand something deeper: **what does a transformation do to area?** The answer is a single number, the determinant. For a 2 × 2 matrix: ```math A = [ a b ] [ c d ] det(A) = ad − bc ``` A simple formula, but what does it *mean*? It took many hand calculations before it sank in: **The determinant is the factor by which a transformation scales area.** The unit square has area 1, so after the transformation its image has area **|det(A)|**. #### Example 1: scaling ```math A = [ 2 0 ] [ 0 3 ] det(A) = 2·3 − 0·0 = 6 ``` The determinant predicts the area grows six-fold. Transforming the square: ```math [ 2 0 ] [ 0 1 1 0 0 ] [ 0 2 2 0 0 ] [ 0 3 ] × [ 0 0 1 1 0 ] = [ 0 0 3 3 0 ] ``` The corners land on (0, 0), (2, 0), (2, 3) and (0, 3): a 2 × 3 rectangle with area **6**. Exactly as predicted. #### Example 2: a shear ```math H = [ 1 1 ] [ 0 1 ] det(H) = 1·1 − 1·0 = 1 ``` A determinant of 1 says the area shouldn't change. Let's check: ```math [ 1 1 ] [ 0 1 1 0 0 ] [ 0 1 2 1 0 ] [ 0 1 ] × [ 0 0 1 1 0 ] = [ 0 0 1 1 0 ] ``` The corners land on (0, 0), (1, 0), (2, 1) and (1, 1): the square has been pushed sideways into a **parallelogram**. Its base is 1 and its height is 1, so its area is 1 × 1 = **1**. The shape changed completely, but the area didn't, just as the determinant said. #### Example 3: the sign matters ```math A = [ 1 0 ] [ 0 -1 ] det(A) = 1·(−1) − 0·0 = −1 ``` A **negative** determinant. Transforming the square: ```math [ 1 0 ] [ 0 1 1 0 0 ] [ 0 1 1 0 0 ] [ 0 -1 ] × [ 0 0 1 1 0 ] = [ 0 0 -1 -1 0 ] ``` The square has been **flipped** across the x-axis: every point that was at y = 1 is now at y = −1. The area is still |−1| = 1, but the orientation has reversed, like a reflection in a mirror. #### The strangest case: a determinant of zero What if the determinant is exactly zero? ```math A = [ 1 1 ] [ 2 2 ] det(A) = 1·2 − 1·2 = 0 ``` Zero area. How can a square end up with no area at all? ```math [ 1 1 ] [ 0 1 1 0 0 ] [ 0 1 2 1 0 ] [ 2 2 ] × [ 0 0 1 1 0 ] = [ 0 2 4 2 0 ] ``` The corners land on (0, 0), (1, 2), (2, 4) and (1, 2), and every one of them lies on the line **y = 2x**. The whole 2D square has been **squashed onto a 1D line**, and a line has no area. A matrix like this is called *singular*: it collapses space into a lower dimension, and that collapse can't be undone. Putting the four cases together: | Determinant | What happens to the square | |---|---| | det > 0 | Area scales by det; orientation is kept | | det < 0 | Area scales by \|det\|; the shape is mirrored | | det = 1 | Area is unchanged (rotations and shears) | | det = 0 | The square collapses onto a line or a point | ### Part 5: From theory to the engine With the maths understood, the algorithm almost wrote itself: 1. **Input:** four numbers a, b, c, d. 2. **Build** the transformation matrix A from them. 3. **Define** the unit square S as a 2 × 5 matrix. 4. **Transform** it: S′ = A × S. 5. **Compute** the determinant to report the area scaling. No loops over vertices, no special cases. One matrix for the transformation, one for the shape, one multiplication, one determinant. Here's the heart of `engine.py` in my project: ```python # Create the transformation matrix a = np.array([[x1, x2], [y1, y2]]) # Define the original square b = np.array([[0, 1, 1, 0, 0], [0, 0, 1, 1, 0]]) # Apply the transformation transformed_square = a @ b ``` The rest of the engine is presentation. Matplotlib draws the original square in green and the transformed shape in blue, puts the determinant in the title, and the image goes back to the browser through a small Flask endpoint. #### A complete example Let's run one input all the way through: a = 1, b = 0.5, c = 0, d = 1, a horizontal shear. ```math A = [ 1.0 0.5 ] [ 0.0 1.0 ] [ 1.0 0.5 ] [ 0 1 1 0 0 ] [ 0.0 1.0 1.5 0.5 0.0 ] [ 0.0 1.0 ] × [ 0 0 1 1 0 ] = [ 0.0 0.0 1.0 1.0 0.0 ] det(A) = 1.0·1.0 − 0.5·0.0 = 1.0 ``` The output corners are (0, 0), (1, 0), (1.5, 1) and (0.5, 1). The top edge has slid half a unit to the right, and the area is still 1.0. That's exactly what appears on screen. ### Part 6: Experiments that taught me the most Once the visualiser worked, I spent hours feeding it different matrices. These are the patterns that stuck. #### Rotations never change area Rotation by an angle θ has the form: ```math R(θ) = [ cos θ −sin θ ] [ sin θ cos θ ] ``` For 45°, cos 45° = sin 45° ≈ 0.707: ```math R(45°) = [ 0.707 -0.707 ] det = 0.707·0.707 − (−0.707)·0.707 = 0.5 + 0.5 = 1 [ 0.707 0.707 ] ``` **Every rotation matrix has determinant 1**, which makes sense: rotating something never changes its area or flips it. Checking one point, (1, 0) moves to (0.707, 0.707), exactly 45° anticlockwise. #### Scaling: the determinant is width × height A pure scaling matrix only has entries on its diagonal: ```math S = [ sx 0 ] det(S) = sx · sy [ 0 sy ] ``` With sx = 3 and sy = 2, the square becomes a 3 × 2 rectangle and det = 6. For a scaling matrix, the determinant formula is literally width × height. #### Eigenvectors: the directions that don't turn This one genuinely surprised me. I typed in: ```math A = [ 2 1 ] [ 1 2 ] ``` and noticed that the diagonal line y = x didn't rotate at all. It only stretched. Checking the point (1, 1) by hand: ```math [ 2 1 ] [ 1 ] [ 3 ] [ 1 ] [ 1 2 ] [ 1 ] = [ 3 ] = 3 × [ 1 ] ``` The vector (1, 1) came out **three times longer but pointing the same way**. That makes it an *eigenvector* of A, and 3 is its *eigenvalue*: ```math A · v = λ · v with v = (1, 1), λ = 3 ``` There's a second one hiding along y = −x: A · (1, −1) = (1, −1), an eigenvector with eigenvalue 1. Every other direction gets turned; these two only stretch. Watching that diagonal line simply grow while everything around it skewed and rotated taught me more about eigenvectors than any definition had. ### Part 7: What changed in how I understand maths **Geometry makes algebra real.** Matrices used to be grids of numbers. Now each one has a picture: numbers on the diagonal stretch along the axes, numbers off the diagonal shear, a negative determinant flips, and a zero determinant collapses a dimension. Algebra and geometry are two languages for the same thing. **The determinant is secretly simple.** It's area scaling, nothing more. And ad − bc is exactly the area of the parallelogram whose sides are the matrix's columns, (a, c) and (b, d). **Manual calculation built the intuition.** Every insight above came from working examples by hand. When I computed that the scaling matrix sends (1, 0) to (2, 0), I didn't just get an answer. I *saw* the x-coordinate double while y stayed put. **Simple algorithms can be powerful.** The whole engine is `output = matrix × shape`. One line, and it handles every rotation, scaling, shear, reflection and combination of them. The power isn't in complicated code; it's in understanding the maths well enough to say it simply. ### Conclusion This project took me from abstract linear algebra to an intuition I can actually feel. The best way to understand a piece of maths isn't only to study it: it's to **calculate it by hand, design an algorithm for it, and watch it move.** The tedious calculations on scrap paper turned out to be the most valuable part. They built the mental models that let me write a small, clean engine, and they revealed the geometry hiding inside the formulas. That same intuition is what later made SVD click for me, in the post on [building a YouTube recommender](https://yadunandan-singh.pages.dev/blog/svd-explained-youtube-recommender/). The full code is on [GitHub](https://github.com/YADUNANDAN-SINGH/Geometric-Transformation-Visualizer-). Try a few matrices of your own, and see which one surprises you. --- ## How to Build Your Own Image Recognition Model as Your First AI Project - Author: Yadunandan Singh (https://yadunandan-singh.pages.dev/) - Published: 2025-09-24 · updated 2026-10-19 - URL: https://yadunandan-singh.pages.dev/blog/first-image-recognition-model/ - Topics: Machine Learning, Computer Vision, Beginners - First published on Medium: https://medium.com/@yadunandan-ai-dev/how-can-you-build-your-own-image-recognition-model-as-your-first-ai-project-090a20c3ec3e Summary: Yadunandan Singh documents his first hands-on AI project: a convolutional neural network trained on CIFAR-10 with TensorFlow and Keras and served through a Flask web app. The guide covers how images become 32 × 32 × 3 tensors, normalisation, data augmentation, three Conv2D and pooling blocks, dropout, and the compile and fit settings, plus a 1,563-epoch, eight-hour experiment in which strong augmentation and dropout kept validation accuracy improving instead of overfitting. Key takeaways: - A colour image is a 32 × 32 × 3 tensor of pixel values; scale them to 0–1 before training. - Data augmentation and dropout are the main defences against overfitting. - Stack Conv2D and MaxPooling2D blocks to detect patterns, then Flatten, Dense and softmax to classify. - Use sparse categorical cross-entropy for integer labels and categorical cross-entropy for one-hot labels. - Serve the model by giving uploads exactly the same preprocessing as the training data. For a solid month I was deep in the maths behind AI: equations, formulas, algorithms, one practice session after another. Then a question started bothering me. **What good is all this theory if I can't use it to build something?** That changed my plan. I swapped endless practice for a new rule: a hands-on project every weekend. This was the first. I built an image classifier from scratch and served it as a web app you can drop a photo into. It didn't just teach me how to code a model. It taught me how to *think* like an AI engineer. This post documents that whole journey: every question I had, every mistake I made, and every lesson I took from it, so your path can be smoother than mine. All you need is some basic Python. The final code is on [GitHub](https://github.com/YADUNANDAN-SINGH/AI-Image-Recognition-webapp). ### Part 1: How a computer "sees" an image Computers work in numbers. So how does a rich, colourful photo become something a computer can reason about? Start with a black-and-white picture. To a computer it's a grid of tiny dots called **pixels**, and each pixel is a single number for its brightness, from **0 (pure black)** to **255 (pure white)**. A picture is just a big matrix of numbers. Colour adds one twist. Instead of one number per pixel, there are three: one each for **red**, **green** and **blue (RGB)**, each from 0 to 255. Mixing them gives millions of colours. So a small 32 × 32 colour image isn't a 2D grid any more; it's a 3D block of numbers with the shape **32 × 32 × 3**. In AI, a block of numbers like this is called a **tensor**. The dataset I used, CIFAR-10, is exactly that: 60,000 tiny 32 × 32 colour images in ten classes: aeroplanes, cars, birds, cats, deer, dogs, frogs, horses, ships and lorries. #### My first question: why divide by 255.0 and not 255? My first instinct was to feed those raw numbers straight into a model. But raw data is rarely in the right shape for learning, and the first preparation step is **normalisation**. Neural networks learn best when their inputs are small, so we scale every pixel from the 0–255 range down to 0–1 by dividing by 255: ```python (x_train, y_train), (x_test, y_test) = tf.keras.datasets.cifar10.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0 ``` Which led to my question: why `255.0`, with the decimal point? Training works by making millions of tiny, precise adjustments, and that needs fractional values, so the result *must* be floating point: 191 should become 0.749, not 0. In Python 3 the `/` operator always returns a float, so `/ 255` would actually work too. But in languages with integer division, or with Python's own `//`, 191 divided by 255 is 0, and your whole image silently turns black. Writing `255.0` makes the intent impossible to miss. ### Part 2: Designing the model's brain With the image as a tensor, how do we teach a model to understand it? We use a **convolutional neural network (CNN)**. A CNN doesn't try to understand the whole image at once. Its trick is to first learn small, reusable patterns (edges, corners, textures) and then learn how those patterns combine into bigger things: an ear, a wheel, a wing. #### My toolkit: TensorFlow and Keras At first I couldn't tell these two apart. The way I think of it now: **TensorFlow** is the workshop, the engine that does the heavy maths. **Keras** is a friendly toolkit inside that workshop, which lets you build a model by stacking layers like LEGO bricks. #### Building the model, one brick at a time **1. The foundation: a `Sequential` model.** Think of the flat green LEGO base plate you start with. It doesn't do anything by itself, but it holds every layer you add, in order, one on top of the next. **2. The anti-memorisation machine: data augmentation.** A huge trap in AI is **overfitting**: the model memorises the training images instead of learning what makes a cat a cat. To fight it, my model starts with three augmentation layers, `RandomFlip`, `RandomRotation` and `RandomZoom`. During training they feed the network slightly altered versions of every image, so it can never just memorise the exact pixels. **3. The eyes: `Conv2D` and `MaxPooling2D`.** This is the core of the CNN. - `Conv2D` is the pattern detector. My question here was what the numbers in it, like 32 and 64, mean. They're the number of **filters**: `filters=32` means hiring 32 detectives, each trained to find one particular visual pattern. - `MaxPooling2D` is the efficiency manager. It shrinks the output of the layer before it, keeping only the strongest signals, which makes the model faster and helps it recognise a pattern wherever it appears in the image. **A mistake I made:** at first I tried to put `MaxPooling2D` *inside* the `Conv2D` call. It doesn't work that way. In a `Sequential` model each layer is its own brick, added separately, one after another. **4. The brain: `Flatten`, `Dense` and `Dropout`.** - `Flatten` is a simple but essential bridge: it unrolls the grid of detected patterns into one long line of numbers. - `Dense` is a classic decision-making layer that weighs all of those signals together. - `Dropout` is a second weapon against overfitting. During training it randomly switches off half of the connections, so the model can't lean too heavily on any single one. - The final `Dense` layer has one unit per class (10 for CIFAR-10) and a **softmax** activation, which turns raw scores into probabilities that add up to 1. Here's the complete model from my project: ```python model = Sequential([ layers.RandomFlip("horizontal", input_shape=(32, 32, 3)), layers.RandomRotation(0.1), layers.RandomZoom(0.1), layers.Conv2D(filters=32, kernel_size=(3, 3), activation='relu'), layers.MaxPooling2D(pool_size=(2, 2)), layers.Conv2D(filters=64, kernel_size=(3, 3), activation='relu'), layers.MaxPooling2D(pool_size=(2, 2)), layers.Conv2D(filters=128, kernel_size=(3, 3), activation='relu'), layers.MaxPooling2D(pool_size=(2, 2)), layers.Flatten(), layers.Dense(units=128, activation='relu'), layers.Dropout(0.5), layers.Dense(units=10, activation='softmax') ]) ``` Augmentation first, then three rounds of "look for patterns, then shrink", then the decision-making layers. ### Part 3: Bringing the model to life With the architecture designed, it was time for the exciting part: training, where an empty network becomes a working pattern detector. But first the model needs a learning strategy. #### The pre-flight check: compile `model.compile()` configures how the model learns. The terms confused me at first, so here they are in plain words: ```python model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) ``` - **Optimizer** is the engine of learning: the algorithm that decides how to adjust the model's internal weights to reduce its mistakes. `adam` is a smart, efficient, all-round choice. - **Loss** is the grading system that measures how wrong each prediction is; the optimizer's whole job is to push it down. I used `sparse_categorical_crossentropy` because my labels are plain integers, like 3 for "cat". With one-hot labels, like `[0,0,0,1,0,0,0,0,0,0]`, you'd use `categorical_crossentropy` instead. - **Metrics** are for us humans. The loss is what the model learns from, but **accuracy**, the share of images classified correctly, is much easier to read. #### Liftoff: fit Training starts with `model.fit()`, and two more terms matter here: - An **epoch** is one complete study session, in which the model sees every training image once. - A **batch** is the small group of images the model looks at before each update; Keras uses 32 by default. With 50,000 training images, that's 50,000 ÷ 32 ≈ **1,563 steps** per epoch. When `fit()` runs, the terminal comes alive with a report card for every epoch. A line such as: ```output Epoch 32/70 … accuracy: 0.8423 - val_accuracy: 0.7263 ``` says that after 32 epochs the model gets 84% of the *training* images right, and about 73% of images it has never seen (`val_accuracy`). That second number is the one that tells you whether it has actually learned. ### My big experiment: 1,563 epochs The concept I most wanted to understand was **overfitting**. An overfit model is like a student who memorises the textbook's answers: near-perfect on questions it has seen, lost on anything new. I'd started out asking, "How do I get 100% accuracy?" Theory says that training for far too long is the quickest way to overfit, and I wanted to see that happen for myself. So I ran an extreme experiment: **1,563 epochs**, about eight hours of training, fully expecting the model to fall apart. ![Terminal output from Keras showing epochs 1 to 3 of 1,563, each 1,563 steps at about 10 ms per step, with accuracy and validation accuracy rising.](https://yadunandan-singh.pages.dev/blog/first-image-recognition-model/training-log.webp "The start of the long run: epoch 3 of 1,563, with validation accuracy already climbing.") It didn't. The validation accuracy kept improving slowly, even after hundreds of epochs. The lesson surprised me. Data augmentation and dropout made a strong anti-memorisation team. Training was so varied, with a new flip, rotation and zoom of every image, and half the connections dropped at every step, that the model *couldn't* simply memorise the data. Instead it benefited from the extra time and learned more general patterns. No textbook could have shown me that as clearly as watching it happen. ### Part 4: Serving it as a web app A model in a notebook isn't a product, so the last step was to put it behind a website. The backend is **Flask**. It loads the saved model once and exposes a `/predict` endpoint. Every uploaded image goes through the same preparation as the training data, because a model only understands inputs that look like what it learned from: ```python img = Image.open(io.BytesIO(image_data)) if img.mode != 'RGB': img = img.convert('RGB') img = img.resize((32, 32), Image.Resampling.LANCZOS) # same size as CIFAR-10 img_array = np.array(img, dtype=np.float32) / 255.0 # same 0–1 scale as training img_array = np.expand_dims(img_array, axis=0) # a "batch" of one image ``` The endpoint returns the model's **top three guesses with their confidence**, and the frontend, plain HTML, CSS and JavaScript, lets you drag and drop an image and see the result straight away. ### What I'd tell you before you start This project took me from the depths of theory to a working app, and the most important thing it taught me is simple: **the best way to understand AI is to build it, break it and fix it yourself.** Pick a small dataset, write every layer yourself, and run an experiment you expect to fail. You'll learn more from the result than from another week of reading. And if you want a gentler next step into the maths, my post on [building a matrix transformation visualiser](https://yadunandan-singh.pages.dev/blog/linear-algebra-transformation-visualizer/) is where I went next.