Building DuitGPT Gen AI Chatbot in 1 Week: Azure Open AI, AWS Microservices & Zero Downtime! 🎉

AI

 

Introduction

At Agmo Group, we took on the challenge of building DuitGPT, an interactive AI-driven chatbot for Chinese New Year, in just one week. The result? A fun and engaging experience with two main features:

  • AI Angpow Master – Users greet the AI Wealth God, and the more creative their greetings, the higher their score. The top 10 users win real cash prizes.
  • AI Fortune Teller – Users receive personalized predictions on wealth, love, and career based on their zodiac sign for the Year of the Snake.

Despite the short development time, DuitGPT attracted 1,500 users organically within a week—without any paid advertisements. In this post, we’ll break down our engineering stack, AI architecture, and key lessons learned.


Engineering Stack

To build DuitGPT with high availability, responsiveness, and scalability, we leveraged a cloud-based microservices architecture using AWS and Azure OpenAI.

Cloud Infrastructure

  • Cloud Provider: AWS (Amazon Web Services)
  • Frontend Hosting: AWS S3 (ensuring a fast and scalable web experience)
  • Backend Hosting: AWS Lambda (for a cost-effective, serverless microservices approach)
  • Database: MySQL (structured storage for user interactions and leaderboards)

Backend Development

  • Backend Language: Python (lightweight and fast for microservices)
  • Microservice Architecture: AWS Lambda (serverless, ensuring zero downtime and auto-scaling)
  • Chatbot Builder: Typebot (providing a customizable and interactive chat experience)

Frontend Development

  • Framework: Flutter (cross-platform mobile & web compatibility)
  • Frontend Hosting: AWS S3 (serving the UI with high availability)

By using AWS Lambda, we achieved cost efficiency and high availability, with the ability to scale instantly based on traffic spikes.


AI Stack

AI Model & Processing

We integrated Azure OpenAI to power the intelligence behind DuitGPT:

  • AI Angpow Master: Uses OpenAI’s LLM to evaluate user greetings based on creativity, uniqueness, and relevance to CNY.
  • AI Fortune Teller: Uses Retrieval-Augmented Generation (RAG) to pull insights from multiple trusted sources to generate personalized fortune-telling results.

AI Guardrails

To ensure a safe and appropriate user experience, we implemented:

  • Jailbreak Prevention – Blocking inappropriate or harmful prompts
  • Response Filtering – Ensuring AI responses remain within relevant CNY-related topics
  • Logging & Monitoring – Tracking inputs to prevent system abuse
Attempt to jailbreak

Lessons Learned

1. Operational Challenges with DuitNow Transfers

  • Issue: When processing DuitNow batch uploads, the system does not indicate which account number is incorrect—instead, it rejects the entire file.
  • Solution: We had to manually enter transfers one by one, which slowed down operations. Automating error detection for individual account failures would improve this process in the future.

2. Google Login Issues with Built-in Browsers

  • Issue: Users could not log in with Google when accessing DuitGPT from Facebook or Instagram in-app browsers due to Google’s secure browser policy.
  • Solution: We implemented a browser detection mechanism that alerts users to open DuitGPT in Chrome or Safari, ensuring a smooth login experience.

3. Keyboard Display Issue with Iframes

  • Issue: Users reported that the keyboard did not appear when interacting with the chatbot inside an iframe.
  • Solution: We switched to the official SDK chat bubble instead of embedding an iframe, resolving the issue completely.

Optimized AI Costs

One of our most impressive achievements was how efficiently we managed AI costs:

  • Total tokens used: 326,122
  • Total AI cost: USD $0.056 (less than RM0.30)

By carefully optimizing our AI queries and caching responses, we minimized API calls, keeping costs extremely low while delivering a smooth experience to thousands of users.


Conclusion

Building DuitGPT in just one week was a massive engineering challenge, but with the power of AWS, Azure OpenAI, and a microservices architecture, we created a highly scalable, interactive, and engaging AI chatbot for Chinese New Year.

With over 1,500 users engaging with DuitGPT in just the first week—and without paid ads—we see huge potential in AI-driven interactive experiences. We’re excited to keep refining our AI-powered products to drive even more engagement and innovation.

If you’re looking for an AI solution for your business, reach out to Agmo Group—we’d love to help you bring your AI vision to life! Contact us now at [email protected]