Linx logoLinx Docs
On this page
On this page
Page banner

Ramayana ChatBot

A RAG-driven chatbot with conversational context support, trained on the complete 3-volume Indonesian Ramayana literature for deep cultural Q&A.

Artificial Intelligence

Project Overview: Ramayana ChatBot

The Ramayana ChatBot is an interactive, AI-powered system designed to answer user inquiries regarding the Kakawin Ramayana. Built using a Retrieval-Augmented Generation (RAG) architecture, the chatbot provides informative, context-aware, and natural responses by retrieving precise textual verses from a classical literature knowledge base and processing them through a generative model.

The primary objective of this system is to bridge the gap between traditional classical literature and modern natural language processing tools, offering an interactive and multimodal approach to exploring local heritage and ancient literary works.


1. Core System Architecture

To ensure scalability, clean maintenance, and decoupled business logic, the system is engineered with a modular layout divided into two main applications:

  • Frontend Framework: Developed using Next.js, which acts as the interactive interface for text query inputs, chat history tracking, and audio streaming controls.
  • Backend Framework: Developed using FastAPI (Python), which serves as the core orchestrator handling session states, textual vector search pipelines, and communication with external AI services.

The system architecture also coordinates closely with Google's Gemini API, which acts as the main Large Language Model (LLM) engine for rewriting ambiguous queries and synthesizing final natural language responses.


2. Key Features

The Ramayana ChatBot implements three core functionalities to deliver a comprehensive, multimodal exploration of the text:

Textual Information Retrieval

Users can ask open-ended questions about the Ramayana narrative in multiple languages. The system bypasses basic keyword matching by running a semantic vector search across the underlying text, matching inquiries accurately based on their true contextual meaning.

Discussion Context Awareness

The chatbot effectively maintains and tracks continuous conversational history within an active session. It dynamically resolves reference markers and pronouns (such as "he", "she", or "that event") in follow-up questions, allowing for fluid, back-and-forth dialogue without requiring users to restate context.

Multimodal Verse Playback

Beyond standard text outputs, the platform integrates an audio playback feature to preserve and highlight traditional auditory aesthetics. Validated textual verses within the chat screen are directly linked to corresponding MP3 audio files, which users can play, pause, or stop at will via the interface.