Skip to main content

Active Learning Chatbot

A self-improving AI system that validates answers against web sources and autonomously retrains itself to solve knowledge decay.

Visit Repoistory
  • AI/ML Engineering
  • Cloud Infrastructure
  • Full Stack Development
  • System Architecture
Active Learning Chatbot Main Interface

The Problem: Knowledge Decay

AI models quickly become outdated. A standard LLM trained months ago won't know about yesterday's events. Retraining is usually manual, expensive, and slow. This project solves that by creating a self-healing loop. It compares model answers against real-time Google Search results. If the AI is wrong, it automatically generates a corrected dataset and triggers a fine-tuning job.

Example of an outdated answer before autonomous retraining.

Complete Technical Stack

This is a production-grade system built on Modal serverless infrastructure.

  • AI/ML: Qwen2.5 + LoRA fine-tuning + LLM-as-a-Judge pattern.
  • Infrastructure: T4 GPUs for inference, A10G for training.
  • Validation: Google Custom Search API + semantic comparison.
  • Frontend: Dark glassmorphism theme with real-time SSE streaming.

Server logs showing the autonomous training pipeline.

Architecture & Challenges

One of the biggest challenges was Catastrophic Forgetting. To prevent the model from losing general knowledge while learning new facts, I implemented an Asymmetric Learning Strategy (mixing 500 general samples with 100 new fact samples).

The system uses Hot-Swap Model Reloading to ensure zero downtime. When a new model version (v2, v3...) is ready, the inference server loads it in the background before switching traffic.

Results & Metrics

The system achieved a massive performance leap, taking factual accuracy from 50-60% to 90-95%. By using smart GPU splitting (FP16 on T4s vs BF16 on A10Gs), operational costs were reduced by 10x. The validation pipeline maintains a 92% judge decision accuracy.

Example of an updated answer after autonomous retraining.