File size: 4,346 Bytes
11a4b1e
 
 
 
 
 
 
 
b43aab0
11a4b1e
6df19e8
df23f1a
6df19e8
df23f1a
6df19e8
df23f1a
6df19e8
df23f1a
6df19e8
df23f1a
6df19e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546991b
6df19e8
df23f1a
6df19e8
b43aab0
6df19e8
b43aab0
6df19e8
b43aab0
6df19e8
b43aab0
6df19e8
b43aab0
6df19e8
b43aab0
6df19e8
b43aab0
6df19e8
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
---
license: other
title: Savant RRF Φ12.0  Dirac-Resonant Conceptual Quality API
sdk: docker
emoji: 🐢
colorFrom: red
colorTo: green
pinned: true
short_description: API de evaluación conceptual resonante para LLM
---
🧠 Savant RRF Φ12.0 — Meta-Logic & Rerank API

Savant RRF Φ12.0 is a production-ready FastAPI service that exposes:

A meta-logic quality evaluator based on the Resonance of Reality Framework (RRF)

A batched semantic reranker using a custom icosahedral-resonant embedding model

A deterministic Φ-node ontology mapping layer

The system combines SentenceTransformer embeddings, spectral / resonance features, and a 15-dimensional meta-logit classifier to evaluate reasoning quality and rank documents efficiently.

🔗 Live API
Base URL: https://antonypamo-apisavant2.hf.space

📦 Models Used
Component	Model
Embedder	antonypamo/RRFSAVANTMADE
Meta-Logic	antonypamo/RRFSavantMetaLogicV2/logreg_rrf_savant.joblib
Feature Dim	15 features
Runtime	CPU (GPU optional if available)
🧩 Φ-Node Ontology

The system maps inputs to one of 8 deterministic Φ-nodes:

Index	Φ Node
0	Φ0_seed
1	Φ1_geometric
2	Φ2_gauge_dirac
3	Φ3_log_gravity
4	Φ4_resonance
5	Φ5_memory_symbiosis
6	Φ6_alignment
7	Φ7_meta_agi

This mapping is rule-based and reproducible, derived from spectral coherence, energy, and phase features.

🚀 Endpoints Overview
GET /

Root discovery endpoint.

{
  "status": "ok",
  "model": "RRFSavantMetaLogicV2",
  "version": "Φ12.0",
  "docs": "/docs",
  "endpoints": ["/manifest", "/health", "/evaluate", "/quality", "/v1/rerank"]
}

GET /health

Lightweight health check.

{ "status": "ok" }

GET /manifest

Static manifest describing the model.

{
  "model": "RRFSavantMetaLogicV2",
  "version": "Φ12.0",
  "encoder": "antonypamo/RRFSAVANTMADE",
  "features": 15,
  "phi_nodes": [...]
}

🧪 Quality Evaluation API
POST /evaluate

Evaluates the conceptual quality of a (prompt, answer) pair.

Request
{
  "prompt": "Explain what a smoke test is",
  "answer": "A smoke test is a minimal validation..."
}

Response
{
  "p_good": 0.87,
  "scores": {
    "SRRF": 0.87,
    "CRRF": 0.79,
    "E_phi": 0.82
  },
  "features": {
    "phi": 0.61,
    "omega": 0.22,
    "coherence": 0.83,
    "S_RRF": 0.81,
    "C_RRF": 0.77,
    "hamiltonian_energy": 48.3,
    "dominant_frequency": 12
  },
  "phi_node": "Φ4_resonance"
}

POST /quality

Alias of /evaluate. Same input, same output.

🔍 Semantic Reranking API
POST /v1/rerank

Ranks documents by semantic similarity to a query using batched embedding inference.

Request
{
  "query": "What is a smoke test?",
  "documents": [
    "A smoke test is a minimal system check",
    "Load tests measure concurrency",
    "Benchmarks compare systems"
  ],
  "alpha": 0.2
}


alpha is reserved for future hybrid scoring (currently unused).

Response
{
  "model_id": "antonypamo/RRFSAVANTMADE",
  "results": [
    { "id": 0, "score": 0.92, "rank": 1 },
    { "id": 2, "score": 0.51, "rank": 2 },
    { "id": 1, "score": 0.21, "rank": 3 }
  ]
}

⚙️ Runtime Constraints
Parameter	Limit
Max prompt length	8,000 chars
Max answer length	12,000 chars
Max documents	50
Max document size	6,000 chars

Payload violations return HTTP 413.

🧠 Feature Vector (15D)

The meta-logic classifier consumes:

Spectral / resonance features:

phi, omega, coherence, S_RRF, C_RRF

hamiltonian_energy, dominant_frequency

Φ-node one-hot encoding (8 dimensions)

Total = 15 features

🛠 Running Locally
pip install fastapi uvicorn sentence-transformers huggingface_hub joblib numpy

export HF_TOKEN=your_token_here
uvicorn app:app --host 0.0.0.0 --port 8000


Open:

http://127.0.0.1:8000/docs

📈 Performance Notes

Optimized for batched inference on /v1/rerank

Stable under load (0% error rate in benchmarks)

CPU-based by default; GPU reduces latency significantly

Tail latency (p95/p99) depends on concurrency and hardware

🧩 Design Philosophy

Savant RRF is not a generic classifier.

It encodes:

Discrete resonance physics

Icosahedral symbolic structure

Deterministic ontology mapping

Meta-logic scoring beyond surface semantics

This makes it suitable for:

AI evaluation & judging

RAG reranking

Cognitive profiling

Research-grade reasoning analysis

📄 License & Attribution

© 2025 Antony Padilla Morales
Resonance of Reality Framework (RRF)