Portfolio/Projects/PT Textilindo
Case Study

AI Customer Service System

PT Textilindo

AI Engineer & System Analyst (Contract)

System architecture diagram for an AI customer service system with RAG and ERP integration

Overview

Designed and delivered a full AI-powered customer service pipeline for a textile manufacturer, replacing manual inquiry handling with a system capable of answering questions about products, availability, pricing, and company policy — all grounded in live business data.

Fine-tuned Meta-Llama-3-8B-Instruct with 4-bit QLoRA to adapt the model exclusively to communication style and customer service tone. Business facts — product specs, pricing, stock — were deliberately kept out of model weights and handled at inference time through retrieval and live data lookups, preventing the model from hallucinating information it was never trained on.

Architected a dual-knowledge-base RAG pipeline with two distinct corpora: one for operational and company information (addresses, policies, operating hours, shipping terms), and one for static product catalog data (fabric types, material characteristics, standard specifications). Both are indexed with TF-IDF vectorization and retrieved via cosine similarity at inference time, with top-k results injected directly into the generation context.

Built an n8n-based automation layer as a read-only ERP proxy. Incoming requests are validated, routed by action type, and forwarded to the live ERP system. Product search supports both exact-match and fuzzy fallback to maximize recall, while a dedicated response sanitizer strips all internal fields — supplier references, cost margins, internal IDs — before the data is passed to the language model. This ensures the model only ever sees customer-safe, normalized product information.

Implemented a three-phase conversation state machine — Discovery, Awaiting Color Selection, and Detail — enabling coherent multi-turn product inquiry flows. Semantic intent parsing is performed in a single LLM call that simultaneously extracts intent category, product reference, and color preference, avoiding the latency cost of a separate classification model. The orchestration layer decides whether to invoke the RAG retriever, the ERP proxy, or both, based on intent and current conversation phase.

Architecture & Workflow

n8n automation workflow for ERP proxy layer in the Textilindo AI Customer Service System

Automation workflow acting as a read-only ERP proxy — handling input validation, action routing, exact-to-fuzzy product search fallback, response normalization, and unified error formatting before data reaches the language model.

What Was Built

  • Fine-tuned Meta-Llama-3-8B-Instruct with 4-bit QLoRA — style and tone adaptation only, no business facts baked into weights
  • Built dual-corpus RAG pipeline: one knowledge base for operational facts, one for static product catalog — both indexed with TF-IDF and retrieved via cosine similarity
  • Designed n8n automation layer as a read-only ERP proxy with structured action routing and input validation
  • Implemented exact-match → fuzzy fallback search strategy to maximize product retrieval recall without false positives
  • Built a data sanitizer stage that strips internal fields from ERP responses before they reach the language model — preventing accidental data exposure
  • Normalized multi-variant product responses (color codes, stock quantities, pricing tiers) into a flat structure consumable by the generation prompt
  • Designed a three-phase conversation state machine (Discovery → Color Selection → Detail) for coherent multi-turn product inquiry flows
  • Semantic intent parsing in a single LLM call — extracts intent, product reference, and color preference simultaneously
  • Anti-hallucination guarantee: live data fields (price, stock) are always sourced from the ERP layer; the model is instructed to decline rather than fabricate
  • Led end-to-end stakeholder requirements gathering, system design, validation, and delivery as sole AI engineer