Skip to main content
grayswork
Back to portfolio

Python / FastAPI / PostgreSQL + pgvector / pydantic-ai / psycopg 3 / Docker / GitHub Actions

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.

Hybrid recall@1
97.2%
Tests, no external services in CI
111
What it took
  1. 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.
  2. Hybrid retrieval: vector kNN and pg_trgm trigram rankings fused with RRF, because tsvector cannot segment Chinese.
  3. A 20-document / 36-question retrieval benchmark, shipped with an honest reading of what it cannot yet prove.
04Contact
Where
New Taipei, Taiwan · UTC+8
Status
Graduating June 2026 · open to software engineering roles

Say something specific

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

Or leave a message here
Gray Tsao© 2026 · Last updated October 2026