Back to Projects
ChatLomhat

ChatLomhat

A intelligent lomhat (teacher) assistant powered by AI that helps students with their studies and solves their academic problems. Designed to provide personalized learning support and educational guidance in a conversational format. Click here to visit ChatLomhat.

GenAIEducationPrompt

Project Overview

Purpose

ChatLomhat is designed to revolutionize the way students access educational support. Acting as an AI-powered teacher assistant, it provides personalized help with academic problems, explanations of complex topics, and study guidance tailored to each student's learning pace and style.

Key Features

  • Khmer language Support: Allows learners to study and interact in Khmer, making education more accessible and comfortable for native speakers.
  • Math Solving: Helps students solve math problems accurately, covering different levels and topics.
  • Step-by-Step Guidance: Provides detailed explanations in a structured way, so students understand the process, not just the answer.
  • Contextual Understanding: Understands questions within their context, ensuring more accurate, relevant, and personalized responses.
  • 24/7 Availability: Always accessible anytime, anywhere, so learners can get support whenever they need it.

Technology Stack

AI/ML

Gemini Model

Flask-1.5

Backend

Python

FastAPI

Gemini API

Frontend

React

TypeScript

Tailwind CSS

Deployment

Vercel

Render

GitHub

Development Process

Environment Setup

  • Defines necessary environment variables such as the Google AI API key, Flask settings, and the frontend URL.

Dependency Management

  • Uses a requirements.txt file to manage Python dependencies.
  • Utilizes package managers like npm or yarn for frontend dependencies.

Web Framework Initialization

  • Sets up the Flask application with necessary configurations.
  • Initializes the React application with required dependencies.
  • Configures Cross-Origin Resource Sharing to allow requests from your frontend domain or localhost during development.

Third-Party Service Integration

  • Integrates with the Google AI API for advanced language processing capabilities.
  • Uses Pillow (PIL) to handle image input/output, which could be useful for exercise images or user-uploaded assets.

API Key and Configuration Management

  • Loads the API key from environment variables, not hardcoded in source, and raises errors if not found, enforcing good security practices.

Response Formatting

  • Cleans and formats AI responses to improve readability, removes code block markers, bullet points, and ensures proper step-by-step presentation for users.

Prompt Building and Request Handling

  • Builds prompts for AI requests, tailored for exercises, topics, difficulty levels, and number of problems.