An AI-powered customer support chatbot developed as part of the end-of-course project for Large Language Model Applications (LLMA) module of Specialist Diploma in Applied Generative AI at Ngee Ann Polytechnic School of InfoComm Technology.
The chatbot answers EngagePro-specific questions using Retrieval-Augmented Generation (RAG) and responds to general or technical questions using information retrieved from Wikipedia before generating a natural language response.
The objective of this project is to develop an interactive chatbot capable of engaging in natural language conversations while providing accurate and grounded responses.
The chatbot combines:
MessagesState User
|
v
main.py
|
v
Streamlit UI
|
v
LangGraph Workflow
|
v
Safety Guardrail
/ \
v v
Blocked Response Routing Agent
/ \
v v
EngagePro General
| |
v v
ChromaDB Wikipedia
| |
v v
Prompt Builder Prompt Builder
\ /
\ /
v v
GPT-4.1
|
v
Final Response
engagepro_chatbot/
│
├── main.py # Application entry point
├── app.py # Streamlit user interface
├── config.py # Project configuration
├── graph/ # LangGraph workflow, state and nodes
├── guardrails/ # Safety classification
├── llm/ # LLM factory
├── prompts/ # Prompt templates
├── rag/ # Retrieval-Augmented Generation
├── routing/ # Question routing
├── wiki/ # Wikipedia retrieval
├── scripts/ # Development and testing scripts
├── tests/ # Unit tests
├── docs/ # Documentation
├── data/ # Brochure and vector database
└── requirements.txt
| Component | Technology |
|---|---|
| Programming Language | Python 3.11 |
| User Interface | Streamlit |
| LLM | OpenAI GPT-4.1 / GPT-4o-mini |
| Framework | LangChain |
| Workflow | LangGraph |
| Vector Database | ChromaDB |
| Embeddings | text-embedding-3-small |
| Document Loader | PyPDFLoader |
| Knowledge Source | EngagePro Brochure (PDF) |
| General Knowledge | Wikipedia REST API |
| Version Control | Git & GitHub |
The project was developed incrementally with ChatGPT acting as a technical mentor and learning companion throughout the software development lifecycle. Each iteration focused on a single component, allowing features to be implemented, tested, and integrated systematically.
Each iteration was tested independently before integration into the complete system.
Potential enhancements include:
Ng Chee Wee
Large Language Model Applications (LLMA)
Ngee Ann Polytechnic