All resources

Interactive technical brief

The Architecture of Agent Optimization

Memory, retrieval, model, harness: four layers decide what an agent can do and what it costs.

GoodMem is the memory layer, and it fine-tunes its own retrieval models automatically. PAIR Systems, the team behind it, engineers custom LLMs and harnesses when stock parts aren’t enough.

PAIR Systems engineering · July 2026

Preparing the interactive architecture…

Benchmark · Memory

Memory On vs Memory Off

−28%
aggregate token burn, memory on versus memory off

A controlled, paired A/B on a production enterprise BI agent: 17 matched scenarios, three replicates each, identical model and harness, with GoodMem memory as the only variable. Memory also cut agent steps 23%, with no measurable change in answer quality, and heavy retrieval tasks saved 30–66%.

Confidence intervals are nonparametric bootstrap estimates, 10,000 resamples, clustered by scenario. Pilot-scale benchmark; broader multi-tenant validation is in progress.

Benchmark · Retrieval models

Cloud Fine-Tuner on CRUMB

Mean reciprocal rank on eight public CRUMB retrieval tasks, before and after automated fine-tuning. The benchmark tests the embedder; the fine-tuner also tunes rerankers.

8 / 8Tasks improved
+0.232Largest MRR gain · Code retrieval
35%Median relative gain
Base embedder versus GoodMem Cloud Fine-Tuner on eight CRUMB retrieval tasks
Retrieval taskBase MRRFine-tunedDelta
Clinical trial matchingclinical_trial0.6330.746+0.113
Code solution retrievalcode_retrieval0.3890.621+0.232
State-specific legal statuteslegal_qa0.2320.284+0.053
Scientific paper retrievalpaper_retrieval0.4640.514+0.050
Set-based entity retrievalset_operation0.1980.256+0.058
Reasoning-heavy community QAstack_exchange0.3380.481+0.143
Mathematical theorem retrievaltheorem_retrieval0.2360.330+0.095
Vague movie / TV retrievaltip_of_the_tongue0.0670.139+0.071

Eight public CRUMB retrieval tasks, mean reciprocal rank of the base embedder versus the fine-tuner output. Fully automated, with no per-task human tuning. CRUMB was introduced by Killingback and Zamani. Read the CRUMB paper

Benchmark · LLM

BI Harness LLM vs Frontier Models

A 20-scenario production BI agent suite spanning Oracle EBS workloads: accounts payable, sales, inventory, and multi-step drill-downs. Three replicates per scenario, memory off, identical harness, independent LLM judge. The only variable is the model.

Production BI agent benchmark with the harness held constant
ModelMedian tokensTool callsPass rateCost per 1,000 conversations
Claude Opus 4.8 (medium thinking)Proprietary frontier model, API only, cannot be self-hosted233k661.7%$2,380$1,780–$3,080
PAIR Systems BI Harness LLMPAIRCustom-trained for each customer, becomes the customer’s IP. Self-hosts on 2×H100219k1455.9%$67$55–$80
GLM-5.2744B MoE, 40B active, roughly 16×H100 to self-host at FP8342k1154.4%$260$205–$320
GPT-OSS-120B117B MoE, 5.1B active, self-hosts on 1×H100; the customer’s prior on-premises harness model182k830.0%$10$8–$12

Pass rates and 95% confidence intervals are nonparametric bootstrap estimates (10,000 resamples) over scored replicates (57 to 68 per model). Cost per 1,000 conversations is measured per-conversation token usage priced at posted July 2026 provider rates: Anthropic list for Opus 4.8 ($5 input / $25 output per million tokens), OpenRouter for GLM-5.2 ($0.56/$1.76) and GPT-OSS-120B ($0.036/$0.18), and prevailing open-weight market rates for the PAIR model’s size class ($0.14/$1.00) as its serving proxy. Prompt caching is not modeled. Cross-check: even in the most conservative fully-serial self-hosting scenario (2×H100 at Lambda on-demand rates, $2.99 per GPU-hour), the PAIR model costs $367 per 1,000 conversations, still roughly six times cheaper than Opus 4.8. GPU footprints reflect serving precision as well as parameter count: GPT-OSS-120B ships natively 4-bit quantized (MXFP4), engineered by OpenAI to fit a single 80GB GPU, while the PAIR model’s tested serving configuration is 2×H100.

Engineering note · Harness

Harness Choice vs Model Choice

7.8×
more variance from the harness than from the model

Zhang and coauthors ran three frontier models through three harness configurations, nine combinations in all. Changing the harness moved agent scores 7.8 times more than changing the model.

PAIR Systems engineers custom harnesses for GoodMem customers: context assembly, tool use, task decomposition, and memory policy.

Variance across the grid: 18.48 percentage points squared from harness configuration, 2.37 from model choice. The 7.8× ratio is what this benchmark measured, not a general constant. Read “Stop Comparing LLM Agents Without Disclosing the Harness”

From architecture to production

Start with memory. Optimize the system above it.

Deploy GoodMem as the context layer, or work with PAIR Systems on the retrieval models, LLMs, and harnesses above it.