PIERRE · COMPASS
M1 – M5 SHIPPED

A senior support engineer
for the PIERRE ecosystem.

Compass answers installation, wiring and product questions for distributors, system integrators and internal support — grounded in the PIERRE wiki, datasheets, install videos and live B2B data, and scoped to what each partner is actually allowed to see.

11
AI tools
4
Knowledge sources
3
Channels
4
Confidence levels
CAPABILITIES

What it does

Not a chatbot wrapped around a manual. Every answer is assembled from retrieved evidence and live system data, then checked before it reaches the partner.

Grounded product Q&A

Semantic search over the ingested wiki, product docs, technical rulebook and video transcripts. Answers carry citations back to the exact chunk, and product replies link straight to the partner-portal manual.
pgvector · BGE reranker

Wiring & pin guidance

Documented pin layouts and rulebook-approved wiring rules, rendered as pin diagrams — never inferred, always sourced.
getWiringRules · getProductPinLayout

Connection diagrams

Draws a wiring diagram for two or three participants — PIERRE modules, rulebook loads and a 230 V AC mains bar — using only approved pin pairs. Ambiguous parts stop the draw and trigger a clarifying question instead of a guess.
getConnectionDiagram

Project-aware answers

Accessible projects, building configuration and live device status, resolved per user and enforced server-side against a Portal-sourced permission map.
Operation Portal

Image support

Product recognition and anomaly detection only — “burnt area”, “exposed conductor”. Polarity inference and terminal mapping from a photo are deliberately out of scope.
restricted scope

Escalation to a ticket

When the answer isn't in the knowledge base, Compass opens a Portal ticket with the conversation summary — and resolved tickets can be promoted back into the knowledge base.
createSupportTicket
THE INTERESTING PART

How it decides what it's sure about

Confidence is never self-reported by the model. It's computed from five measured signals, with hard rules that no score can override.

SIGNALS
  1. 1Retrieval scoreTop-1 cosine similarity against a calibrated threshold.
  2. 2Multi-source agreementTwo or more independent sources must agree.
  3. 3Evidence requirementElectrical claims must cite a retrieved source.
  4. 4Vision uncertaintyKept as its own field — never folded into retrieval.
  5. 5Topic classifierElectrical and wiring questions get stricter thresholds.
HARD RULES

An electrical answer with no citation is forced to LOW, whatever the score says. A wiring question answered from a photo alone becomes SAFETY_RISK — Compass refuses and asks for the datasheet instead.

LEVELS
HIGHMEDIUMLOWSAFETY_RISK
STATUS

What's built

All five milestones are in the repository. Below is what each area actually contains today.

Orchestrator
A bounded agentic loop with a per-turn budget and a role-scoped tool registry: 11 tools covering products, pin layouts, wiring rules, connection diagrams, projects, buildings, device status and ticket creation. Session state lives in Redis.
Knowledge layer
Four connector types — wiki, youtube, product_doc, rulebook — with scheduled syncs, trust tagging, soft-delete and freshness tracking. Retrieval pulls a 50-candidate pool from pgvector, then re-orders it with the self-hosted BGE cross-encoder.
Channels
PWA chat with token-by-token streaming and live tool status over Socket.io, plus WhatsApp and Telegram inbound webhooks. Channel identities bind to a PIERRE user through a pairing token — no phone-number-only trust.
Multi-tenancy
Tenants with subscription status, usage metering, per-tenant budget caps and alerts. Tool-call scoping is enforced server-side; the model never supplies its own scope.
Admin console
Ten surfaces: overview, tenants, knowledge, connectors, eval / test chat, ticket reviews, users, admins, audit log, and an architecture walkthrough.
Compliance
Append-only audit log across ten event types — every message, response, tool call, retrieval, permission decision, billing event and image access. Prometheus metrics on /metrics.
Extras
Voice message transcription, PWA push notifications, image upload to S3/MinIO with EXIF stripping, and failure-mode UX for LLM timeouts and Portal outages.
Data model
22 Prisma models across 16 migrations.
STACK
Frontend
Next.js 14 · React · Tailwind · Socket.io · PWA
API
NestJS · Prisma · BullMQ workers
Data
PostgreSQL + pgvector · Redis · MinIO / S3
AI
gpt-4o · text-embedding-3-large · BGE reranker sidecar
Ops
Docker Compose → Swarm · GitLab CI/CD · Prometheus
TESTED

Four layers, because an LLM system fails in ways a unit test can't see.

Unit (API)
Jest — 5 spec files
Unit (frontend)
Vitest + Testing Library — 5 spec files
LLM regression
25-query golden set across 6 categories
E2E
Playwright against the running stack
NOT DONE YET

What this environment doesn't do

Worth knowing before you read too much into a local demo.

The Portal is mocked here

Project, building and device data comes from an in-memory fixture in local dev. The real HTTP client exists and switches on with PORTAL_MOCK_MODE=false, but the contract still needs to be finalised against the live Portal.

Billing isn't exercised

Usage metering, budget caps and alerts run. The Stripe subscription flow is wired but has never been driven against a real account.

Parked by design

Rule-based wiring pre-flight validation, automatic video frame extraction, a planner/executor agent split, and offline PWA field mode are all still in the parking lot. End users remain out of scope — this is partner-facing only.