The Commonplace
Home Papers Evidence Explore Trends Syntheses Digests References Docs 🎲 Workforce Futures
← Papers
Direction, evidence grade, and study type are AI-generated labels (gpt-5-mini), not human-verified. Syntheses are LLM-written. "Tensions" are machine-detected candidates, not confirmed contradictions. A research-acceleration tool, not peer review. How this is built →

A new system, Credo, turns opaque agentic LLM harnesses into reusable declarative primitives so teams can compile task-specific harnesses in minutes and dollars rather than re-running costly searches for hours and tens of dollars, largely preserving accuracy.

Credo: Reusable Declarative Primitives for Agentic Workflows
Duo Lu, Andrew Crotty, Uğur Çetintemel · August 28, 2026
arxiv descriptive medium evidence 7/10 relevance Full text usable extracted full text Source PDF

Structured author observations

Linked only from stored provider relations; the raw author line above is never matched by name.

Arxiv

Latest observation:

  1. Duo Lu unresolved corpus identity
  2. Andrew Crotty unresolved corpus identity
  3. Uğur Çetintemel unresolved corpus identity

Semantic Scholar

Latest observation:

  1. Duo Lu provider ID
  2. Andrew Crotty provider ID
  3. Ugur Çetintemel provider ID
Credo extracts typed declarative primitives (skeletons, beliefs, policies, prompts) from searched LLM harnesses, catalogs them with provenance, and compiles them for new targets to reproduce behavior at far lower time and monetary cost than re-searching.

Citation observations

Cumulative provider counts captured on specific dates; providers are never combined.

No provider observation is available for this paper.

Missing data, not a zero citation count.

An LLM application depends on both a model and a harness: the program that determines what each call sees, how many calls to make, and which answers to trust. Coding agents can now discover strong harnesses by searching over candidate programs, but the resulting artifact is an opaque block of imperative code whose logical steps, runtime signals, physical execution decisions, and prompt strategies remain implicit and task-specific, forcing subsequent tasks to start the harness search process from scratch. The potential for reuse, however, is substantial. A searched harness encodes significant knowledge, such as the logical steps that work, the signals that matter, the physical operator decisions that adapt execution, and the prompt strategies that are effective, yet this knowledge is buried in imperative code with no inspectable or reusable structure, nor does it carry any provenance or metadata. Credo addresses this problem by recovering a structured declarative description of a searched harness, tagging each extracted primitive with relevant metadata, and cataloguing all of it with provenance. A compiler can then bind stored primitives to generate harnesses for new tasks without having to start the search over from scratch. This paper provides preliminary results demonstrating the potential of our approach and lays out a related research agenda that the database community is well-positioned to tackle, including cost-based compilation over declarative catalogs and catalog maintenance under model and workload drift.

Summary

Main Finding

Credo recovers a typed, declarative description from an agent-discovered (searched) LLM "harness" and catalogs its reusable primitives (skeleton steps, beliefs, policies, prompt templates) with provenance and scope tags. A compiler can then assemble harnesses for new targets from the catalog instead of re-running an expensive harness search. Empirically, Credo reproduces source-harness behavior with negligible fidelity loss and enables substantial cost/time savings when reusing primitives across related tasks.

Key Points

  • Problem: modern agentic harness discovery produces opaque imperative programs that embed logical steps, control signals, model choices, and prompt strategies — knowledge that is hard to inspect, audit, or reuse.
  • Analogy: similar to past DB work that recovered declarative structure from UDFs to enable optimization; Credo applies that idea to harnesses.
  • Four primitive types recovered from a searched harness:
    • Skeleton: a logical DAG of operator steps (what is computed and dependencies).
    • Beliefs: typed derived attributes (bool/enum/int/float/str) computed at plan points and read by policies.
    • Policies: guarded rules mapping beliefs to physical implementations (model, params, execution pattern).
    • Prompt templates: parametric natural-language templates discovered by search (bindable slots).
  • Catalog construction: abstractor extracts primitives; level-tagger labels transfer scope (L1 = functional/transferable, L2 = source-specific); librarian stores primitives in two tiers (general/ and specific/), with provenance.
  • Compilation: compiler selects primitives, binds slots to target-specific values, and assembles runnable harness.py; falls back to full search if no acceptable combination exists.
  • Round-trip fidelity: compiling back from extracted primitives reproduces original harness accuracy and cost with minimal change (Δ accuracy within ±0.011; Δ cost ~±0.013 ¢/q).
  • Cost/time savings: a single recover+compile costs ~$2.3–2.8 and takes minutes; original agentic search (Meta-Harness) costs ~$43–72 and takes hours (per-domain runs: total wall 2.8–9.2 hours depending on domain).
  • Primitive reuse: cross-domain compilation (finance↔legal, math↔polyreason) often yields sizable improvements over brief-only baselines; success depends on the policies/beliefs the source primitives encode (transfer can fail if operating points differ).

Key quantitative examples from experiments - Round-trip (per-domain mean over seeds): RT preserves accuracy (finance +0.011, legal −0.007, math −0.010, polyreason +0.007) and cost (mean Δ within ±0.013 ¢/q). - Search vs compile cost/time: search ~$43–72 and hours; Credo recover+compile ~$2.3–2.8 and a few minutes. - Reuse highlights: - Legal→finance: accuracy rose from 15.7% (brief-only) to 28.3% (compiled), similar to searched harness (27.7%). - Finance→legal: accuracy rose from 43.4% to 66.3%, recovering 76% of distance to searched result (73.4%). - Math↔Polyreason: transfer success depends on policies; polyreason→math improved math accuracy from 39.6% → 44.6%/45.4%; math→polyreason sometimes reduced accuracy versus brief-only because of mismatched operating points.

Data & Methods

  • Hardware & deployment: single dual-socket AMD EPYC server, 4× NVIDIA L40S GPUs; local open-weight models served with vLLM.
  • Models used:
    • Local open weights: gemma3-12b (small), gemma4-31b (large).
    • Harness discovery agent & Credo abstractor/compiler: claude-opus-4-7 (API).
    • Accuracy judge: gpt-5-mini (API).
  • Harness discovery: Meta-Harness (coding-agent search), 10 iterations per search; programs chosen from Pareto frontier of accuracy vs cost.
  • Datasets / domains (each with 3 splits): four task families:
    • Retrieval: Finance (DocFinQA + FinQA), Legal (CUAD-common + MAUD). For retrieval tasks, gold evidence removed so retrieval is required.
    • Reasoning: Math (OlympiadBench + Omni-MATH), Polyreason (composed reasoning benchmarks).
    • Splits per domain: search (100 queries), in-distribution (100 queries) used to select best harness, cross-distribution (300 queries) for transfer evaluation.
  • Metrics:
    • Task accuracy judged by gpt-5-mini per dataset grading rules.
    • Harness inference cost: per-question inference cost (¢/q).
    • Reported both accuracy and cost (no single combined metric).
  • Experiments:
    • Catalog construction: extract primitives from searched harnesses; annotate with L1/L2 scope.
    • Round-trip fidelity: extract then compile back to runnable harness, compare original vs compiled on same in-distribution split.
    • Primitive reuse: compile harnesses for unseen targets using (a) brief-only, (b) single-domain L1 primitives, (c) open-library (all non-target domains) primitives; compare with target’s own Meta-Harness result.

Implications for AI Economics

  • Large upfront search costs can be amortized: building a catalog once per source domain (search + extraction) and compiling per target reduces marginal harness construction cost dramatically (example ROI: ~$43–72 → ~$2 per compile).
  • Returns to scale and network effects: as catalogs accumulate L1 primitives across sources, the marginal value of new primitives grows (lower cost of entering new tasks); this favors centralized/shared catalogs or marketplace models for reusable harness components.
  • Productization and business models:
    • SaaS offerings can sell compiled harnesses or curated catalogs; pricing could reflect provenance, L1/L2 status, and empirical transfer performance.
    • Enterprises can invest in per-source catalog construction to lower per-task operational costs across many use cases (positive NPV if many targets).
  • Optimization & resource allocation research opportunities:
    • Cost-based compilation/optimizer: choose primitives to meet accuracy constraints at minimal cost (analogous to DB query optimization).
    • Maintenance under drift: catalog upkeep under model upgrades, new benchmarks, or dataset shifts — economic trade-offs between re-searching vs reusing/adapting existing primitives.
  • Auditability, compliance, and risk management:
    • Declarative primitives (with provenance and typed beliefs) enable better auditing of decision logic, easier regulatory compliance, and clearer attribution of failure modes — potentially lowering compliance costs.
  • Risks & frictions:
    • Transfer failures impose implicit costs (time, accuracy regressions); economic models should include failure probability and costs of fallback searches.
    • Potential commoditization of harness-search capabilities may shift competition toward catalog quality, metadata/provenance, and specialization.
  • Research questions for AI economics:
    • How to value a primitive/catalog entry? (marginal benefit across tasks, expected reuse rate)
    • Optimal investment per-source: when is it better to search anew vs compile/adapt?
    • Market design for primitive sharing: incentives, licensing, and pricing under externalities and information asymmetries.
    • Welfare and distributional effects: who captures savings (catalog providers, application owners, end-users)?

Takeaway: Credo shows that transforming opaque agentic harnesses into reusable, typed declarative primitives can materially reduce marginal costs and latency of deploying agentic workflows across related tasks, creating clear economic incentives to build and share catalogs — but realized benefits depend on transferability of policies/beliefs and on catalog maintenance over time.

Assessment

Paper Typedescriptive Evidence Strengthmedium — The paper provides systematic system-level experiments (round-trip fidelity and cross-domain reuse) showing large cost and latency improvements and preserved accuracy in multiple domains; however, the evidence is limited to preliminary benchmarks, a small number of domains/tasks, specific models and search tooling, and does not evaluate long-run or real-world deployments at scale. Methods Rigormedium — Experiments use multiple domains, held-out splits, repeated seeds, automated judges, and cost metrics; they compare to a state-of-the-art harness search baseline and report per-run variability. Limitations include limited number of source/target domains, reliance on a single search tool (Meta-Harness), use of particular model endpoints and pricing assumptions, and no real-world production deployment or user studies. SampleExperiments run on a single dual-socket AMD EPYC server with 4× NVIDIA L40S GPUs; models include local open weights (gemma3-12b / gemma4-31b) served via vLLM and API calls on frontier models (claude-opus-4-7) and gpt-5-mini for judging. Harnesses are discovered with Meta-Harness over four task families (retrieval: finance, legal; reasoning: math, polyreason). Each domain uses three splits (search 100 queries, in-distribution 100 queries, cross-distribution 300 queries); results report accuracy (gpt-5-mini judge) and inference cost (¢/q) with multiple seeds and replicates. Themesproductivity adoption innovation GeneralizabilityEvaluated on four task families (finance, legal, math, polyreason) but not on many real-world or production workloads., Tied to the specific harness-search tool (Meta-Harness) and the particular models/endpoints used; results may vary with other searchers or model families., Catalog transfer decisions depend on heuristics (L1/L2 tagging) whose behavior on diverse datasets is not fully validated., Cost figures depend on specific model pricing and deployment setup; different hardware or cloud pricing will change absolute savings., Does not measure downstream economic outcomes (productivity gains for organizations or workers) or long-term maintenance costs of catalogs.

Claims (8)

ClaimDirectionOutcomeConfidence & EvidenceDetails
Credo's round-trip compilation preserves the behavior of searched harnesses across finance, legal, math, and polyreason workloads, with no major deviation in accuracy or per-question inference cost. Output Quality mixed Round-trip harness accuracy and per-question inference cost
Reading fidelity high
Study strength medium
n=9
accuracy Δ between -0.010 and +0.011; cost Δ between -0.011 and +0.013 ¢/q
0.18
A single Credo recover-and-compile operation costs approximately $2.3–$2.8 and takes a few minutes, compared with $43–$72 and hours for the original Meta-Harness search. Organizational Efficiency positive Harness construction cost and latency
Reading fidelity high
Study strength medium
n=4
$2.3–$2.8 and a few minutes versus $43–$72 and hours
0.18
Credo's recovered logical plans contain no source-specific skeleton steps across the four evaluated domains; all recovered skeleton steps are classified as functional. Organizational Efficiency positive Transferability of recovered skeleton steps
Reading fidelity high
Study strength medium
n=12
0.0 source-specific skeleton steps in all four domains
0.18
Reusing legal retrieval primitives for finance increased cross-distribution accuracy from 15.7 to 28.3, approximately matching the searched harness accuracy of 27.7. Output Quality positive Finance retrieval task accuracy
Reading fidelity high
Study strength medium
n=300
accuracy increased from 15.7 to 28.3
0.18
Reusing finance retrieval primitives for legal increased accuracy from 43.4 to 66.3 and recovered 76% of the gap to the searched-harness result of 73.4. Output Quality positive Legal retrieval task accuracy
Reading fidelity high
Study strength medium
n=300
accuracy increased from 43.4 to 66.3; 76% of the distance to 73.4 recovered
0.18
The open-library compiler produced retrieval accuracies similar to the single-domain compiler: 28.2 versus 28.3 for finance and 64.6 versus 66.3 for legal. Output Quality null_result Target-domain retrieval accuracy under catalog selection
Reading fidelity high
Study strength medium
n=300
28.2 vs. 28.3 for finance; 64.6 vs. 66.3 for legal
0.18
Applying math reasoning primitives to polyreason reduced inference cost to $0.03–$0.04 per question, which was 5–7 times below the brief-only baseline, but also reduced accuracy below the brief-only value. Organizational Efficiency mixed Polyreason accuracy and per-question inference cost
Reading fidelity high
Study strength medium
n=300
cost $0.03–$0.04 per question; 5–7× below brief-only; accuracy 38.7 and 34.9 versus brief-only 43.3
0.18
Applying polyreason primitives to math improved accuracy from 39.6 to 44.6 and 45.4 in the two compiled variants. Output Quality positive Math reasoning task accuracy
Reading fidelity high
Study strength medium
n=300
accuracy increased from 39.6 to 44.6 and 45.4
0.18

Notes