Back to projects
Active December 2025 — Present Built with Claude Code

FrontlyneQ Lite

Ruby on Rails AWS Bedrock Claude 3.5 Sonnet OpenSearch Serverless PostgreSQL Redis Sidekiq AWS ECS AWS Polly ElevenLabs AWS Transcribe ActionCable S3

FrontlyneQ Lite (FQL) is a production-deployed AI tutoring system that delivers personalized, voice-enabled learning experiences to frontline retail workers at scale. It powers two core modes inside the Frontlyne mobile app: Know Mode, an intelligent Q&A system where workers ask questions about products, policies, or procedures and get accurate, sourced answers from their company's own documents; and Learn Mode, a structured AI tutoring experience that teaches through pedagogically-grounded progression: explanation, comprehension checks, quizzes, and voice-based roleplay scenarios with AI characters.

Key Highlights

  • RAG pipeline with hybrid search combining semantic vector similarity and keyword matching via OpenSearch Serverless
  • Pedagogical state machine with Bloom's Taxonomy progression governing the entire learning journey
  • Voice-based roleplay with AI characters using real-time STT via AWS Transcribe, response generation via Claude, TTS via ElevenLabs/Polly
  • Multi-tenant architecture with per-tenant databases, OpenSearch indices, S3 paths, and AI configurations from a single deployment
  • Cost-optimized at ~$0.0135 per learning session with tiered TTS, RAG caching, and token-aware prompt engineering
  • Sub-2-second API response times and sub-3-second RAG content generation in production

The Problem

Traditional e-learning fails for blue-collar retail workers in India. Store associates, warehouse staff, and gig workers learn on mobile phones during shifts. English is often their 2nd or 3rd language. They need practical, immediately applicable knowledge, not text-heavy desktop courses. Existing platforms don't adapt to individual skill levels and offer zero conversational practice for customer-facing roles.

Architecture

A three-layer microservices architecture on AWS. The Intelligence Layer is the pedagogical brain, implementing a learning state machine that manages how learners progress through content, deciding what to teach, when to assess, and how to adapt based on performance. The Orchestration Layer is the execution engine, handling RAG retrieval, LLM prompt engineering, voice synthesis, speech transcription, and multi-modal content assembly. The Multi-Tenant Data Layer gives each customer a separate database while a master database manages tenant configurations, API keys, and FQL-specific settings with thread-safe connection switching for complete data isolation.

RAG Pipeline

Documents (product catalogs, policy PDFs, training manuals) are chunked, embedded using AWS Titan models, and indexed into per-tenant OpenSearch indices. At query time, the system runs hybrid search combining semantic vector similarity with keyword matching to retrieve the most relevant content, then synthesizes answers via Claude 3.5 Sonnet on AWS Bedrock. Content fingerprinting (SHA256) prevents duplicate indexing.

Voice-Enabled Roleplay

The standout feature: workers practice real customer interactions through voice-based roleplay with AI-generated characters. Each character has a defined personality, mood, background, and speaking style. The system streams worker speech to AWS Transcribe for real-time STT, generates contextually appropriate character responses via Claude on Bedrock, synthesizes character voice using ElevenLabs or AWS Polly, evaluates performance against defined success criteria using an AI rubric, and delivers everything via ActionCable WebSockets for real-time conversation flow.

Multi-Modal Content Delivery

Every piece of content is delivered in multiple formats simultaneously: text with markdown formatting, AI-narrated audio (dual TTS with Polly for bulk and ElevenLabs for character voices), images extracted from documents, and five structured card types for MCQ quizzes, single/multi-image explainers, text explainers, and roleplay cards.

Built with Claude Code

This entire backend was built using Claude Code as the primary development tool. From initial scaffolding to complex prompt engineering pipelines, Claude Code accelerated development significantly, enabling rapid iteration on prompt templates, service architecture, and test coverage.