Applied AI / Customer-facing LLM
A public AI assistant on a company website, answered by a local model
AnnaTech - annatech.pl, in production since July 2026
- cloud AI calls - every answer is generated on our own hardware
- 0
- inference backends with automatic failover
- 2
- messages per visitor per hour, 20 turns per conversation
- 30 / h
- lines of gateway code - small enough to audit in an afternoon
- 364
Architecture at a glance
Context
Most companies want an assistant on their website, and most are told the only practical way is a cloud API - which means every visitor question, including the sensitive ones, leaves the company. We wanted the opposite as a live demonstration: a public chat on a public site where nothing leaves the network, and where a visitor can test the claim by asking.
Constraint
Public means adversarial. The assistant had to survive misuse without an operator: per-visitor rate limits, a cap on conversation length, a hard message size, and no way to extract more than the company chooses to say. It had to respect GDPR by design: no cookies, visitor addresses stored only as salted hashes, and a visible notice that conversations are kept. And it had to stay responsive on hardware that also runs other workloads.
Architecture
The browser talks only to the site's own origin. Behind it, a FastAPI gateway assembles each request: a maintained knowledge file with the company's positioning, delivered work and the rules on what may not be discussed, the last six exchanges of the conversation, and the visitor's message. The model is a 35B mixture-of-experts open-weight model on an Apple-silicon inference node; if it does not answer within five seconds, the gateway fails over to a GPU node running a 27B model, and a failure after streaming has begun is reported to the visitor instead of hanging.
Answers stream token by token with the model's hidden reasoning filtered out. Because the same inference node also runs batch research jobs, every accepted chat request raises a priority flag that batch workers honour before each model call - the visitor is never queued behind a background task. Every conversation is stored for review, so the knowledge file improves from real questions rather than guesses.
Outcome
Live on annatech.pl since July 2026, at the bottom-right of every page. The same gateway pattern - knowledge injection, limits, failover, audit trail - transfers directly to an internal helpdesk, an intranet assistant or a customer-facing chat where the questions must stay in the building.
From the workbench
14:02:11 INFO session 7f3a… turn 1/20 · visitor a91c3e (salted hash) · 3/30 this hour 14:02:11 TRACE prompt knowledge file + last 6 exchanges + message (412 chars) 14:02:11 TRACE priority flag raised -> batch research workers yield 14:02:12 TRACE primary stream started · reasoning filtered · 700 tokens max 14:02:19 INFO stored assistant reply · via primary 14:05:40 WARN primary connect timeout 5 s -> failover to GPU node 14:05:41 TRACE failover stream started · reply stored · via failover -------- turn 21 -> limit message with the direct email · >1,500 chars -> 413 · 31st msg/hour -> 429
Illustrative trace. Limits, failover order and the transcript rules are exactly as delivered.
More work
Related case studies
Talk to the person who will actually build it
One architect, end to end: scoping, architecture, delivery, operations. Write a paragraph about your problem and you will get an engineering answer, not a sales call.