Semantic Cache with Redis to Cut AI API Costs
How semantic caching cuts model spend, how to set the Redis distance threshold from measured data instead of a guess, and when a cache hit is unsafe.
10 posts in AI Engineering

How semantic caching cuts model spend, how to set the Redis distance threshold from measured data instead of a guess, and when a cache hit is unsafe.

How RAG systems leak documents they should not, what OWASP LLM08 calls vector weaknesses, and the schema, sync, and tests that enforce permissions at retrieval.

A working decision matrix for fine-tuning versus RAG: what each architecture is actually good at, real cost ranges, and how to measure the choice.

Hybrid search in PostgreSQL with pgvector: chunk-level embeddings, reciprocal rank fusion SQL, filtered ANN scans, and how to measure recall before you ship.

Build and secure custom Model Context Protocol (MCP) servers in TypeScript to connect AI desktop assistants to private internal APIs.

Combine Playwright headless automation with LLM schema extraction to build resilient web data pipelines that survive DOM redesigns.

Detect prompt regressions, format breakage, and model output drift in production web apps using automated CI evaluation pipelines.

Enforce 100% type-safe JSON API responses from language models using Zod schemas and provider-native constrained decoding in web apps.

A working playbook for AI-assisted refactoring of legacy codebases: characterization tests, seam-by-seam cuts, codemods versus LLM edits.

How to defend web applications and AI tools against direct and indirect prompt injection: the lethal trifecta, capability design, tool gating, and red-team tests.