Dunia Games - AI Chat
Dunia Games has a lot of content and products (games, top up items, promos, articles, tournaments, and so on). To make it easier for users to find and understand all of them, we built an AI Chat that can answer any gaming question on Dunia Games, in natural conversation, and directly recommend the relevant products so users can top up right away.
For example, when a user asks "siapa angela mlbb", the assistant explains the hero along with related images. And when the user asks "promo apa yang paling worth it di dunia games", the assistant compares the ongoing promos and renders product cards that are directly clickable to the top up page.
I built the whole application, both front end and backend.
On the front end, my job is slicing (changing the image UI in Figma into html, css, and js code) and integration, where the connection to the backend is using WebSocket so the answer can be streamed to the user in real time.
On the backend, my job is integrating with the LLM using AI SDK, setting up the RAG architecture (CRUD of the RAG knowledge base, stored as vector embeddings in PostgreSQL, then retrieved using cosine similarity algorithm and consumed by the LLM as context), guardrail (both by code and by LLM), system prompt, chat management, auth management, and token management (counting token consumption then guarding it so every single user has a maximum token usage). Finally, exposing all of it to the front end through the WebSocket connection.
NB: Source code cannot be shared because it is a company asset.

