$ whoami
> ai engineer, building production GenAI

Divyansh Rai

I build production GenAI systems — fine-tuned LLMs and VLMs, multi-agent orchestration, and RAG pipelines — with end-to-end traceability, cost optimization, and latency enhancement.

01 / about

About

I'm an AI Engineer working across the full GenAI stack — from fine-tuning language and vision-language models to designing the multi-agent systems and retrieval pipelines that put them into production. My work spans LLM/VLM fine-tuning (LoRA, QLoRA, quantization), multi-agent orchestration and tool-calling, and the production infrastructure — retrieval, observability, event pipelines — that keeps GenAI systems reliable outside a notebook.

I hold a B.Tech in Computer Science from RGPV University, with earlier research experience in applied data science and behavioral biometrics before moving into applied AI engineering full-time.

roleAI Engineer
locationGurugram, India
focusLLMs · VLMs · Agents
02 / personal projects

Things I build on my own time

Open-source tools and independent research — built solo, outside of any job.

MnemOS

Open source · solo-built

A universal, persistent memory layer for AI assistants — designed, built, and open-sourced solo.

AI assistants forget everything between sessions. MnemOS solves that by extracting facts from conversations via LLM, embedding them with bge-m3, and injecting relevant context before each new message — invisibly, across ChatGPT and Claude. Memories are stored per-user rather than per-platform, so context follows the person across tools instead of resetting every session.

0.65 cosineRetrieval threshold
0.88 cosineDedup threshold
FastAPIPostgreSQLpgvectorOllamabge-m3Chrome Extension (MV3)MCP

Coming up

AECA — Adaptive Experience Compression

Research · in progress

Research into teaching an agent when to keep a raw memory, compress it to a skill, or crystallize it into a rule.

Most agent memory systems operate at one fixed compression level. AECA studies whether a learned policy can adaptively decide, per memory item, whether to keep it raw, compress it into a reusable skill, or crystallize it into a general rule — and rigorously compares that learned policy against a strong heuristic baseline to find out when reinforcement learning actually earns its cost over simpler methods. Schema, migrations, and the episode-ingestion pipeline are built and tested; the comparison study is in progress.

PythonPostgreSQLpgvectorSQLAlchemyGRPO / RLVRQwen2.5

RLVR-TTT

Research · early stage

Research combining test-time weight updates with verifiable-reward training, so a model can learn mid-conversation without absorbing wrong information.

Test-time training lets a model update its own weights from context during inference — but on its own it can't distinguish correct information from incorrect information, so it learns whatever it's told. This project explores pairing test-time training with reinforcement learning from verifiable rewards, so a weight update is only kept when it measurably improves performance on automatically generated, verifiable questions about the conversation. Currently in the foundations and literature-review phase ahead of implementation.

PyTorchTransformersUnslothTRLGRPO
03 / work experience

Things I've shipped professionally

Production work built as part of a team, at scale, under real constraints.

Multimodal Macro-Nutrient Pipeline & GenAI Dietary Optimization Engine

TapHealth · AI Engineer · Jan 2025 – Jun 2025

Shipped to production

Architected a cross-modal meal-logging pipeline and a RAG-based dietary optimization engine for a diabetes-management product.

Architected a cross-modal pipeline (ASR + NLP + Vision, slot-filling, Gemini + pgVector ANN) over a 10,000+ recipe / 30,000+ alias database for daily meal logging, resolving dish matches in ~2s (DB-backed) to 3–5s (LLM fallback) at ~90% accuracy. Powered a RAG meal-plan engine with behavioral signals and condition-specific diabetic constraints.

~2sDish match latency (DB-backed)
3–5sDish match latency (LLM fallback)
~90%Match accuracy
10K+ recipes / 30K+ aliasesKnowledge base
ASR + NLP + VisionpgvectorANNRAGBehavioral ModelingGemini

AI Coach — Conversational Health Agent Platform

TapHealth · AI Engineer · Dec 2025 – Jul 2026

Shipped to production

Rebuilt a production conversational health-coaching agent's orchestration layer, then built its core nutrition capabilities on top.

Rebuilt the AI Coach's agent orchestration layer — replacing an initial LangGraph state machine and dual-layer Mem0 memory setup with the Vercel AI SDK's bounded tool-calling loop and a single HindSight episodic-memory layer. Built a 2-channel (WhatsApp, Telegram) conversational agent on a 13-step-max tool-calling loop with a YAML-defined skill registry, driven by 16+ Kafka-consumed event domains for real-time patient state. On that foundation, built a single-call 3-tier meal-logging resolution engine (personal history → pgVector search → LLM fallback), an LLM-driven diet-plan generator combining ClickHouse history with agent memory, and a 4-state glucose feedback engine closing the log → feedback → plan loop.

WhatsApp + TelegramChannels
13-step maxTool-calling loop
16+ Kafka-consumedEvent domains
Vercel AI SDKKafkaHindSightRedisClickHouseLangfuseOpenTelemetrypgvectorPostgreSQL

Vision-Language Model Fine-Tuning for Food Recognition

TapHealth · AI Engineer · Jul 2025 – Oct 2025

Shipped to production

Fine-tuned and compressed a vision-language model for on-device food recognition.

Led end-to-end fine-tuning of a vision-language model for food recognition: curated 300,000+ training samples with quantity-aware supervision, then quantized and packaged the model for edge deployment — compressing it roughly 68% (6GB to 1.9GB via INT4 GGUF) while keeping end-to-end inference latency at 6 seconds or less on-device.

300K+ samplesDataset
6GB → 1.9GB (~68%, INT4 GGUF)Compression
≤6sEdge latency
Qwen3-VL-2BLoRA / QLoRAUnslothGGUF / INT4KV-Cachellama.cpp
04 / skills

Toolbox

Machine Learning

PyTorchTensorFlowScikit-LearnComputer VisionNLPLarge-Scale Training Pipelines

Fine-Tuning & Optimization

LoRAQLoRASFTUnslothTRLLLaMA-FactoryGGUFINT4 Quantizationllama.cppvLLM

Generative AI & LLMs

LLM/VLM System DesignRAG PipelinesPrompt EngineeringMulti-Agent & Tool-Calling Systems

LLM Orchestration

Vercel AI SDKLangGraphLangChain

Agentic Systems & SDKs

MCPGemini SDKOllamaHindSightMem0

Backend & Data Infra

RedisKafkaPostgreSQLClickHouse

Observability

LangfuseOpenTelemetryDistributed TracingCost & Performance Optimization

Vector Databases

pgvectorSemantic SearchEmbedding Pipelines

Programming

PythonPandasNumPySciPySQLOpenCVNLTKStreamlitHugging Face Transformers

Deployment & MLOps

DockerGitCI/CDEdge AI DeploymentScalable Inference Systems

Data & Analytics

Power BIMatplotlibSeabornSQL
05 / research & education

Research & Education

Research & Publications

Climate Change Effects on Crop Production: Precision Agriculture via Data Science

ICICES 2023 / IET DAVV · 2023

Published research paper on data-driven precision agriculture.

SERB-Funded Research Internship — Behavioral Biometrics

IIT Patna · 2023

Multilingual handwriting analysis across 1,200+ pages and 40+ authors for a SERB-funded research project.

Education

B.Tech, Computer Science & Engineering

Indore Institute of Science & Technology (RGPV University)

2020 – June 2024 · CGPA 8.71

06 / contact

Get in touch

Open to new opportunities, or happy to discuss GenAI systems. Reach out at divyanshr988@gmail.com, or use the form below.