PitchPilot & rag-demo: Retrieval-Augmented Generation
PitchPilot is a copilot for field sales reps: a TypeScript edge function embeds the question with Gemini, searches pgvector inside the rep's tenant and grounds the answer in what it retrieved, re-embedding only the chunks whose content changed. When an IVFFlat index started returning nothing on a few hundred rows, I replaced it with exact search. rag-demo is a small open-source Python version of the same idea: overlapping chunks, local embeddings, pgvector and a Gemini answer that cites the files it used, with offline tests in CI.