Theorycraft — Architecting an Agentic Intelligence Layer

The engineering story behind building a living, thinking architectural repository.

Theorycraft — Architecting an Agentic Intelligence Layer

Role: Lead Systems Architect & AI Designer | Timeline: Continuous Integration

1. Executive Summary: Redefining the Portfolio

Theorycraft Intelligence Core

In the age of AI, a static portfolio is a missed opportunity. Theorycraft was born from a simple question: What if your work could speak for itself? I engineered this platform not just to showcase projects, but to serve as an Agentic Intelligence Layer—a system capable of synthesizing years of expertise into instant, grounded, and searchable insights.

2. The Challenge: The "Search-Experience" Gap

Most portfolios rely on chronological lists or basic keyword tagging. For a Principal-level architect, this is insufficient. The challenge was threefold:

  • Information Density: How to make 50+ deep-dive research papers and case studies accessible without overwhelming the user.
  • Truth & Grounding: Ensuring an AI assistant only speaks the truth about my career, with zero hallucinations.
  • Scalable Observability: Understanding who is looking at what without compromising the professional, minimalist UX.

3. Architecture: The Agentic Core

Theorycraft System Architecture

The system is built on a high-fidelity RAG (Retrieval-Augmented Generation) stack using Next.js 15, Supabase, and Gemini 2.5.

A. Semantic Retrieval via PGVector

We bypassed traditional database lookups for a Vectorized Search. Every sentence in this repository is converted into a 3072-dimensional vector. When a user asks a question, the system performs a cosine similarity search to find the exact "clusters" of knowledge that match the intent.

B. The HyDE Pattern

To solve the "cold start" problem in search, I implemented Hypothetical Document Embeddings (HyDE). The system actually "guesses" what the answer might look like before it searches the database. This allows it to bridge the gap between user intent and technical terminology.

C. Corrective RAG (CRAG)

To ensure 100% accuracy, I built a Corrective Layer. If the retrieved documents don't meet a high similarity threshold, the AI politely declines to answer rather than making something up. This is critical for maintaining professional trust.

4. Observability: Tracking the Global Footprint

One of the most powerful features of Theorycraft is its Live Interaction Tracker. I built a custom telemetry system that captures:

  • Real-Time Geolocation: Using Vercel Edge headers to map visitor locations from San Francisco to Bangalore in milliseconds.
  • Semantic Query Tracking: Monitoring "what" recruiters are searching for to refine the content strategy.
  • Intelligent Rate Limiting: A custom-built throttle (15 queries/hour) that protects the LLM from abuse while ensuring a premium experience.

5. Impact & Engineering Metrics

The implementation of Theorycraft has transformed my professional outreach from a "one-way broadcast" into a "two-way intelligence exchange."

~85%
Semantic Accuracy
< 2s
Response Latency
Global
20+ Countries

"Theorycraft is the ultimate MVP of agentic architecture. It proves that the most valuable part of a design system isn't the components—it's the intelligence that connects them."

Last updated on April 30, 2026 at 05:32 AM