The real reason some answers had no sources
When the Gemini embedding call failed, the old code quietly fell back to Cloudflare or Hugging Face models. They also produce 384-dimensional vectors, so nothing crashed, but their vectors live in a different space from the stored documents. Cosine similarity against the knowledge base dropped below the threshold and retrieval returned nothing.
Queries now use exactly one embedding model, the cache key includes the model name, and the seed scripts record which model embedded each row. I re-embedded a sample from every source with the live model and compared it with what was stored: each one came back with a cosine of 1.0000, so the 51 chunks stored at the time didn't need re-embedding. For resilience there is a backup key from a second Google project instead of a second model. Same model, same vectors, separate quota.
When nothing relevant is found, the bot is now told so explicitly, so it says it doesn't have that information instead of improvising.
