QUANTSULTANT.DEV / DOCS Canonical Crawler Surface · 19 Verified Nodes 18.5% → 0.08% Medical Floor

Stream 03 · Geodesic Cost Analytics™ & Epistemic Telemetry API (/v1/geodesic/ingest)

/docs/api/metrics Stream 03 · Per-Token FP&A Economics

Plain-English translation: Tracks the exact cost of every AI token down to fractions of a cent, measures electricity and cooling-water savings, and reports how much compute was saved by the O(1) verification cache.

0. Open Data Science Metrics Canon: ATR + 9 Boundary Metrics & Provisional Patent Gatekept Telemetry

We open-source the boundary formulas below so any data science, FinOps, or CISO team can audit their LLM stack immediately. However, arriving at stable inputs for any of these metrics without burning 50,000+ LLM-as-a-judge tokens or fighting upstream schema drift requires a 0-judge-token deterministic verifier (POST /v1/verify in 0.184 ms – 2.5 ms + POST /v1/geodesic/ingest). Internal Riemannian span-weighting operators remain strictly gatekept under our 10–15 Year Provisional Patent Trade-Secret Shield and are returned as black-box JSON telemetry headers.

Metric Public Formula / Definition Why Raw Stacks Fail to Calculate Input GRAMS™ × Geodesic Telemetry Receipt
ATR
Accuracy-to-Token Ratio
Verified Accuracy (%) / (T_lifecycle / 1,000)
T_lifecycle = T_prompt + T_gen + T_rework + T_judge
Numerator & Denominator Trap: 32B LLM-as-a-judge burns 50,269 tokens/rollout to measure accuracy, while unverified drift burns 2.4 turns (19,222 tokens). 6.17× single-pass ATR lift (26.17 vs. 4.24) & 34.3× O(1) cached ATR lift (145.2) with 0 judge tokens in 0.184 ms.
FTRR & FPY
First-Try Resolution & Yield
FTRR = Total Turns / Verified Resolutions
FPY = Pass-1 Verified / N
Upstream schema drift (e.g., Capex vs. Additions to PP&E) breaks Pass-1 SQL/RAG settlement before generation starts. 1.0008 vs. 2.40 turns (FTRR) & 100% (40/40) vs. 21% (4/19) (FPY) via 242/242 TPC-DI schema lock.
MERR
Model Error Rework Ratio
ΔK_model / (ΔK_model + ΔK_user) Standard logging lumps model hallucinations together with human prompt underspecification and scope pivots. 0.0% Model Error Rework on verified clamps; <2 ms $0-token FeynmanCheck™ separates human scope exploration.
TTVO, TTED, TTDR
Post-TTFT Operational Velocity
Wall-clock time to Verified Output, Executive Decision, & Deterministic Render A 200 ms TTFT is useless if Token #1 is a hallucination requiring 105.2 s of multi-turn human debugging or 4–9 UI reload loops. 1.56 s vs. 105.2 s (67.4× faster TTVO); 304 ms full hybrid GPU completion; IoU = 0 & ≥ 55 FPS render lock.
OGF & LTB
Over-Gating & Lifecycle Bleed
OGF = FP Refusals on Hard Benign / Total Hard Benign
LTB = T_turn1 + T_cascade + T_FP_retry
Keyword guardrails block 65.0% of legitimate CISO/CFO/clinical prompts while leaking 28.3% of polite zero-keyword attacks. 0.0% OGF (60/60 rescued @ 0.10 ms), 60/60 attacks quarantined @ 0.11 ms, & 1,437,960 tokens spared (9.78×).
🔒 GWTV™, TVC & GCI
Provisional Patent Gatekept Telemetry
Gatekept under 10–15 Year Provisional Patent Trade-Secret Shield (Returned via API JSON Header only) Out-of-corpus Riemannian span-weighting & O(1) SHA-256 trajectory caching cannot be approximated by heuristic token counters. −82% recurring compute ($0.000045 → $0.000008), 64.6% High-Impact Span Value Share (TVC), & 96.42 GCI.

1. Purpose & Architectural Role

Built for CFOs, FinOps, FP&A teams, and AI governance boards. Standard observability tools only measure flat bulk $/1M tokens and TTFT; Geodesic Cost Analytics™ pioneers LLM Tokenomics as the first true Activity-Based Costing & Margin Ledger for AI Tokens—attributing exact verification work, exact cost share, and exact unit margin down to the individual token (1.00× unguarded baseline vs. 0.18× O(1) vault cached, an 82% recurring compute reduction), quantifying domain-specific liability avoidance, and logging kWh electricity and cooling-water reductions.

Cross-references: System Architecture · GRAMS™ Manifold & GRMA · 3 Runtime Shells (FastAPI, Go, Rust).

2. Request Schema (POST /v1/geodesic/ingest)

All requests require Content-Type: application/json and an Argon2id-scoped bearer header (Authorization: Bearer tw_live_...) issued via /v1/auth/argon2-verify.

Field Type Requirement Specification
organization_idstringRequiredEnterprise tenant or business unit identifier for FP&A ledger attribution.
raw_baseline_tokensintegerRequiredToken count prior to GRAMS™ single-pass truncation and O(1) cache deduplication.
grams_verified_tokensintegerRequiredActual tokens emitted after geodesic boundary clamping (-44% single-pass reduction).
vertical_profilestringOptionalLiability valuation model: healthcare, finance, defense, or edtech.

3. Response Schema

Responses are deterministic JSON payloads returned with X-Powered-By: Quantsultant-GRAMS-Engine/2.5ms-Edge and zero customer payload retention at rest.

Field Type Deterministic Guarantee
streamstring03 · Geodesic Cost Analytics™.
cache_hit_rationumberVerified O(1) cryptographic hash vault hit ratio (0.82 = 82% recurring compute reduction).
sustainability_telemetryobjectPer-query electricity (0.0024 kWh → 0.0008 kWh) and cooling water (31.0 mL → 6.0 mL) savings.

4. Deterministic Examples & Live Edge Sandbox

Switch between cURL, Python (FastAPI), Go 1.22, and Native Rust below, or click Run Live Edge Test to execute a real verification call against the Cloudflare Edge Gateway.

curl -X POST https://quantsultant.dev/v1/geodesic/ingest \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer tw_live_9f4a8c2e1b7d6035a4c8e2f1" \
  -d '{
  "organization_id": "tier1-bank-fpa",
  "raw_baseline_tokens": 18400,
  "grams_verified_tokens": 10304,
  "vertical_profile": "finance"
}'
import requests

# 03 · Geodesic Cost Analytics™ (POST /v1/geodesic/ingest · GET /v1/geodesic/export) — FastAPI / Python 3.11+ SDK Client
resp = requests.request(
    "POST",
    "https://quantsultant.dev/v1/geodesic/ingest",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer tw_live_9f4a8c2e1b7d6035a4c8e2f1",
    },
    json={
  "organization_id": "tier1-bank-fpa",
  "raw_baseline_tokens": 18400,
  "grams_verified_tokens": 10304,
  "vertical_profile": "finance"
}
)
print(resp.status_code, resp.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	// 03 · Geodesic Cost Analytics™ (POST /v1/geodesic/ingest · GET /v1/geodesic/export) — Go 1.22+ Stream Mesh Client
	payload := []byte(`{"organization_id": "tier1-bank-fpa", "raw_baseline_tokens": 18400, "grams_verified_tokens": 10304, "vertical_profile": "finance"}`)
	req, _ := http.NewRequest("POST", "https://quantsultant.dev/v1/geodesic/ingest", bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer tw_live_9f4a8c2e1b7d6035a4c8e2f1")

	res, err := http.DefaultClient.Do(req)
	if err == nil {
		defer res.Body.Close()
		body, _ := io.ReadAll(res.Body)
		fmt.Println(string(body))
	}
}
// 03 · Geodesic Cost Analytics™ (POST /v1/geodesic/ingest · GET /v1/geodesic/export) — Native Rust 2.5ms Bare-Metal Invocation
use std::time::Instant;

fn main() {
    let t0 = Instant::now();
    let request_json = r#"{"organization_id": "tier1-bank-fpa", "raw_baseline_tokens": 18400, "grams_verified_tokens": 10304, "vertical_profile": "finance"}"#;
    // Executes in-memory against the 15.88 MB single-GPU / bare-metal index with zero GC pauses
    println!("Dispatched POST /v1/geodesic/ingest ({} bytes) in {:?}", request_json.len(), t0.elapsed());
}
{
  "stream": "03 \u00b7 Geodesic Cost Analytics\u2122",
  "cache_hit_ratio": 0.82,
  "sustainability_telemetry": {
    "kwh_per_query_baseline": 0.0024,
    "kwh_per_query_grams": 0.0008,
    "water_ml_per_query_baseline": 31.0,
    "water_ml_per_query_grams": 6.0
  }
}

5. Versioning, Error Codes & Rate Limits

Parameter / HTTP Code Status / Value Operational Behavior & Recovery
API Version v1 (Engine 2.5.0) Pinned schema contract across FastAPI, Go 1.22, Native Rust, and Cloudflare Edge. Provisional-patent charter waitlist active.
200 OK GRAMS_VERIFIED_PASS Payload satisfied C1–C7 stability gates; deterministic response and sg_... hash returned.
401 Unauthorized ARGON2ID_AUTH_REQUIRED Missing or invalid tw_live_... token. Re-authenticate via POST /v1/auth/argon2-verify.
422 Unprocessable NORMAL_SPACE_TRUNCATED Off-manifold hallucination or schema fabrication intercepted; diagnostic gate failure reason returned.
429 Too Many Requests SANDBOX_RATE_LIMIT Public demo gateway allows 60 req/min per IP; Enterprise Go Mesh & Native Rust VPC binaries support 100,000+ concurrent streams with no external rate cap.

One Verification Core · Two Direct Paths

API access is gated while we complete utility patent filings and IP legal structuring. Investors can start a direct SAFE & data-room conversation with Garrick Piñón; technical evaluators can reserve a gated tw_live_... API slot or 48-hour blind dataset proof of value.