# Engineering notes

> Technical notes by Pratham Shah on RAG retrieval, CloudFront signed cookies for HLS, and streaming uploads to S3, each drawn from his own code.

Canonical: https://pshah.fun/notes
Last updated: 2026-10-21

Short write-ups of specific decisions in my own repositories: what the code does, why, and the trade-off it accepts. Each note links to the code it describes.

- [RAG retrieval that degrades instead of returning nothing](https://pshah.fun/notes/rag-retrieval-that-degrades-gracefully) - How InsightVault’s query path handles weak matches, and the embedding-dimension trade-off behind a multi-provider fallback chain. (28 September 2026; AI, RAG, Postgres)
- [Protecting HLS video with CloudFront signed cookies](https://pshah.fun/notes/protecting-hls-with-cloudfront-signed-cookies) - Why signed cookies fit HLS better than signed URLs, and how StreamVault issues them after a Cognito PKCE sign-in. (28 September 2026; Cloud, AWS, Security)
- [Uploads that don’t grow server memory](https://pshah.fun/notes/zero-buffer-uploads-to-s3) - Streaming multipart uploads straight to S3 with multer-s3, and committing metadata only after S3 acknowledges. (28 September 2026; Cloud, Node.js, Storage)
