DEV Community

Ali Ahmed profile picture

Ali Ahmed

404 bio not found

Joined Joined on  github website
The transactional outbox pattern in Node.js: never lose an event when the database commits

The transactional outbox pattern in Node.js: never lose an event when the database commits

Comments
4 min read
Request IDs in Node.js logs with AsyncLocalStorage: trace one request through every await

Request IDs in Node.js logs with AsyncLocalStorage: trace one request through every await

Comments
4 min read
Parsing a streamed LLM response in Node.js: Server-Sent Events, split chunks and the CRLF bug

Parsing a streamed LLM response in Node.js: Server-Sent Events, split chunks and the CRLF bug

Comments
5 min read
Graceful shutdown in Node.js: draining HTTP requests on SIGTERM without dropping traffic

Graceful shutdown in Node.js: draining HTTP requests on SIGTERM without dropping traffic

Comments
4 min read
Correcting MRZ OCR errors with check digits: O vs 0, I vs 1, and when not to guess

Correcting MRZ OCR errors with check digits: O vs 0, I vs 1, and when not to guess

Comments
4 min read
Finding near-duplicate documents with MinHash and LSH before you index them for RAG

Finding near-duplicate documents with MinHash and LSH before you index them for RAG

Comments
4 min read
Limiting concurrent async calls in Node.js without a library: a 15-line promise pool

Limiting concurrent async calls in Node.js without a library: a 15-line promise pool

Comments
3 min read
Canary tokens for LLM apps: detecting system prompt leaks and injected exfiltration

Canary tokens for LLM apps: detecting system prompt leaks and injected exfiltration

Comments
4 min read
Verifying JWTs in Node.js: alg none, algorithm confusion, audience checks and clock skew

Verifying JWTs in Node.js: alg none, algorithm confusion, audience checks and clock skew

Comments 1
4 min read
Detecting homoglyph names in Python: Cyrillic look-alikes, fullwidth letters and zero-width spaces

Detecting homoglyph names in Python: Cyrillic look-alikes, fullwidth letters and zero-width spaces

Comments
4 min read
Semantic caching for LLM apps: when reusing an answer is safe, and when it's a bug

Semantic caching for LLM apps: when reusing an answer is safe, and when it's a bug

Comments
4 min read
Validating a Pakistani CNIC number: the 13-digit format, what the digits mean, and what format checks can't tell you

Validating a Pakistani CNIC number: the 13-digit format, what the digits mean, and what format checks can't tell you

Comments
3 min read
Luhn and IBAN check digits explained: validating card numbers and bank accounts in Python

Luhn and IBAN check digits explained: validating card numbers and bank accounts in Python

Comments
4 min read
Rate limiting LLM API calls in Node.js: a token bucket for requests and tokens per minute

Rate limiting LLM API calls in Node.js: a token bucket for requests and tokens per minute

Comments
4 min read
Catching reused ID photos with perceptual hashing: dHash in Python for KYC fraud

Catching reused ID photos with perceptual hashing: dHash in Python for KYC fraud

Comments
4 min read
Fuzzy name matching for sanctions screening: normalisation, transliteration and Jaro-Winkler

Fuzzy name matching for sanctions screening: normalisation, transliteration and Jaro-Winkler

Comments
5 min read
Which century is 74? Parsing MRZ dates of birth and expiry correctly

Which century is 74? Parsing MRZ dates of birth and expiry correctly

Comments
4 min read
Trimming chat history to fit the context window without breaking tool calls

Trimming chat history to fit the context window without breaking tool calls

Comments 1
4 min read
Retrying LLM API calls: exponential backoff, jitter, Retry-After and model fallbacks

Retrying LLM API calls: exponential backoff, jitter, Retry-After and model fallbacks

Comments
4 min read
Idempotent webhooks in Node.js: handle every event once, even when it's delivered twice

Idempotent webhooks in Node.js: handle every event once, even when it's delivered twice

1
Comments
4 min read
Hybrid search for RAG: BM25 plus vectors, merged with reciprocal rank fusion

Hybrid search for RAG: BM25 plus vectors, merged with reciprocal rank fusion

Comments
4 min read
How Rosetta, Wine and DXVK run software on machines it was never built for

How Rosetta, Wine and DXVK run software on machines it was never built for

Comments
2 min read
How to evaluate a RAG system: recall@k, MRR and groundedness, with code

How to evaluate a RAG system: recall@k, MRR and groundedness, with code

Comments 1
4 min read
How LLM tool calling works: the loop, the schema, and the mistakes that break agents

How LLM tool calling works: the loop, the schema, and the mistakes that break agents

Comments
3 min read
What is the Model Context Protocol (MCP)? Tools, resources, transports and auth, explained by someone who built a server

What is the Model Context Protocol (MCP)? Tools, resources, transports and auth, explained by someone who built a server

Comments
4 min read
Prompt injection from scraped data: guarding an LLM that writes outreach emails

Prompt injection from scraped data: guarding an LLM that writes outreach emails

Comments
4 min read
How to build a fully offline RAG chatbot with Ollama, Mistral, ChromaDB and Redis

How to build a fully offline RAG chatbot with Ollama, Mistral, ChromaDB and Redis

Comments
3 min read
Why you can't average p95 latencies, and how to combine percentiles correctly

Why you can't average p95 latencies, and how to combine percentiles correctly

Comments
3 min read
How KYC identity verification works: document capture, OCR, face match and liveness, step by step

How KYC identity verification works: document capture, OCR, face match and liveness, step by step

Comments
4 min read
Face liveness detection explained: presentation attacks, injection attacks and how they're measured

Face liveness detection explained: presentation attacks, injection attacks and how they're measured

Comments
4 min read
How to evaluate AI agents: task success, tool-call accuracy, cost, and running each task more than once

How to evaluate AI agents: task success, tool-call accuracy, cost, and running each task more than once

Comments 1
3 min read
How wide are London's pavements? Measuring 7,908 cross-sections in Whitechapel

How wide are London's pavements? Measuring 7,908 cross-sections in Whitechapel

Comments
3 min read
Where do your environment variables go when you deploy?

Where do your environment variables go when you deploy?

Comments
3 min read
What is an LLM gateway? Why teams put LiteLLM between their apps and model providers

What is an LLM gateway? Why teams put LiteLLM between their apps and model providers

Comments
3 min read
What does an AI engineer do? A working definition, and what to look for when hiring one

What does an AI engineer do? A working definition, and what to look for when hiring one

Comments
3 min read
Error budgets and burn rates explained with code: what 14.4 means, and a maintenance-window bug

Error budgets and burn rates explained with code: what 14.4 means, and a maintenance-window bug

Comments
4 min read
Single agent or multi-agent? What I learned building a multi-agent financial intelligence system

Single agent or multi-agent? What I learned building a multi-agent financial intelligence system

Comments 1
3 min read
How to cut LLM API costs without making the product worse: caching, routing, batching and context

How to cut LLM API costs without making the product worse: caching, routing, batching and context

Comments
4 min read
RAG chunking strategies: fixed size, by heading, and what actually changes retrieval quality

RAG chunking strategies: fixed size, by heading, and what actually changes retrieval quality

Comments 1
3 min read
How passport MRZ check digits work, with code to validate them

How passport MRZ check digits work, with code to validate them

Comments 1
3 min read
Why OCR struggles with Arabic, Urdu and other non-Latin scripts, and what helps

Why OCR struggles with Arabic, Urdu and other non-Latin scripts, and what helps

Comments
4 min read
How NFC passport chip verification works: BAC, PACE, passive and chip authentication

How NFC passport chip verification works: BAC, PACE, passive and chip authentication

Comments
3 min read
Getting reliable JSON from LLMs: schemas, validation, retries and a deterministic fallback

Getting reliable JSON from LLMs: schemas, validation, retries and a deterministic fallback

Comments
3 min read
Why our AI agent looped forever: a context-compression bug in an LLM gateway

Why our AI agent looped forever: a context-compression bug in an LLM gateway

Comments
3 min read
KYC vs AML vs KYB vs CDD: what each means, and where AI fits in each

KYC vs AML vs KYB vs CDD: what each means, and where AI fits in each

Comments
3 min read
How can deployment platforms afford free tiers?

How can deployment platforms afford free tiers?

Comments
2 min read
Face match thresholds: how false accepts trade against false rejects in identity verification

Face match thresholds: how false accepts trade against false rejects in identity verification

Comments
3 min read
Embeddings and vector search explained: cosine similarity, HNSW and when to add keyword search

Embeddings and vector search explained: cosine similarity, HNSW and when to add keyword search

Comments
3 min read
Preparing ID card photos for OCR with OpenCV: find the card, flatten it, and reject blur and glare

Preparing ID card photos for OCR with OpenCV: find the card, flatten it, and reject blur and glare

Comments
3 min read
My AI-written code detector judged Python with a JavaScript model: lessons from building one for interviews

My AI-written code detector judged Python with a JavaScript model: lessons from building one for interviews

Comments
4 min read
A tamper-evident audit log for AI agents: three bugs in my hash chain, and the fix

A tamper-evident audit log for AI agents: three bugs in my hash chain, and the fix

Comments
4 min read
loading...