Bodha Mitra
A stateful LLM conversation engine that holds context across sessions. Serverless FastAPI backend, dependency-free React frontend, shipped as two Vercel projects from one repository.
- Retrieval calibrated on relative similarity, not a fixed cutoff. Measurement showed relevant and unrelated turns both landing near 0.58 cosine, which makes any absolute threshold meaningless. Candidates now have to clear 0.8 standard deviations above the pool mean plus a 0.63 gate, scored on 768-dim embeddings cut down from the 3072 default.
- State externalized to Postgres. Serverless functions are stateless by design, so conversation progress lives in structured Postgres rows instead of process memory. A cold start resumes exactly where the last turn ended.
- Five-layer guardrail system. Every turn passes layered checks on the way into the model and on the way back out, with the authentication path wired through the same flow.
The numbers that forced the switch from absolute to relative scoring.