Personal AI Assistant

Chatbot that answers questions about my background, built on a Flask API with Langfuse tracing

Try It Live

Ask Me Anything

Questions about my background, projects, skills, or experience

Try asking:

Hi! I answer questions about James Mendenhall's background, projects, and experience.

Each chat is logged in Langfuse.

From Question to Answer

1. Knowledge Base

Markdown files in the API's repo: my résumé, current role, project write-ups, and art background. The API reads them at startup and joins them into one block of text, about 35,000 characters.

2. Prompt

Each question goes to GPT-4o-mini with the whole knowledge base in the system prompt, plus the earlier messages from the chat. The files are small enough to send in full, so there's no vector search. The prompt tells the model to answer only from that text and to say when it doesn't know.

3. Response

The answer streams back to the page over server-sent events. Langfuse wraps the OpenAI client and records tokens, cost, and latency for each call.

Technical Stack

Backend: Flask API on Railway

  • • Endpoints: /health, /chat, /chat-stream
  • • Streaming: Server-sent events from /chat-stream
  • • Deploys: Railway redeploys on a push to main

Knowledge Base

  • • Format: Markdown files in the repo
  • • Updates: Edit a file and push; the new text is live after the redeploy

Model

  • • OpenAI: gpt-4o-mini, temperature 0.7, 500 max tokens
  • • History: The page sends earlier messages with each question
  • • Rules: Answer from the knowledge base only, keep it short, no recruiter language

Observability: Langfuse

  • • Tracing: OpenAI client wrapped by Langfuse
  • • Logged per call: Prompt and completion tokens, cost, latency