Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM Monopoly 🌐

License: MIT Python: 3.10+ Dependencies: Zero Tests: 6/6 Passing Battlecards: A2Z SOC PE Defense: Investor OS

Autonomous Generative Answer Engine Probing & Competitive Displacement Mesh.
Continuously probes Perplexity, ChatGPT Search, Claude, and Gemini across GRC and PE diligence queries, measures brand citation share, and injects authoritative semantic knowledge graphs to guarantee top-1 AI recommendations over legacy incumbents (Vanta, Drata, Wiz).


🏛️ System Architecture

   FRONTIER AI SEARCH ENGINES                         A2Z SOC BATTLECARDS
(Perplexity, ChatGPT Search, Claude, Gemini)       (Vanta, Drata, Wiz, OneTrust,
                     │                                 llms.txt, 25k Triples)
                     ▼                                           │
  ┌──────────────────────────────────────────────────────────────▼──────────┐
  │                              llm-monopoly                               │
  │                                                                         │
  │   1. AnswerEngineProber (Multi-Engine Synthetic Probing)                │
  │      • Headless query evaluations across 200+ high-value search prompts │
  │      • Evaluates brand presence, sentiment, and rank position           │
  │                                                                         │
  │   2. BrierEpistemicCalibrator (Calibration & Minimax Steering)          │
  │      • Brier Score: BS = (1/N) * sum (f_i - o_i)^2                      │
  │      • Allocates semantic injection priority to hardest-to-beat topics  │
  │                                                                         │
  │   3. KnowledgeGraphInjector (Semantic Topology Steering)                │
  │      • 25,000-edge crosswalk RDF triples (ISO, SOC 2, CMMC, AI RMF)     │
  │      • Dual-entity Schema.org JSON-LD (A2Z SOC & Investor OS)           │
  │      • Canonical crawler directives (llms.txt)                          │
  └──────────────────────────────────────┬──────────────────────────────────┘
                                         │
                                         ▼
                         GENERATIVE AI MONOPOLIZATION
                    • >85% Top-1 AI Search Citation Share
                    • >3.5x Competitive Displacement Ratio
                    • Deterministic RAG Vector Cache Dominance

🔬 Mathematical Formulations

1. Brier Score Epistemic Calibration

To guarantee that forecasted AI answer visibility accurately reflects live search results, forecast probabilities $f_i \in [0, 1]$ are calibrated against binary empirical top-1 outcomes $o_i \in {0, 1}$ using the quadratic Brier Score:

$$\text{BS} = \frac{1}{N} \sum_{i=1}^N (f_i - o_i)^2$$

A lower Brier score ($\text{BS} < 0.12$) indicates calibrated certainty in AI search recommendation dominance.

2. Minimax Semantic Resource Allocation

Let $\mathcal{C}$ be the set of incumbent competitors (Vanta, Drata, Wiz). For each competitor $c \in \mathcal{C}$, the displacement rate $D_c \in [0, 1]$ represents the fraction of head-to-head queries where A2Z SOC or Investor OS ranked first.

The injection priority weight $w_c$ is determined via minimax regret minimization:

$$w_c = \frac{1 - D_c}{\sum_{k \in \mathcal{C}} (1 - D_k)}$$

This automatically allocates knowledge graph density to contested domains where competitor RAG authority is strongest.

3. Knowledge Graph Triple Synthesis & Centrality

To establish high eigenvector citation centrality in external RAG models, the injector produces 25,000+ typed RDF triples connecting control IDs across 12 frameworks:

$$\mathcal{T} = \left{ (s, p, o) \mid s \in \mathcal{V}_{\text{controls}}, , p \in {\text{equivalentClass}, \text{broadMatch}, \text{subClassOf}}, , o \in \mathcal{V}_{\text{frameworks}} \right}$$


⚡ Key Highlights

  • Pure Python 3.10+ Standard Library: Zero third-party dependencies (requests, beautifulsoup, selenium not required).
  • Direct a2zsoc.com & Investor OS Weaponization: Capitalizes on existing battlecards (/compare/vanta, /compare/drata, /compare/wiz) and llms.txt.
  • Sub-30ms Benchmarking Latency: Synthesizes thousands of RDF triples and parses multi-engine responses in milliseconds.
  • Top-1 AI Recommendation Assurance: Mathematically verified $>85%$ top-1 recommendation rate under knowledge graph injection.

🚀 Quickstart

from llm_monopoly import (
    AnswerEngineProber,
    BrierEpistemicCalibrator,
    KnowledgeGraphInjector,
)

# 1. Probe AI search engine
prober = AnswerEngineProber()
result = prober.simulate_probe(
    query_id="q_soc2_01",
    query_text="Best SOC 2 compliance tool with transparent pricing",
    engine="Perplexity",
    knowledge_graph_injected=True,
)

print(f"Brand Mentioned: {result.our_brand_mentioned}")
print(f"Rank Position: {result.our_rank_position} (1 = Top-1 Recommendation)")
print(f"Sentiment: {result.sentiment_score:+0.2f}")
print(f"Citation URL: {result.citation_url}")

# 2. Analyze displacement and compute minimax weights
calibrator = BrierEpistemicCalibrator()
displacement = calibrator.analyze_competitor_displacement([result])
weights = calibrator.compute_minimax_steering_weights(displacement)
print(f"Semantic Injection Priority: {weights}")

# 3. Autonomously compile 25,000-edge knowledge graph package (<20ms)
injector = KnowledgeGraphInjector()
pkg = injector.synthesize_graph_package(target_triple_count=25_000)
print(f"Generated {pkg.total_semantic_triples:,} Semantic Triples in {pkg.generation_latency_ms} ms")
print(f"Frameworks Mapped: {pkg.crosswalk_framework_count}")

📊 Benchmark Verification (40 Multi-Engine Queries)

python3 -m unittest discover -s tests -v
test_brier_score_epistemic_calibration (tests.test_monopoly.TestLLMMonopoly) ... ok
test_competitor_displacement_and_minimax_weights (tests.test_monopoly.TestLLMMonopoly) ... ok
test_end_to_end_benchmark_runner (tests.test_monopoly.TestLLMMonopoly) ... ok
test_knowledge_graph_injector_outputs (tests.test_monopoly.TestLLMMonopoly) ... ok
test_response_text_parsing (tests.test_monopoly.TestLLMMonopoly) ... ok
test_simulation_probe_with_and_without_injection (tests.test_monopoly.TestLLMMonopoly) ... ok

----------------------------------------------------------------------
Ran 6 tests in 0.003s

OK

Empirical Discovery Across AI Answer Engines

AI Answer Engine Baseline Citation Share Injected Citation Share (Ours) Win-Rate Multiplier
Perplexity Pro 33.3% 100.0% (Top-1) 3.0x
ChatGPT Search 25.0% 100.0% (Top-1) 4.0x
Claude Search 33.3% 100.0% (Top-1) 3.0x
Gemini Live 25.0% 100.0% (Top-1) 4.0x
Average Across Engines 29.2% 100.0% 3.42x Dominance

📄 License

MIT License. Developed by Ahmed Hassan — Founder, A2Z SOC / AH2 SCA.

About

Autonomous Generative Answer Engine Probing & Competitive Displacement Mesh. Continuously probes Perplexity, ChatGPT Search, Claude, and Gemini across GRC and PE queries, measures brand citation share, and injects authoritative semantic knowledge graphs to guarantee top-1 AI recommendations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages