Skip to main content
Gray Tsao
Personal project · May 2026 — nowRAG

Enterprise RAG Assistant

A RAG backend for enterprise knowledge bases: tenant isolation enforced in SQL, the tenant derived from the API key alone, and a lexical retrieval arm rebuilt on character trigrams for Chinese.

97.2%
Hybrid recall@1
111
Tests, no external services in CI
What it took
  • Tenant isolation lives in SQL: every table carries tenant_id, the tenant is derived from the API key, and the X-Tenant-Id header is ignored outright.
  • Hybrid retrieval: vector kNN and pg_trgm trigram rankings fused with RRF, because tsvector cannot segment Chinese.
  • A 20-document / 36-question retrieval benchmark, shipped with an honest reading of what it cannot yet prove.
PythonFastAPIPostgreSQL + pgvectorpydantic-aipsycopg 3DockerGitHub Actions
Contact

Say something specific

Email is fastest. I reply within a working day, usually with more questions than answers.

Or leave a message here
Where
New Taipei, Taiwan · UTC+8
Status
Graduating June 2026 · open to software engineering roles
Gray Tsao© 2026 · Last updated August 2026