feat(agent): add semantic graph evaluation experiment - #760
Conversation
Add a private, deterministic harness for measuring Luna semantic feed recovery over immutable Protocol-1 fixtures. Keep every evaluator contract and execution path isolated from production graph behavior, and record the no-go rollout decision from the bounded calibration and holdout run. Closes: SAP-3002
Review — PR #760 (round 1)🔒 CONFIDENTIALITY — the experiment record publishes Sapiom routing/gateway internals the SDK deliberately abstractsThe package is
Fix: take the concrete label out of committed prose and code — read it from configuration
|
Treat only invocation failures as provider failures and keep malformed successful responses in deterministic validation. Record cost as unavailable because the public response has no authoritative per-call price. Refs: SAP-3002
Review — PR #760 (round 2, follow-up)Delta reviewed: Not fixed — 🔒 CONFIDENTIALITY (round 1, finding 1)The push did not touch the leak surface. Fixed
New (low severity)
Verdict: Request changes — the confidentiality finding is untouched and blocks merge; the two |
Record post-response normalization faults with a sanitized harness rejection so paid matrix evidence can still be written without inflating provider-failure metrics. Refs: SAP-3002
|
Closing as superseded by the plan-first Agent Map direction. Disposition: preserve the no-go decision, DECISION.md, corpus, and useful fixtures as research references. Do not merge the private semantic-evaluation package into the production workspace. Frozen head: Replacement direction: Agent Studio: Plan-First Agent Map No branch or commit history is being deleted. Any future extraction should be proposed in a new, consumer-scoped PR. |
Primary change type
Problem and motivation
SAP-3002 needs evidence that a Sapiom-hosted Luna model can recover semantic-only
feedsrelationships from immutable whole-project evidence before any production contract or rollout is designed. The experiment must distinguish structural validity from semantic correctness, preserve the Protocol-1 boundary, and remain deterministic and network-free in CI.Summary and scope
@sapiom/semantic-graph-evalworkspace package with strict internal fixture, request, snapshot, scoring, and report contracts.gpt-lunaadapter (neverFail: false), raw mock replay, strict per-candidate quarantine, hidden-oracle scoring, normalized fingerprints, reports, and guarded CLIs.DECISION.md.The evidence supports
gpt-lunawith the privatebounded-source.v2policy as the next shadow-evaluation starting point, but not user exposure: combined selected-configuration precision was 0.818 (9 TP, 2 FP, 1 FN), while the small frozen holdout was 1.0 precision/recall (6 TP, 0 FP, 0 FN). The public synchronous response has no authoritative per-call price and selected-config p95 latency was 16,934 ms, so the recorded rollout decision is no-go.Related work
Related issue or discussion: SAP-3002
Stacked on #755 (
yashnadge/sap-2986-infrastructure-adapt-direct-invocations-to-graph-evidence) at its current headee72cd56ff34328c2ebb1701e81dcc7f80aea9ee.Validation
Real-model verification used only Sapiom
gpt-luna, with no fallback, retries, or repair calls. All 48 calls in the final evidence dataset succeeded and disclosed serving classmedium/ lanerun_now. A preliminary 48-call dataset was discarded after a packet-identity review correction; the decision record discloses all 96 paid invocations and the holdout limitation.Tests and documentation
Added exact packet/snapshot goldens, table-driven validator tests, schema/fingerprint mutation tests, provider boundary tests, scoring/report tests, and full CLI end-to-end tests. Added package operating/safety documentation and the evidence-backed
DECISION.md.Automated review hardening removed speculative internal cost-header parsing and narrowed provider failures to actual client invocation errors. An HTTP-200 response without the forced structured output remains a successful provider attempt and is quarantined by deterministic malformed-output validation. Post-response harness faults now receive their own sanitized rejection code, so the CLI preserves paid-run evidence without mislabeling them as provider failures; both paths have explicit regression tests.
Review disposition: the recommendation to remove the
gpt-lunalabel and measured decision record was not applied because both are explicit SAP-3002 deliverables and silently substituting or abstracting the requested model would invalidate the experiment. The SDK'sRoutingLabelpermits server-configured string labels, while the recorded class/lane values use its documented serving-disclosure vocabulary rather than a provider identity.Compatibility and release impact
Security
AI assistance
OpenAI Codex implemented the private evaluator, synthetic fixtures, tests, and documentation from the approved SAP-3002 implementation plan. The complete diff was self-reviewed; review findings received red/green regression tests; fixture hashes, deterministic reports, filtered requirements, and repository-wide build/typecheck/lint were independently rerun before commit. No customer or production data was supplied to the experiment.
Checklist
CONTRIBUTING.md, and this contribution follows the issue-first policy through SAP-3002.