# Deliverist AI Chatbot

Case study by Devansh Tiwari (https://www.devanshtiwari.com) · https://www.devanshtiwari.com/work/deliverist-chatbot

Conversational commerce for Saudi logistics. RAG pricing, 5 AI tools, speech-to-text, bilingual.

## Key facts

- Role: Sole Product Engineer
- Client: OSIT / Deliverist
- Year: 2025
- Status: Shipped
- Tech: Next.js, Vercel AI SDK, DeepSeek, OpenAI, PostgreSQL, Drizzle ORM, Google Maps API, Whisper, LangChain

## At a glance

- Problem: Customers had to fill a 13-field form on their phone, often at the airport.
- What I built: A chat that quotes, books and tracks deliveries in Arabic or English.
- Result: Booking on a phone went from a long form to a short conversation.

## Numbers

| Metric | Value |
| --- | --- |
| Form fields to one chat | 13 → 1 |
| Faster replies | ~500ms |
| AI tools | 5 |
| Typed or spoken | EN + AR |
| API routes | 17 |
| Duration | 6 months |

Values with a + are public figures rounded down.

## The problem

Deliverist moves luggage between doors and airports across Saudi Arabia. Their customer-facing product was a static form with 13 fields. Nobody wants to fill that out on their phone at an airport. They needed a single conversational interface for quoting, booking, tracking, and complaints in English and Arabic.

## What I built

Conversational commerce layer that turns a chatbot into a transaction channel. Users go from "I want to ship something" to a confirmed booking without leaving the chat. 13-step shipment wizard embedded in the conversation. 5 AI tools for intent routing. RAG pipeline for dynamic pricing where updates happen by uploading a document, zero code changes. NLP entity extraction pre-fills forms from natural language. Speech-to-text with Whisper fallback. Bilingual with RTL.

### 13-Step Shipment Wizard

Embedded booking flow inside chat: pickup location, destination, item type, weight, dimensions, packaging, insurance, pickup date, delivery speed, payment method, COD toggle, special instructions, and confirmation. Each step validates via tool calls.

### RAG Pricing Pipeline

PDF pricing documents are chunked, embedded via OpenAI, and stored in PostgreSQL with pgvector. When a user asks for a quote, the system retrieves the relevant tariff rows and computes a live price. Updating prices requires uploading a new PDF, zero code changes.

### 5 AI Intent Tools

Vercel AI SDK tool calling routes user utterances to the right handler: quote, book, track, complaint, or FAQ. Each tool has a typed Zod schema and runs in parallel where possible. Intent detection happens in a single inference pass.

### Bilingual RTL with Speech

Full Arabic/English support with RTL layout via logical properties. Speech-to-text via Whisper handles Saudi dialects. Both languages share the same conversation state so users can switch mid-chat.

## Highlights

- Cut response latency ~500ms by migrating from two-step intent detection API to native Vercel AI SDK tool calling
- Unblocked product launch with a RAG pricing pipeline (PDF → OpenAI embeddings → PostgreSQL vector retrieval) when the backend pricing API wasn't ready
- 13-step shipment wizard embedded in chat turned a support tool into a transaction channel
- Bilingual EN/AR with full RTL, speech-to-text via Whisper, and iframe embedding for distribution

## Work with Devansh

Devansh Tiwari is an AI product engineer based in India, available for freelance and consulting work: custom data feeds from sites without APIs, AI features (agents, chat, RAG, MCP servers) built on that data, and running them after launch.

- Book a 15 minute call: https://cal.com/devansh0718/15min
- Email: devanshtiwari365@gmail.com
- All case studies: https://www.devanshtiwari.com/work
- Site summary for AI tools: https://www.devanshtiwari.com/llms.txt
