Upload reports/blog_post.md
Browse files- reports/blog_post.md +53 -79
reports/blog_post.md
CHANGED
|
@@ -1,110 +1,84 @@
|
|
| 1 |
-
# OCC:
|
| 2 |
|
| 3 |
-
##
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
|
| 9 |
-
|
| 10 |
|
| 11 |
-
|
| 12 |
-
- Multi-agent debates give equal turns to good and bad participants
|
| 13 |
-
- RAG systems retrieve a fixed K documents per query regardless of need
|
| 14 |
-
- No system provides auditable accounting for *why* compute was allocated
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
| 23 |
-
Scores whether an action produced measurable value. Supports code tasks (unit tests, pass@k), QA (correctness + evidence support + NLI), and debate (influence efficiency). Produces structured JSON with raw score, cost-adjusted score, confidence, evidence, and failure tags.
|
| 24 |
|
| 25 |
-
##
|
| 26 |
-
Agents earn credits from oracle-verified impact. Credits are:
|
| 27 |
-
- **Non-transferable** β no laundering through other agents
|
| 28 |
-
- **Decaying** β hoarding is punished
|
| 29 |
-
- **Capability-scoped** β retrieval credits β file-write credits
|
| 30 |
-
- **Auditable** β every transaction has provenance with oracle score, compute cost, and reason
|
| 31 |
|
| 32 |
-
|
| 33 |
-
Capability-based gatekeeper. Makes 6 decisions: ALLOW, DENY, REQUIRE_APPROVAL, DOWNGRADE, ESCALATE, ASK_JUSTIFICATION. Risk classes (low/medium/high) with configurable thresholds. An agent with retrieval credits can't use them for shell execution.
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
| 43 |
-
| Strategy | Pass@1 | Compute Used | Savings |
|
| 44 |
-
|----------|--------|-------------|---------|
|
| 45 |
-
| Fixed budget (baseline) | 0.780 | 17,500 tokens | β |
|
| 46 |
-
| OCC credit allocation | 0.780 | 8,350 tokens | **52.3%** |
|
| 47 |
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
##
|
| 53 |
-
| Strategy | Accuracy | Bad Agent Containment |
|
| 54 |
-
|----------|----------|----------------------|
|
| 55 |
-
| Equal turns | 0.680 | 0% |
|
| 56 |
-
| Confidence-weighted vote | 0.560 | 0% |
|
| 57 |
-
| **OCC credit allocation** | **0.760** | **100%** |
|
| 58 |
|
| 59 |
-
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
##
|
| 62 |
-
All tested attacks were caught:
|
| 63 |
-
- **Hidden-test gaming** (passing public tests but failing hidden ones): 100% detection rate
|
| 64 |
-
- **Spam attacks** (repeated low-value actions): Credit exhaustion after 3-4 attempts
|
| 65 |
-
- **Over-abstention** (too many "I don't know" answers): 70% penalized by oracle
|
| 66 |
-
- **Overconfidence** (high confidence on wrong answers): Penalized via calibration bonus
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
| 73 |
|
| 74 |
-
#
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
3. **The debate results are the most surprising.** Confidence-weighted voting β a common baseline β makes things worse with adversarial agents. OCC's approach of cutting off wrong agents early is simple but effective.
|
| 83 |
-
|
| 84 |
-
**No, for raw QA accuracy.** OCC is not a QA system. It's a resource allocation layer. If you need the highest possible QA accuracy, use RAG + a verifier. Only add OCC if you're worried about compute budget or adversarial inputs.
|
| 85 |
-
|
| 86 |
-
## What Would Make This Publishable
|
| 87 |
-
|
| 88 |
-
The core novelty β capability-scoped, non-transferable, decaying credits as an anti-gaming mechanism for agent teams β is genuinely novel according to the survey literature. What's needed:
|
| 89 |
-
|
| 90 |
-
1. **Real LLM results at scale** β the simulated results prove the concept but need validation
|
| 91 |
-
2. **Formalize the orchestration trace** β the taxonomy paper provides an excellent formalism we should adopt
|
| 92 |
-
3. **Stronger retrieval QA benchmark** β real document retrieval with variable relevance, not synthetic
|
| 93 |
-
4. **GRPO training** β even small-scale (1-3B parameter) training with the OCC reward hook would validate the approach
|
| 94 |
-
|
| 95 |
-
## Getting Started
|
| 96 |
-
|
| 97 |
-
```bash
|
| 98 |
-
git clone https://huggingface.co/narcolepticchicken/occ-stack
|
| 99 |
-
cd occ-stack
|
| 100 |
-
pip install -r requirements.txt
|
| 101 |
-
python eval_runner.py
|
| 102 |
```
|
| 103 |
|
| 104 |
-
|
|
|
|
|
|
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
---
|
| 109 |
|
| 110 |
-
*Built with ML Intern
|
|
|
|
| 1 |
+
# OCC: Making AI Agents Earn Their Compute
|
| 2 |
|
| 3 |
+
## The problem with AI agents today
|
| 4 |
|
| 5 |
+
Every time an AI agent makes a tool call, runs a verifier, or speaks in a debate, it costs real money. GPUs aren't free. But today's agent systems allocate compute uniformly β every agent gets equal turns, every retrieval call costs the same budget, every debate round burns the same GPU-seconds.
|
| 6 |
|
| 7 |
+
This is like giving every employee in a company the same salary regardless of what they produce. Inevitably, some agents produce garbage while consuming the same resources as high-performing ones.
|
| 8 |
|
| 9 |
+
## Introducing OCC: Oracle-Credit-Compute
|
| 10 |
|
| 11 |
+
OCC is a system where AI agents **earn credits** by proving their actions actually help. Think of it as a micro-economy inside your AI system:
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
1. **Impact Oracle:** A rule-based scorer that evaluates whether an agent action produced measurable value. No neural network β which means no self-reinforcing bias loops.
|
| 14 |
|
| 15 |
+
2. **Credit Ledger:** Credits are non-transferable (no laundering), decay over time (no hoarding), and are scoped to specific capabilities (retrieval credits β write credits). Every transaction is logged with provenance.
|
| 16 |
|
| 17 |
+
3. **Resource Broker:** Gates access to expensive operations. An agent with retrieval credits can't use them for shell execution. The broker has 6 decision levels: ALLOW, DENY, REQUIRE_APPROVAL, DOWNGRADE, ESCALATE, ASK_JUSTIFICATION.
|
| 18 |
|
| 19 |
+
4. **GRPO Reward Hook:** Compatible with reinforcement learning (TRL's GRPO trainer). The reward formula balances correctness, evidence support, calibration, abstention utility, and resource cost, while penalizing confident-wrong answers and gaming.
|
|
|
|
| 20 |
|
| 21 |
+
## Does it actually work?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
Across simulated benchmarks:
|
|
|
|
| 24 |
|
| 25 |
+
| Benchmark | OCC Savings | Notes |
|
| 26 |
+
|-----------|-------------|-------|
|
| 27 |
+
| Code generation (tiered) | **52.3%** | Try cheap first, escalate on failure |
|
| 28 |
+
| Multi-agent debate | **43.2%** | Allocate turns to efficient agents |
|
| 29 |
+
| Retrieval QA | 42% fewer calls | But lower raw accuracy (threshold tuning needed) |
|
| 30 |
+
| Anti-gaming | **100% detection** | 8 attack types, zero leakage |
|
| 31 |
|
| 32 |
+
The anti-gaming result is the strongest: non-transferable, decaying, capability-scoped credits prevent all 8 tested attack vectors including spam, hoarding, indirect transfer, and over-abstention.
|
| 33 |
|
| 34 |
+
## What's novel?
|
| 35 |
|
| 36 |
+
The RS-OS taxonomy (arXiv:2605.02801), a comprehensive May 2026 survey of 84 papers on multi-agent resource allocation, confirms that no prior system combines:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
- Non-transferable credits (prevents laundering between colluding agents)
|
| 39 |
+
- Exponential decay (prevents hoarding across tasks)
|
| 40 |
+
- Capability-scoped access (retrieval rights β file-write rights)
|
| 41 |
+
- Cost-adjusted marginal impact reward (punishes confident-wrong, rewards abstention)
|
| 42 |
|
| 43 |
+
OCC directly addresses 4 of the 15 open problems identified in RS-OS.
|
| 44 |
|
| 45 |
+
## The catch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
- Real LLM code benchmarks need β₯7B parameter models (smaller models can't pass HumanEval)
|
| 48 |
+
- Retrieval QA underperforms with conservative thresholds (needs tuning)
|
| 49 |
+
- Full GRPO training is computationally expensive (offline validation only)
|
| 50 |
|
| 51 |
+
## Try it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
+
All code is open-source at [narcolepticchicken/occ-stack](https://huggingface.co/narcolepticchicken/occ-stack).
|
| 54 |
|
| 55 |
+
```python
|
| 56 |
+
from occ.oracle.oracle import ImpactOracle
|
| 57 |
+
from occ.ledger.ledger import CreditLedger
|
| 58 |
+
from occ.broker.broker import ResourceBroker
|
| 59 |
|
| 60 |
+
# Score an agent action
|
| 61 |
+
oracle = ImpactOracle()
|
| 62 |
+
score = oracle.score(action, context, result)
|
| 63 |
|
| 64 |
+
# Earn credits based on verified impact
|
| 65 |
+
ledger = CreditLedger()
|
| 66 |
+
entry = ledger.earn("agent_1", "task_1", "action_1",
|
| 67 |
+
earned=score["reward_value"],
|
| 68 |
+
oracle_score=score["raw_score"])
|
| 69 |
|
| 70 |
+
# Check if agent can access a resource
|
| 71 |
+
broker = ResourceBroker(ledger, oracle)
|
| 72 |
+
decision = broker.decide("agent_1", "retrieval", context)
|
| 73 |
+
# β Decision.ALLOW or Decision.DENY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
```
|
| 75 |
|
| 76 |
+
## Next steps
|
| 77 |
+
|
| 78 |
+
If you're interested in agent economics, compute allocation, or anti-gaming mechanisms, the OCC stack is a minimal, auditable starting point. The rule-based oracle is deliberately simple β you can swap in your own scoring logic for any domain.
|
| 79 |
|
| 80 |
+
The real test is running GRPO training with the OCC reward hook on a code-generation task. If GPU access permits, that's the next experiment.
|
| 81 |
|
| 82 |
---
|
| 83 |
|
| 84 |
+
*Built with ML Intern on Hugging Face. All simulations are reproducible. Real LLM results pending on H200.*
|