Skip to content
Janclab Matija Janc · Platform & AI engineer
AI & LLM · live

HomeWise AI Concierge

A production LLM guest concierge in PHP: one structured model call, server-enforced scope, and repeat questions answered in ~2 ms for zero tokens.

Live, in your browser — not a screenshot.

~2 ms cached answer
0 tokens on repeat questions
p90 6.6 s live call (n=26)
1,880 LOC engine

Problem

Guests repeatedly ask for Wi-Fi, parking and checkout details, often late at night and in different languages. An LLM can answer them, but the product fails if it invents property facts, leaks scope or creates unpredictable cost.

What I built

A multi-tenant PHP concierge for shared hosting. Each property supplies a Markdown knowledge base; one structured Claude call returns scope, answer and escalation fields. Rate limits, spend caps and allowlists run before the model. Prompt caching reduces live-call cost, while a property + language + KB + question cache serves repeat questions in ~2 ms for zero tokens.

The hard part

The first version used one model call to classify scope and another to answer. It doubled latency but added no reliable safety: if the classifier was fooled, the answer call still saw the full knowledge base.

I replaced both with one structured call and made the server enforce the boundary. When in_scope is false, PHP discards the model reply and returns a fixed deflection. The model may misclassify; it never gets final authority over whether its answer is shown.

Results

It is live on the shared host it was designed for. Measured live latency is 3.1 s median and 6.6 s p90; repeat questions avoid the model entirely. The engine is bilingual, dependency-light and covered by explicit privacy and processor rules.