🧭 Mentor

AI advisor for solo founders of expert businesses

Claude Haiku 4.5 Python Flask Retrieval-Augmented Vanilla JS Local-First

📋 Project Overview & Problem Statement

Challenge: Solo consultants, agencies, and service founders need real business advice, but generic AI chatbots give theoretical answers disconnected from their actual situation. Reading four different business books (positioning, pricing, selling, decision-making) leaves them with conflicting voices and no way to apply the wisdom to their specific week.

Solution: Mentor compiles multiple expert sources into a single unified-voice wiki and grounds every reply in the user's real schedule, priorities, and progress. It uses Claude Haiku 4.5 with strict output rules — maximum two short paragraphs, direct language, candid but encouraging — to deliver advice that feels like a trusted advisor, not a search engine.

Key Benefits

🖥️ Application Features

📚 Knowledge Wiki

Five topic articles — positioning, selling, pricing, business model, decision-making — compiled from multiple expert sources into one synthesized voice. Browse or click any topic to read the full framework.

🎓 Today's Lesson

One random teachable chunk from the wiki on each click. A bite-sized idea to absorb at the start of the day, no commitment required.

💬 Chat Advisor

Ask any business question. Retrieval finds the top 3 relevant wiki chunks, Claude Haiku generates a grounded answer in ≤2 short paragraphs, and sources are shown so you know where the advice came from.

📅 Daily Context

Always-on access to the user's weekly schedule, priority order, and latest progress log — loaded into every chat request so advice is never generic.

🤖 AI Integration & Intelligence

🧠 Claude Haiku 4.5

Fast, low-cost LLM that generates concise grounded replies. Roughly one sen per question in production — cheap enough for daily use without cost anxiety.

🔍 Keyword Retrieval

Every question is tokenized and scored against all wiki chunks. The top three are sent to the LLM as context, keeping token usage low and answers focused.

🎯 Strict Output Prompt

The system prompt enforces maximum 2 paragraphs of 3 sentences each, unified voice, candid tone, and honest gap-flagging. No theoretical advice without reality grounding.

🪞 Layer 1 + Layer 2 Grounding

Layer 1 is always-on context: user profile, schedule, priorities, progress. Layer 2 is retrieved wiki chunks per question. Both are sent with every request to ensure advice matches both reality and frameworks.

🛠️ Technical Architecture & Implementation

Frontend Stack

Vanilla HTML CSS Grid Vanilla JavaScript marked.js (Markdown)

Backend Stack

Python 3 Flask Anthropic SDK Claude Haiku 4.5

Deployment & Infrastructure

Local-First One-Click .bat Launcher No Cloud Required

System Architecture

📖 Development Setup & Installation Guide

Prerequisites

Quick Start

# Clone the repository git clone https://github.com/lyven81/ai-project.git cd ai-project/projects/mentor # Install dependencies pip install flask anthropic # Set your API key in config.txt # ANTHROPIC_API_KEY=sk-ant-... # Run the server python mentor_server.py

Environment Configuration

# config.txt ANTHROPIC_API_KEY=your_anthropic_api_key_here

📊 Key Metrics

5
Wiki Topics
~2
Paragraphs Per Reply
~1 sen
Cost Per Question
Local
First Deployment

Business Value