← All Work
EVALUATION HARNESS · COMPREHENSIVE PROMPT · PRACTITIONER-DIAGNOSED CASES Six local models. Nearly the same score. Model size, left to right: 8B → 120B. Accuracy barely moves. target · 9.9 production bar · 8.5 15× the parameters, 6× slower: +0.2 points 6.6 6.6 6.2 6.6 6.4 6.8 qwen3 ministral-3 gpt-oss qwen3 qwen3-coder gpt-oss 8B 14B 20B 30B 30B 120B Score 0–10 · precision/recall vs. expert diagnoses · January 2026 baseline
AI Platform / Solo build / 2026 · in progress

A classifier that knows exactly how good it is

The framework's author spent years mapping 12 coping styles in a 107,000-word manuscript. I'm building the platform that applies that framework to real text: self-hosted, grounded in the source, and measured against expert judgment on every change. The interesting part isn't the model. It's the evaluation harness that says whether a change made the system better, or just made it feel better.

107K
words of expert manuscript grounding every classification
6
local models benchmarked head-to-head on the same expert-labeled cases
15×
bigger model gained 0.2 points. Scale wasn't the bottleneck
100%
local. Sensitive text never leaves the machine

What I did

I built the platform end to end: the Docker Compose stack (n8n, FastAPI, Supabase with pgvector, Langfuse, native Ollama), the retrieval architecture over the manuscript, the LoRA fine-tuning pipeline, and the companion app that puts a classification in front of a reader. Before any of that was allowed to matter, I built the evaluation harness. Every prompt and model change gets a precision/recall score against practitioner-diagnosed cases. Nothing ships on impression.

Overlapping styles, sensitive text, and no dataset

The framework defines 12 coping styles that overlap by design. The same word can point at three different styles depending on what surrounds it, and real statements mix up to seven at once. There is no public dataset for this. Ground truth exists in one place: the author's own diagnoses of real statements.

The text is also sensitive. People describing how they cope is not data to post to an API. Inference, embeddings, the database, and the traces all had to run on a single local machine.

Grounded, measured, local

  • Ground every classification in the manuscript, so results cite the framework rather than model priors
  • Measure against expert judgment: precision and recall per case, scored 0–10, with a production bar at 8.5
  • Keep every byte local. Models, vectors, and traces on one machine
  • Build the fine-tuning pipeline now, so it's ready the day the examples justify it

Retrieval is a service. Generation is a workflow.

The manuscript is chunked semantically with LlamaIndex, embedded locally at 4,096 dimensions, and stored in pgvector. A FastAPI service does exactly one thing: retrieve. Generation lives in n8n workflows, where a prompt, a model, or a retrieval strategy can be swapped without touching the service. Langfuse traces every call.

That split pays for itself during experiments. Change one variable, run the harness, read the score. The system is built to be measured.

One run, end to end

Grounding
107K-word manuscript Diagnosed cases
Local pipeline
  • Semantic chunks
  • 4,096-dim embeddings
  • pgvector retrieval
  • Local LLM
Every run produces
  • Ranked styles
  • Cited passages
  • Langfuse trace
  • Eval score

Ollama runs natively on the host; everything else runs in containers on the same machine. Nothing in this diagram has an internet connection.

The harness came first

Before optimizing anything, I built the measurement: an automated test runner that scores each configuration on precision and recall against practitioner-diagnosed statements, writes a JSON and markdown report, and feeds a running knowledge base of observed facts, confirmed theories, and open hypotheses. Experiments live in dated folders. A conclusion has to cite its runs.

Current best: 6.6 to 6.8 out of 10. That's the honest number. The target is 9.9, and every step toward it is written down as a hypothesis with a predicted score before it's attempted. When the prediction misses, the theory changes, not the report.

Four things the numbers said

  • Scale wasn't the bottleneck. An 8B model tied a 30B at 6.6. A 120B model, 15× larger and 6× slower, scored 6.8. Every model aced the clear cases and struggled on the same tangled ones. The limit was information in the prompt, not reasoning capacity. That reframed the whole plan: collect better examples, don't rent bigger models.
  • Information density has a sweet spot. Keywords alone scored 4.3. A curated prompt with descriptions, examples, and the top keywords per style scored 6.6. An exhaustive prompt fell back to 5.4–6.6. More context isn't more accuracy; there's a measurable Goldilocks zone.
  • Structure only helps models trained on it. Cross-reference metadata cost the general models 33–38%. They read it as noise. The code-trained model gained 24% from the exact same text. Prompt format is a per-model decision, and the harness is what made that visible.
  • Know when the data can't answer the question. With five test cases, run-to-run variance swings averages by 1.5–2.0 points, larger than most effects being measured. So prompt optimization is paused until 20–30 diagnosed examples exist. Sometimes discipline means stopping.

Staged behind evidence

The fine-tuning pipeline is built and parked: scripts that extract diagnosed sessions, generate question-answer pairs from the manuscript, and convert both into LoRA training format for LLaMA-Factory. It waits for 200+ examples, because below that the evaluation predicts marginal gains and the effort belongs in data collection.

Next in line: retrieval that pulls the most similar diagnosed examples into each prompt (predicted 8.5–9.0), and a two-tier pass that reads how a statement is told, not only which words it uses. Each step has a number attached before it runs.

Honest numbers are a feature

It would be easy to demo this system on its best cases and call it done. Clear statements score 10/10 on every model. The harness keeps everyone honest, including me: it shows the 2/10 cases too, and those cases set the roadmap. A system that knows exactly how good it is can get better on purpose. One that doesn't can only get lucky.

The platform is a research and self-reflection tool grounded in the author's framework. It is not a diagnostic instrument, and it doesn't pretend to be one.

Next Project
Reclaimed $3M+ annually by unifying 5 products under one design system