Gaurav
Welcome to my portfolio

Gaurav

AI Engineer

Self-taught AI Engineer. I turn real problems into working GenAI products — and I document the bugs I catch along the way.

Currently building FlowPrecheck. Open to remote AI/Backend engineering roles.

My Journey

About Me

I didn't start with a computer science degree — I started by building things and figuring out what broke. Three years later, that's still how I work: I ship a project, find the bug that a tutorial wouldn't have prepared me for, fix it, and write it down.

That habit is behind everything I build, from a hybrid-retrieval RAG system with 84% recall to a cross-session memory layer for LLM applications. I focus on handling the silent edge cases that most tutorials gloss over.

I'm a BCA student (S.L.N. Hindu College) and a self-taught engineer, building AI products and looking for a remote AI/Backend role.

Proven Capabilities

Featured Projects

Mini case studies documenting key engineering decisions and silent bugs caught along the way.

Retryv

RAG system over FastAPI documentation with hybrid retrieval and cross-encoder reranking

PythonFastAPIGemini APIChromaDBBM25Cross-EncoderStreamlit
Engineering Highlight

Improved retrieval recall from 23% to 84% on FastAPI docs after adding cross-encoder reranking (ms-marco-MiniLM-L-6-v2) to the BM25 + dense hybrid pipeline

Context

Most portfolio RAG setups wrap a basic embedding call with an LLM prompt. I built Retryv over FastAPI's documentation to test and fix the failure modes that show up when trying to make retrieval reliable: sparse ingestion, silent batch drops, and weak candidate recall.

The Problem

FastAPI's documentation is large and nested. Dense embeddings alone frequently miss exact keyword queries (like specific parameters or error codes), while BM25 misses semantic questions. Without reranking, retrieval recall on golden evaluation queries was stuck at 23%.

Technical Approach

I chunked FastAPI markdown docs using structure-aware partitioning and indexed them into ChromaDB (using Gemini embeddings) and BM25. Queries execute hybrid search combined with Reciprocal Rank Fusion (RRF, k=60), then pass the top 20 candidates through a local ms-marco-MiniLM-L-6-v2 cross-encoder to select the top 5 chunks. A calibrated confidence guard (threshold 0.025) halts generation when retrieved context is inadequate.

Key Engineering Decisions

Cross-Encoder Reranking over Candidate Pool

Reranking the top 20 RRF candidates down to 5 boosted retrieval recall from 23% to 84% on structure-aware chunks without bloating the generator's context window.

Structure-Aware Chunking over Fixed-Size Windows

Partitioning along markdown headers preserved document hierarchy and metadata, delivering 84% recall versus 76% for semantic chunking.

Confidence Guard Threshold

Checking RRF scores before hitting the LLM prevents hallucinated answers on out-of-domain queries by responding with a grounded refusal.

Bugs Caught & Fixed
  • Silent Batch-Embedding Truncation: Python's zip() silently truncated chunks when Gemini embedding batch responses returned fewer vectors than inputs. Fixed by asserting length parity on every batch.
  • Missing BM25 Pickled Indexes: The BM25 retriever failed silently on missing index files and returned empty lists, halving RRF scores and triggering the confidence guard. Fixed with strict file verification and validation checks.
  • Evaluation Selection Bias: The initial benchmark showed artificially high citation accuracy (74%) before reranking because the guard blocked 42 of 52 queries. Activating the reranker retrieved valid context for 3x more queries, lowering the average score to an honest 37% across harder queries.

FlowPrecheck

Live beta

Static analyzer for n8n workflows that flags failure patterns before shipping

PythonFastAPINext.jsPostgreSQLn8n
Engineering Highlight

Tested against 6 failure patterns in a public n8n forum beta, catching unhandled error branches and hardcoded secrets

Context

n8n workflows automate critical business operations, but runtime failures often happen because of silent structural mistakes like unhandled error triggers or hardcoded keys. I built FlowPrecheck as a static analyzer that inspects workflow definitions before deployment.

The Problem

Developers ship workflows without realizing that an HTTP node failure will drop silently if error branches are disconnected, or that API keys were accidentally hardcoded directly into node parameters. Debugging these after production failure is slow and risky.

Technical Approach

Accepts sanitized workflow JSON exports only and performs AST-like structural traversal across node graphs—it never executes workflows or touches external services. It checks for patterns like disconnected error branches (GF-HTTP-001) and hardcoded credentials/secrets (GF-SEC-001, redacted in output).

Key Engineering Decisions

Zero-Execution Static Analysis

Analyzing sanitized JSON graphs without executing workflows eliminates security risks, API credential exposure, and execution side-effects.

Deterministic Rule Codes

Every rule emits a tagged code (e.g., GF-HTTP-001, GF-SEC-001) with line-level node paths and remediation guidance rather than vague warnings.

Public Forum Beta Testing

Ran a public beta on the n8n community forum where developers submitted workflows with planted bugs to test detection rules against real-world edge cases.

Bugs Caught & Fixed
  • Switch/IF vs Error-Output Branch False Positives: Early versions confused conditional branching outputs with dedicated error-handling branches on multi-output nodes. Forum feedback helped isolate node connection indices to eliminate the false positives.
Not Supported Yet

Workflow-level Error Workflow checks, webhook authentication and immediate-response semantics, and Code-node paired-item execution analysis are not supported yet.

Agent Orchestration System

Multi-agent framework with supervisor delegation, OpenTelemetry tracing, and checkpoint replay

LangGraphFastAPIRedisPostgreSQLChromaDBOpenTelemetry
Engineering Highlight

End-to-end tracing with self-hosted OpenTelemetry and deterministic state replay from Postgres checkpoints

Context

Autonomous multi-agent systems frequently fail in unpredictable ways without visibility into sub-agent handoffs, tool executions, and state mutations. I built an orchestration engine to give developers inspectability, human control, and reproducibility over agent workflows.

The Problem

Coordinating specialist agents (research, analysis, code execution) without centralized state leads to infinite loops, unmonitored external tool mutations, and zero ability to debug why a specific plan diverged.

Technical Approach

Built on LangGraph with a Supervisor-Specialist-Reviewer architecture. The supervisor breaks user goals into dependency graphs; specialists execute bounded tools; a reviewer agent evaluates quality. Sensitive tool executions trigger human-in-the-loop (HITL) pause via WebSockets. Every plan, tool call, and token metric is recorded with OpenTelemetry into PostgreSQL, and any task can be replayed forward from an AsyncPostgresSaver checkpoint.

Key Engineering Decisions

LangGraph State Machine with Postgres Checkpointing

Using typed graph transitions and AsyncPostgresSaver allows pausing execution indefinitely for human approval without losing memory or relying on long-lived process state.

Self-Hosted OpenTelemetry Tracing

Ingesting hierarchical span trees directly into PostgreSQL provides full latency, prompt, and token cost visibility without third-party SaaS dependencies.

Deterministic Checkpoint Replay

I can branch off any historic checkpoint_id with overridden parameters to reproduce edge cases and evaluate alternative model prompts side-by-side.

Bugs Caught & Fixed
  • Supervisor Free-Text Schema Parsing: Gemini API occasionally returned schema formatting quirks on nested plan dictionaries that caused pydantic validation crashes. Resolved by building a resilient validation layer with structured schema retries.
  • Process-Bound Span Mapping: An in-memory trace-to-task dictionary lost context during worker thread restarts. Refactored the span tracking pipeline to persist task associations reliably.

LLM Gateway

Resilience proxy routing across Gemini, Claude, Groq, and Ollama with distributed rate limits

PythonFastAPIRedisPostgreSQLPrometheusGrafanaDocker
Engineering Highlight

~1.4ms median overhead and under 10ms at p95 with Redis Lua rate limiting and automated circuit breaking

Context

Directly integrating multiple LLM APIs into applications leads to vendor lock-in, uncoordinated rate limits, and cascading downtime when an upstream provider degrades. I built a unified gateway proxy to handle routing, limits, and failovers transparently.

The Problem

Applications need a single endpoint that can switch models on failure, protect monthly team budgets, and enforce tokens-per-minute (TPM) limits across distributed workers without adding measurable request latency.

Technical Approach

FastAPI proxy sitting in front of Gemini, Claude, Groq, and Ollama. Uses Redis with atomic Lua scripts for token-bucket rate limiting and monthly budget tracking in USD (tracked to 8 decimal places). Implements distributed circuit breakers (Closed/Open/Half-Open) that automatically fall back to secondary providers on 5xx errors or timeouts, while exporting real-time metrics to Prometheus and Grafana.

Key Engineering Decisions

Atomic Redis Lua Token Bucket

Evaluating RPM and TPM atomically inside Redis via Lua scripts eliminated race conditions under high concurrency and enabled sub-millisecond cooldown calculations.

Differentiating Provider Rate Limits from System Outages

Created a dedicated ProviderRateLimitError with trips_circuit=False so upstream 429 quota exhaustion warns the caller instead of falsely tripping circuit breakers and disabling fallback routing.

Low-Overhead Architecture

Benchmarked with k6 to maintain ~1.4ms median overhead and under 10ms at p95 across concurrent requests.

Bugs Caught & Fixed
  • Lua Token Bucket Script Crash: An uninitialized retry_after variable in the Redis Lua script triggered silent failures under load, causing the limiter to fail open. Rewrote the Lua return logic to explicitly compute math.max(rpm_wait, tpm_wait).
  • Database Pool Starvation Under Load: High-concurrency k6 load testing (50+ virtual users) exhausted the default PostgreSQL connection pool. Scaled the connection pool size to 50 with 10 max overflow to prevent request queuing.

MemoryOS

Universal cross-session AI memory layer with relevance-based context injection

Next.jsNestJSPostgreSQLpgvectorRedisBullMQChrome Extension
Engineering Highlight

Context-injection engine that queries semantic vectors asynchronously via BullMQ without bloating prompt tokens

Context

LLM applications are stateless by default—every new session starts from scratch. I built MemoryOS as an external, application-agnostic memory layer so any browser workflow or AI app can recall relevant prior context automatically.

The Problem

Users re-explain background context repeatedly across sessions and tools. Most memory implementations either dump raw chat transcripts (bloating context and tokens) or lock data inside a single platform.

Technical Approach

Built a NestJS backend with PostgreSQL + pgvector for semantic vector similarity search. Memory writes and embedding generation run asynchronously through BullMQ and Redis so user requests stay fast. A Plasmo-based Chrome extension intercepts web AI interfaces to inject only relevant memories into active prompts.

Key Engineering Decisions

Asynchronous Queue Writes via BullMQ

Separating fast query reads from slow embedding and write operations keeps the service responsive during heavy conversation flow.

Relevance-Gated Context Selection

Rather than dumping entire conversation histories, a scoring filter selects only memories exceeding a similarity threshold to keep token usage lean and avoid confusing the model.

Browser Extension Delivery

Using a Chrome extension allows injecting memory context into any web-based AI tool I use (ChatGPT, Claude web UI) without needing custom API integrations per platform.

Bugs Caught & Fixed
  • BullMQ Payload Truncation: Nested payload objects were silently dropped during Redis queue serialization. Fixed by introducing strict Zod schema parsing before pushing jobs to the queue.

RankFuse

Open-source Python library for hybrid RAG retrieval with dense, sparse, and reranker fusion

PythonChromaDBBM25Cross-EncoderPyPI
Engineering Highlight

Published PyPI library (pip install rankfuse) combining dense + BM25 search via RRF with optional local cross-encoder reranking

Context

Standard RAG pipelines rely solely on dense embeddings, which frequently miss exact keywords, part numbers, or error codes. After implementing hybrid retrieval in Retryv, I packaged the core architecture into a standalone, lightweight open-source library.

The Problem

Developers wanting hybrid search often have to adopt heavy, opinionated frameworks. There was no lightweight (~20MB), config-driven library to simply plug hybrid dense + sparse retrieval into an existing codebase with BYOK (bring-your-own-key) simplicity.

Technical Approach

Designed a clean two-method interface (ingest() and search()). Runs ChromaDB dense search in parallel with rank-bm25, merges results with Reciprocal Rank Fusion (RRF), and offers optional precision passes via local ms-marco-MiniLM-L-12-v2 cross-encoders or Gemini LLM-judges. Packaged and published on PyPI.

Key Engineering Decisions

Lightweight Core Installation

Kept core dependencies (~20MB) free of PyTorch and heavy binaries by making sentence-transformers an optional extra (pip install rankfuse[cross-encoder]).

Score-Agnostic Reciprocal Rank Fusion

Using RRF merges dense and sparse results based on rank positions rather than normalizing incompatible raw similarity scores.

Swappable Components Architecture

Defined abstract Embedder and VectorStore base classes so developers can swap in custom embedding providers or storage backends.

Bugs Caught & Fixed
  • BM25 Keyword Concentration on Release Notes: Benchmarking revealed that release notes documents caused keyword clustering, inflating BM25 scores for non-tutorial queries. Documented corpus diagnostic trade-offs directly in the published benchmark reports.
Technical Expertise

Skills & Focus Areas

Categorized skillset highlighting specialized GenAI expertise and supporting web engineering.

GenAI / LLM

LangGraphLangChainRAGHybrid RetrievalCross-Encoder RerankingChromaDBGemini APIEmbeddings

Backend

PythonFastAPIREST APIsn8nNestJSNode.js

Frontend

Next.jsReact

Infra / DB

PostgreSQLpgvectorRedisOpenTelemetryPrometheus/GrafanaDocker/VPS
Work History

Internships & Experience

Founder & Developer

Sept 2026 - Present
FlowPrecheck•Self-employed
  • Built a static analysis engine for n8n workflows that flags unhandled error branches, missing retries, and exposed secrets before deployment
  • Ran a public beta with n8n community developers who tested detection rules against real workflows and planted bug patterns
  • Fixed analyzer false positives and branch detection bugs based on reproducible reports from beta testers

Python Development Intern

June 2026 - July 2026
CodeAlpha•Remote
  • Engineered an intent-matching console chatbot with case-insensitive token normalization, dictionary-based intent routing, and graceful exit handling
  • Built an automated email extraction CLI using robust regular expression patterns, set-based deduplication, and defensive file I/O pipelines
  • Structured modular, import-safe Python architectures following clean single-responsibility functions with zero external dependency overhead

Python Development Intern

July 2026 - August 2026
Cognifyz IT Solutions•Remote
  • Developed automated Python web scrapers to extract and parse structured directory listings
  • Created reusable data-processing and cleaning utility scripts for tabular data pipelines

Python Development Intern

July 2026 - August 2026
Oasis Infobyte (OIBSIP)•Remote
  • Built a multi-user TCP socket chat server and GUI client using Python threading for real-time concurrent message broadcasting and graceful teardown
  • Engineered a desktop voice assistant integrating speech-to-text, offline TTS (pyttsx3), and OpenWeatherMap REST API / Wikipedia data ingestion
  • Developed a data tracking desktop application with SQLite3 persistence, input sanitization, automated unit tests, and Matplotlib historical trend analysis
Get in touch

Currently open to work

Looking for remote AI/Backend engineering roles, and open to freelance/contract work in the meantime. Fastest way to reach me is email or LinkedIn.