BTalkToBen AI
BTalkToBen AI

About me

Portrait of Benjamin

Ben

Senior Software Engineer

Columbus, Ohio

greggbj@gmail.combenjamin-greggbensbuilds(614) 804-9208
  • Ben (AI)·10:51 PM

Under the Hood

TalkToBen is a full-stack AI chat built with Next.js, TypeScript, and Go. It streams answers about Ben’s experience from a curated knowledge base — not a live conversation with Ben himself.

The frontend and Go API deploy independently. The browser holds the session transcript and sends it with each turn; replies stream back over Server-Sent Events (SSE). Approved Markdown notes and profile JSON are embedded into the model prompt at request time (prompt grounding, not RAG).

Architecture

Next.js + React

UI · session transcript · streaming display

HTTPSSE↓ HTTP / SSE→

Go API

Validation · orchestration · keys stay server-side

↓→

OpenAI

Response generation in streamed chunks

Knowledge base

Markdown + JSON in the system prompt (not RAG). Loaded by the Go API before the OpenAI call.

Frontend
Next.js App Router and React. Server Components load the public profile; Client Components own the chat UI, composer, and in-memory transcript.
API
A standalone Go service exposes GET /api/profile and POST /api/chat, with request validation and body size limits. OpenAI credentials never reach the browser.
Streaming
Replies stream as SSE chunks so visitors can read while the model is still generating. The browser can cancel an in-flight request; TalkToBen does not persist full chat transcripts in its own database.
Knowledge
Approved Markdown notes and profile JSON are embedded in the system prompt. If a topic is not covered, the assistant says so instead of inventing details.