Warung Assistant
Summary
Warung Assistant is an AI-powered assistant built using Large Language Models (LLMs), LangChain, and Retrieval-Augmented Generation (RAG) to help small retail store owners (warung owners) handle customer inquiries efficiently.
The assistant answers common customer questions such as product prices, stock availability, shelf locations, and estimated total costs. This allows store owners to focus on finalized purchases and payment processing, reducing errors and improving service speed.
Problem
Small retail stores frequently face operational challenges due to:
-
Repeated customer questions
Examples:- “How much is Indomie Ayam Bawang?”
- “Is there any egg left?”
- “Which shelf is the soy sauce on?”
-
Distractions during checkout
- Store owners are often interrupted while calculating purchases
- This increases the risk of miscalculation
-
Unstructured customer input
Customers use natural language such as:- “Half a kilo of eggs, 3 Indomie, and 2 bundles of spinach”
Product names, units, and quantities vary widely.
-
Rigid traditional POS systems
- Cannot understand natural language
- Cannot assist customers before the order is finalized
Solution
Warung Assistant acts as an AI front-desk for customers, while the store owner focuses only on payment and fulfillment.
Solution Workflow
-
Customer interacts with Warung Assistant
- Ask for prices
- Check stock availability
- Ask product locations
- Request estimated totals
-
Natural Language Understanding
- Extracts product names, quantities, and units
- Supports:
- Kilograms, halves, quarters
- Grams / ounces
- Unit-based quantities
- Budget-based requests (e.g., “10,000 IDR worth of sugar”)
- Product name synonyms
-
Reasoning & Validation
- Fuzzy product matching using RapidFuzz
- Stock validation (requested quantity ≤ available stock)
- Subtotal and grand total calculation
-
Structured Output
- Product list
- Unit price
- Quantity
- Subtotal per item
- Grand total
- Shelf location (if requested)
-
Owner-focused Checkout
- Reduced cognitive load
- Faster checkout
- Fewer calculation errors
Impact
Real-world impact for small retail businesses:
- Faster customer service
- Reduced calculation errors
- Lower cognitive load for store owners
- Improved customer experience
- Foundation for POS and inventory systems
From a portfolio perspective, this project demonstrates:
- Practical LLM system design
- Tool-based reasoning
- Real-world constraint handling
- End-to-end AI application development
Tech Stack
LLM & AI
- Ollama (Local LLM: Gemma / LLaMA / Mistral)
- LangChain (Agents, Tools, Memory)
- Prompt Engineering (ReAct, Few-shot prompting)
Retrieval & Data
- CSV-based Inventory (RAG-style retrieval)
- RapidFuzz for fuzzy product matching
- Custom quantity and unit parsing logic
Backend
- Python
- Pandas
- Modular tool-based architecture:
- check_stock
- get_price_from_csv
- calculate_total_price
- find_product_location
Interface
- Gradio ChatInterface
- Interactive real-time chat UI
Extras (Optional / Future Work)
Potential future enhancements:
- Role-based access (Customer mode / Owner mode)
- Transaction export (receipt, CSV, PDF)
- Automatic stock updates after payment
- Vector database integration (FAISS / Chroma)
- Voice input (Speech-to-Text)
- Multi-turn memory (e.g., “What did I buy earlier?”)
Why This Project Matters
This project showcases:
- Applied LLM reasoning
- LangChain agent orchestration
- Tool calling and state validation
- Practical AI for real-world small businesses
It goes beyond a chatbot and demonstrates a production-oriented AI assistant system.