
TrailPack 20L
A compact 20-litre daypack for commuting and short hikes.
Chat with Dozie, an AI product assistant I built to answer questions in real time, enforce strict response boundaries, and handle restock alerts automatically.
Catalogue
Browse the six sandbox products. Click Ask Dozie about this product to open the chat with suggested questions for that product.

A compact 20-litre daypack for commuting and short hikes.

An adjustable LED desk lamp with four brightness levels and USB-C power.

A double-wall stainless-steel bottle intended for hot or cold drinks.

An enamel-coated steel mug for home or campsite use.

A rain cover for small and medium daypacks.

A lightweight, adjustable cap for everyday outdoor use.
Workflow
Dozie runs as a live chatbot on this page. The steps below show how each message is handled — from session isolation and rate-limiting to agentic tool use and automated restock alerts.
Chat opened
Dozie initialises with a session cookie. Conversation history is loaded from Redis, maintaining context across messages within the session.
Rate limit checked
Each session is capped at 30 messages per hour via Redis. Requests beyond the limit are rejected before reaching the model.
Context assembled
The full product catalogue, a version-controlled behaviour policy, today's date, and live capability status are injected into every request as the system prompt.
Policy enforced
The policy file defines Dozie's tone, scope, approved disclosure language, escalation triggers, and what must never be shared with visitors.
Agentic loop runs
GPT-4o-mini processes the message and may call tools — log_enquiry, signal_restock_consent, submit_handover — before composing a reply.
Answer grounded
All product replies are drawn strictly from the approved catalogue. Dozie does not speculate, invent specifications, or extrapolate beyond listed data.
Enquiry logged
Each conversation turn is logged to Redis with product SKU, category, confidence level, and action taken, for observability.
Restock consent
When a visitor explicitly agrees to a restock alert, a one-time consent token is recorded server-side and an email form is shown. The address never passes through the model.
Subscription saved
The restock subscription is stored in Redis with a cancel token. A cancellation link in every notification email lets the visitor opt out at any time.
Daily stock check
A scheduled worker compares current inventory against pending subscriptions, detecting transitions from out-of-stock to in-stock.
Notification sent
Resend delivers a restock email with a one-click cancellation link. The subscription is marked Sent to prevent duplicate alerts.
Escalation queued
Questions outside Dozie's scope — warranty, pricing, returns, legal — are submitted to a human review queue in Redis rather than answered by the model.
The restock worker runs daily on a Vercel Cron job. It detects stock transitions and triggers Resend to deliver notifications — it does not send emails itself. Subscriptions are marked Sent only after the provider confirms acceptance, so failures are retried on the next run rather than silently dropped.
Case study
Problem
Visitors need immediate, accurate answers to product questions without waiting for a human reply. Responses must stay within approved information, escalate when needed, and handle restock follow-ups automatically.
My contribution
I designed and built the chatbot end to end: the agentic loop, the behaviour policy, session and rate-limit infrastructure, restock consent flow, and the daily worker that detects stock changes and sends notifications automatically.
Technology
Design decisions
Validation
The following were tested manually and observed to behave as expected:
Limitations
Participation
Messages you send in the chat are processed by GPT-4o-mini and stored in a private Redis session that expires after 24 hours. If you opt in to a restock alert, your email address is stored separately and used only to send that notification. Please do not send sensitive personal information.
This is a publicly disclosed demo. All products and inventory are fictional. Participation is voluntary.