Method

How I Think About AI

Logic gives the skeleton. Manifolds aim the lens.

The Premise

Most LLM failures — hallucination, drift, brittle answers under retries — are not intelligence problems. They are structure problems. The model is asked to do two jobs at once: decide what is true and decide what to attend to. When those two jobs are fused inside one free-form response, both jobs degrade.

My method separates them. Logic — truth tables, gates, decision trees — is the part of the system the model is not allowed to lie around. Manifolds — smooth geometric surfaces governed by z = x · y — are how the system decides which small region of state actually matters this turn. The model handles the rest: language, nuance, judgment under uncertainty.

1. Truth Tables — The Hard Skeleton

Before any LLM call, I enumerate the propositions the system cares about and the combinations that are allowed to exist. A truth table is not a programming trick; it is a contract. Rows that produce illegal combinations are caught at the boundary, not in the model.

Example — gating an agent action on three signals (user-authorized, policy-compliant, evidence-grounded):

authpolicyevidenceaction
000deny
001deny
010deny
011deny
100deny
101escalate
110ask for evidence
111allow

This is just action = auth ∧ policy ∧ evidence with two intermediate cases broken out. The model never gets to vote on the deny rows. That is the whole point.

2. Logic Gates — Composability

Gates (AND, OR, NOT, XOR, NAND) are the smallest reusable units of decision. I build agent pipelines as compositions of gates wrapping LLM calls, not as one giant prompt. Each gate has a single, falsifiable job:

  • AND-of-verifiers — require N independent checks before commit.
  • OR-of-retrievers — succeed if any trusted source returns a hit.
  • NOT-classifier — one model whose only job is to say no.
  • XOR-router — exactly one tool fires; never both, never neither.

A gate is replaceable. A monolithic prompt is not. That is the operational difference between a system you can debug at 3am and one you cannot.

3. Decision Trees — Cheap Where Logic Is Enough

An LLM is a poor classifier when a 12-node decision tree would already do the job deterministically and in microseconds. Before I add an LLM call, I ask: would a handwritten tree get me 95% of the way? If yes, the tree ships, and the LLM is reserved for the leaves where genuine language understanding is required.

The decision tree also serves as the spec the LLM is judged against. When a model drifts, the tree is the ground truth I diff it back to.

4. Manifolds — Aiming the Lens

Logic decides whether. Manifolds decide where to look.

A manifold is a smooth surface that encodes relationships geometrically. The governing equation I lean on is z = x · y: identity (x) times behavior (y) yields emergent state (z). The same surface lets me:

  • Place each piece of context at a coordinate rather than a token offset.
  • Compute proximity between two items as geometric distance, not string overlap.
  • Follow the gradientf = (y, x) toward the region of highest decision confidence.
  • Compress what is far away and keep resolution only where the gradient is steep.

Practically, this means the agent only retrieves and reasons about the slice of state where the surface curvature says something is happening. The other 99% of context does not enter the prompt at all. That is the focus mechanism: geometry first, then language.

Putting It Together

A request comes in. The truth table rejects illegal shapes at the door. A small decision tree routes the legal ones to the right tool family. Manifold geometry picks the small region of state that matters. Only then does an LLM speak — against a gate that requires its answer to satisfy the original truth table on the way out.

The result is a system whose every decision has a name, a check, and a place on a surface. Not magic. Just structure.

See how I assemble this into agents →