Tines — Valentine's RAG Chatbot
A personalized Valentine's chatbot built with RAG, trained on 13,342 iMessages and deployed on Railway
Project Overview
Tines is a Valentine's-themed RAG chatbot that mimics my texting style using 13,342 real iMessages as its knowledge base. The app features a hearts-animated landing page with password authentication, an iMessage-style chat interface with prompt chips, and a few playful Easter eggs — including a "Horse Meal Mode" that generates absurd food suggestions and a "Boss Mode" that dishes out tasks to complete.
Built as a follow-up to my first RAG chatbot, this iteration swaps the Node.js/Pinecone stack for a Flask backend with ChromaDB, uses lighter all-MiniLM-L6-v2 embeddings, and ships the whole thing to Railway with auto-deploy from GitHub. The two-step avatar selection flow (mood, then character) personalizes the conversation before it even starts.
System Architecture
The system spans a browser frontend, a Flask API, a RAG pipeline, and an offline data ingestion process:
- Frontend: Hearts.js canvas landing page with password auth, hub navigation, and an iMessage-style chat UI with prompt chips
- Backend: Flask server with endpoints for authentication, chat, task management, and password-protected conversation logs
- RAG Pipeline: ChromaDB vector store (618 chunks, all-MiniLM-L6-v2 embeddings), cosine similarity retrieval, and Kate-style extraction for personalized prompts
- AI: Anthropic Claude (claude-sonnet-4-5-20250929) via HTTP/1.1 with 60s timeout and 3-retry initialization
- Data Pipeline: Apple iMessage DB (~938MB, handle 2820) extracted via NSKeyedArchiver deserializer, chunked by 30-min gaps, indexed into ChromaDB
- Deployment: GitHub (k8eyler/tines) auto-deploys to Railway via gunicorn + nixpacks
Key Features
iMessage-Style Chat
A familiar chat interface with prompt chips for quick interactions, session tracking, and per-user conversation logging.
Two-Step Avatar Flow
Users pick a mood (Harry or Horse), then a character variant (Kate or Bald), creating a personalized experience before the conversation begins.
Special Prompt Modes
Horse Meal Mode generates absurd food suggestions. Boss Mode assigns random tasks from a task list and tracks completion status.
Lightweight RAG Stack
ChromaDB with all-MiniLM-L6-v2 embeddings keeps the stack simple and self-contained — no external vector database service required.
Technical Details
Key differences from the first RAG chatbot iteration:
- Switched from Node.js/Express to Flask for a more lightweight backend
- Replaced Pinecone + Voyage AI with ChromaDB + all-MiniLM-L6-v2 for fully self-contained vector storage
- Added multi-user password authentication (Harry, Kate, Other) with per-user chat logging
- Built a custom offline pipeline: iMessage extraction via NSKeyedArchiver, 30-minute gap chunking, and batch indexing
- Deployed to Railway with GitHub auto-deploy, gunicorn, and nixpacks