Started 2026 · Live web app
Chicago Public Schools families deal with scattered PDFs, policy pages, calendars, and announcements across multiple languages. I built Ask CPS, a multilingual agentic RAG web app on the Pocket CPS website, to make those school answers easier to find and verify.
How Ask CPS works
Rather than running a single static vector lookup, Ask CPS uses a backend agent that chooses the right tool for each question:
- Hybrid document retrieval: Combines PostgreSQL full-text search and
pgvectorsemantic similarity search with reciprocal rank fusion (RRF). - Structured calendar queries: Queries structured school-calendar data directly when questions depend on exact dates, holidays, or schedule windows.
- Agent-directed follow-ups: Uses the Pi TypeScript SDK in a TypeScript/Node.js backend so the agent can ask for clarification or run follow-up searches before answering.
- Source citations & multilingual support: Grounds every answer in retrieved passages with links back to original school sources across multiple languages.
Retrieval evaluation
In an expanded retrieval benchmark across 210 queries over an 80-document evaluation corpus, hybrid search achieved 92.9% source hit@6 (195/210, MRR@6 = 0.715, median retrieval latency 509 ms), with subsequent evaluation iterations reaching 93.9% source hit@6.
Stack: TypeScript · Node.js · PostgreSQL · pgvector · Pi Agent SDK