Hybrid Search with pgvector & BM25
How I combined dense vector search with BM25 keyword scoring to get retrieval quality that neither approach achieves alone. Reciprocal Rank Fusion merges both result lists.
> ls notes/
Short-form technical writing. Lessons from building things that actually work.
How I combined dense vector search with BM25 keyword scoring to get retrieval quality that neither approach achieves alone. Reciprocal Rank Fusion merges both result lists.
Building a provider-agnostic adapter that falls back from Gemini to Claude transparently, with streaming SSE preserved across the switch.
Regex patterns catch obvious attacks fast. A lightweight LLM classifier handles the subtle ones. Three strikes → shadow-limit. How I keep the AI twin honest.
Using Fernet symmetric encryption with PBKDF2 key derivation to encrypt visitor chat messages in PostgreSQL. GDPR Article 32 compliance without sacrificing query performance.
Chunking, embedding, and indexing documents without blocking the API. Celery workers process uploads in the background while the user gets immediate feedback.
Instrumenting a FastAPI app with OpenTelemetry, exporting traces to Grafana Tempo and metrics to Prometheus. What actually matters vs. what's noise.
Want to discuss any of these topics?
Ask the AI twin →