Source Mind
Embeddable AI assistant trained on website, document and learning materials
An embeddable AI assistant capable of delivering answers grounded in website content, documentation, or educational curricula via a lightweight script tag.
1. Context & The Core Problem
Organizations and educators needed a way to embed specialized conversational assistance that strictly adhered to their own authoritative materials (such as step-by-step math curricula) rather than hallucinatory open models.
2. Engineering Solution & Implementation
Built a grounded Q&A engine using FastAPI with multi-provider LLM integrations (OpenAI, Claude, DeepSeek) and developed an embeddable React chat widget deployable via a simple JavaScript snippet.
Direct Contributions & Ownership
- Developed high-performance asynchronous API endpoints using Python FastAPI for token streaming and conversation memory.
- Implemented content-grounded prompt templates ensuring answers adhered strictly to supplied syllabus rules (e.g. step-based mathematics).
- Engineered an embeddable, customizable React widget supporting light/dark embedding and dynamic theming.
- Integrated multi-provider LLM failover between Claude, OpenAI, and DeepSeek for cost efficiency and reliability.
3. System Architecture & Boundaries
System Architecture
Sanitised conceptual schematic representing components and integration boundaries
Embeddable Chat Widget
Injected into client sites via script tag
FastAPI Backend
Context injection, guardrails and prompt grounding
MySQL Storage
Conversations, tenant API keys and configuration
LLM APIs (Claude / OpenAI / DeepSeek)
Multi-model completion and reasoning layer
Data Flow & Interactions
4. Outcomes & Verified Impact
Successfully demonstrated step-by-step school math problem solving verified against provided syllabus logic.
Enabled third-party site owners to integrate an AI knowledge assistant in under 5 minutes with a single script tag.
5. Key Challenges & Architectural Lessons
Engineering Challenges
- •Grounding answers tightly to prevent hallucinations when dealing with deterministic domain problems like mathematical formulas.
- •Balancing token costs across multiple LLM providers while keeping latency low for interactive chat.
Takeaways & Reflection
- •Strict grounding rules and fallback prompting are essential when AI assistants are exposed to educational users.
- •Decoupling the frontend widget from specific LLM providers allows seamless switching as pricing and performance evolve.