Metadata-Version: 2.4
Name: ckg-nvidia-ai
Version: 0.4.0
Summary: NVIDIA AI developer stack as a traversable knowledge graph — 20 CKGs, 998 nodes, MCP-native
Project-URL: Homepage, https://graphifymd.com
Project-URL: Repository, https://github.com/Yarmoluk/ckg-nvidia-ai
Project-URL: Bug Tracker, https://github.com/Yarmoluk/ckg-nvidia-ai/issues
Author-email: Daniel Yarmoluk <daniel.yarmoluk@gmail.com>
License: MIT
Keywords: ai-agents,cuda,knowledge-graph,llm,mcp,nemo,nim,nvidia,tensorrt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: mcp[cli]>=1.0.0
Description-Content-Type: text/markdown

<!-- mcp-name: io.github.Yarmoluk/ckg-nvidia-ai -->
# ckg-nvidia-ai

**Deterministic agent context for the NVIDIA AI stack.**

20 CKGs · 998 nodes · MCP-native · free · patent pending

---

## What this is

NVIDIA's developer ecosystem is deep — NIM, NeMo, TensorRT, CUDA, Isaac, Cosmos, Riva, and 13 more stacks, each with its own dependency structure. When an agent or LLM tries to reason across that surface, it guesses. It hallucinates prerequisites. It misses the edge between FP8 quantization and Hopper SM90.

This package gives your agent a pre-structured dependency graph of the NVIDIA AI stack that it can traverse instead of guess. Every concept is a node. Every relationship between concepts is a declared, typed edge. The agent calls `query_ckg()` and gets the actual dependency chain — not a summary generated from documentation.

```
query_ckg("TensorRT-LLM", "nvidia-tensorrt-triton", depth=3)

→ TensorRT-LLM requires:
    CUDA Toolkit → CUDA Driver API, cuBLAS
    FP8 / FP4 Quantization → Hopper SM90 Architecture
  TensorRT-LLM enables:
    Triton Inference Server → NIM Microservice Runtime
```

That traversal cost 269 tokens. A RAG call over the same question costs ~2,982.

---

## What this is not

This is a **rapid start scaffold**, not a complete knowledge base.

- It covers the declared relationships we are confident in. Where we are not confident, edge confidence defers to `null` — unreviewed, not wrong.
- `REQUIRES` vs `RELATES_TO` is a judgment call on every edge. We default conservative: if the dependency is hard, it's `REQUIRES`. If it's conceptual proximity, it's `RELATES_TO`. The distinction matters because agents use it to plan.
- You will find gaps. That is expected. The scaffold accelerates you — it does not replace domain expertise.

The right mental model: **this is the obstacle course your agent runs before you add your domain layer on top.**

---

## How the graph is built

Each domain is a DAG (directed acyclic graph) stored as typed edge CSV:

```
ConceptID, ConceptLabel, Dependencies, TaxonomyID
1, TensorRT-LLM,    "",                    Framework
2, CUDA Toolkit,    "",                    Platform
3, FP8 Quantization,"2:REQUIRES",          Optimization
4, Hopper SM90,     "2:REQUIRES",          Architecture
5, Speculative Dec., "1:REQUIRES|4:REQUIRES", Optimization
```

**Edge types and what they mean for your agent:**

| Type | Meaning | Agent use |
|---|---|---|
| `REQUIRES` | Hard prerequisite — cannot function without it | Plan sequencing, gap detection |
| `ENABLES` | Unlocks a capability — not strictly required | Optimization paths |
| `RELATES_TO` | Conceptual proximity — not a dependency | Disambiguation, context |
| `IMPLEMENTS` | Concrete instantiation of an abstraction | Architecture mapping |

**Confidence:** edges where we are not certain carry `confidence: null`. This is not a signal of incorrectness — it means the edge has not been reviewed against ground truth yet. Treat null-confidence edges as plausible scaffolding, not audited fact.

When an agent queries a concept, the server runs BFS over declared edges. The answer is composed entirely from traversed relationships — not token prediction, not RAG retrieval, not probabilistic inference over documentation.

**The graph doesn't guess. It traverses.**

---

## Why this opens your context window

A typical agent grounding pass on NVIDIA docs: paste the relevant pages, embed them, retrieve chunks, hope the model connects the right dots. That consumes context before any reasoning happens.

With a CKG, the grounding step is a graph traversal call — ~269 tokens. Your context window is now free for reasoning, not for re-encoding what the graph already knows.

If your domain is more specific than what these 20 CKGs cover, we can build a compressed domain CKG for your exact use case. That further narrows the signal — more precision, less noise, more context for what actually matters to your agent.

---

## Domains

| Domain | Description |
|---|---|
| `nvidia-nim` | NVIDIA Inference Microservices — deployment, scaling, speculative decoding |
| `nvidia-nemo` | NeMo framework — training, PEFT, guardrails, evaluation |
| `nvidia-tensorrt-triton` | TensorRT-LLM + Triton Inference Server — quantization, batching, KV cache |
| `nvidia-cuda-toolkit` | CUDA compiler, PTX, memory hierarchy, Hopper/Blackwell features |
| `nvidia-cuda-x-libraries` | cuBLAS, cuDNN, cuFFT, NCCL, Thrust — the acceleration layer |
| `nvidia-hpc-sdk` | OpenACC, OpenMP, CUDA Fortran, multi-GPU scaling |
| `nvidia-omniverse` | Universal Scene Description, simulation, digital twins |
| `nvidia-isaac` | Isaac Lab + Isaac Sim — robot learning, sensor simulation |
| `nvidia-cosmos` | Physical AI world foundation models — video generation, tokenization |
| `nvidia-drive` | Autonomous vehicle stack — perception, planning, safety validation |
| `nvidia-jetson` | Edge AI platform — Orin NX, AGX, DeepStream, Holoscan |
| `nvidia-clara` | Healthcare AI — MONAI, Parabricks genomics, BioNeMo, Holoscan SDK |
| `nvidia-metropolis` | Intelligent video analytics — VLMs, TAO Toolkit, DeepStream |
| `nvidia-riva` | Speech AI — ASR, TTS, NLP pipelines, streaming |
| `nvidia-gameworks` | Graphics R&D — DLSS, RTX, PhysX, Reflex |
| `nvidia-developer-tools` | Nsight, CUPTI, Compute Sanitizer, profiling stack |
| `nvidia-graphics-research` | Research graphics — neural rendering, path tracing, differentiable rendering |
| `nvidia-ai-enterprise` | Enterprise AI platform — NIM blueprints, governance, fleet management |
| `nvidia-developer-ecosystem` | Cross-cutting: NGC, DGX, Inception, AgentIQ, MCP integration |
| `nvidia-openshell` | Agent sandbox runtime — policy enforcement, CVEs, authorization gaps |

---

## Install

```bash
pip install ckg-nvidia-ai
```

Or run without installing:

```bash
uvx ckg-nvidia-ai
```

---

## Use as MCP Server

### Claude Desktop

```json
{
  "mcpServers": {
    "nvidia-ai": {
      "command": "uvx",
      "args": ["ckg-nvidia-ai"]
    }
  }
}
```

### Claude Code

```bash
claude mcp add nvidia-ai -- uvx ckg-nvidia-ai
```

### Cursor / Cline / Windsurf

```json
{ "mcpServers": { "nvidia-ai": { "command": "uvx", "args": ["ckg-nvidia-ai"] } } }
```

---

## Tools

### `list_domains()`
Returns all 20 NVIDIA AI domains. Start here.

### `search_concepts(query, domain)`
Find concepts by keyword within a domain.

```
search_concepts("speculative decoding", "nvidia-nim")
→ Speculative Decoding [Optimization]
   Draft Model [Component]
   KV Cache [Infrastructure]
```

### `query_ckg(concept, domain, depth=3)`
Traverse the graph from a concept — prerequisites and dependents.

```
query_ckg("FlashAttention-3", "nvidia-cuda-x-libraries", 3)
→ Prerequisites: SRAM Tiling → On-Chip Memory → Warp Occupancy → ...
   Enables: Multi-Head Attention → KV Cache → Speculative Decoding
```

### `get_prerequisites(concept, domain)`
Full ordered prerequisite chain — everything to understand or deploy first.

```
get_prerequisites("Isaac Lab", "nvidia-isaac")
→ Isaac Lab → Isaac Sim → USD Composer → Omniverse Kit → ...
```

---

## Benchmark

Built on the [KRB Benchmark v0.6.2](https://github.com/Yarmoluk/ckg-benchmark/blob/main/paper/main.pdf):

| System | F1 | Tokens/query | Cost/1K queries |
|---|---|---|---|
| **CKG** | **0.471** | **269** | **$7.81** |
| RAG | 0.123 | 2,982 | $76.23 |
| GraphRAG | 0.120 | — | — |

~4× F1 · 11× fewer tokens · auditable by design

---

## The Accuracy and Cost Paradox

At enterprise scale, AI systems hit a counterintuitive wall: adding more agents, more retrieval steps, and more context makes accuracy *drop* while cost climbs. This is the **Context Transaction Cost (CTC)** trap.

CTC is the compound tax paid every time context crosses an agent boundary:

| Symbol | Name | What it measures |
|--------|------|-----------------|
| τ | Token Latency Burden | Compute + time cost of transmitting context across a boundary |
| H | Handoff Cost | Cost of serializing and transferring context between agents |
| C | Compression Loss | Information destroyed when context is summarized mid-chain |
| D | Semantic Drift | Meaning shift as downstream agents re-interpret the context |
| V | Verification Burden | Cost of checking that agent outputs are correct and grounded |
| G | Governance Cost | Accountability, permission, and audit overhead |

**Key finding:** In multi-agent pipelines, CTC efficiency falls from 18.2 in Q1 to 1.6 by Q4 — a 91% efficiency collapse without any model change. You are paying more for less accurate results.

**How CKG attacks CTC structurally:**

- **τ eliminated at the source.** Traversal costs 269 tokens instead of 2,982. Every hop in a multi-agent chain is 11× cheaper.
- **H replaced by a pointer.** The agent calls `get_prerequisites()` instead of re-retrieving and re-summarizing. No serialization cost.
- **C doesn't exist.** The graph is the compressed form. There is nothing to summarize mid-chain — the compression happened once, offline, by a human expert reviewing every edge.

D, V, and G are still your team's responsibility. But they become tractable: every edge is auditable, every traversal is deterministic, and governance operates on a structured layer instead of unstructured context blobs.

**Intelligence per Watt.** A deterministic traversal call is not the same as a probabilistic retrieval call. At 97 domains and 11× token efficiency, CKG recovers compute, latency, and API spend that accumulates invisibly in unstructured pipelines. Fewer inference calls, less redundant context transmission, lower energy cost per correct answer.

The paradox inverted: accuracy goes up, cost goes down, resource footprint shrinks.

---

## EVAL

```
benchmark: ckg-benchmark v0.6.2
dataset: huggingface.co/datasets/danyarm/ckg-benchmark
benchmarked: false
rag_baseline_f1: 0.123
graphrag_baseline_f1: 0.120
mean_tokens: 269
paper: github.com/Yarmoluk/ckg-benchmark/blob/main/paper/main.pdf
```

We are actively working to standardize evaluation for domain-specific CKGs — both F1 accuracy and traversal fidelity. If you want to benchmark your domain or contribute queries for the NVIDIA domains, open an issue.

---

## Want a CKG for your domain?

These 20 graphs are the scaffold. Your specific use case — a particular NVIDIA product vertical, your internal agent's knowledge gaps, your team's documentation — can be structured into a dedicated CKG that is tighter, more precise, and domain-tuned.

**What we build:**
- Custom domain CKGs from your documentation, codebase, or knowledge base
- Agent grounding layers for specific NVIDIA workflows (NIM deployment, Isaac robot training, Clara clinical pipelines)
- Sealed domain appliances — a CKG + query server bundled for your team or product

**[Start a conversation → graphifymd.com](https://graphifymd.com)**

---

## Corrections welcome

Spotted a wrong edge? An `RELATES_TO` that should be `REQUIRES`? A missing concept?

Open an issue or PR — edge corrections are the highest-value contribution. See [CONTRIBUTING.md](CONTRIBUTING.md).

---

## Related

- **[ckg-mcp](https://pypi.org/project/ckg-mcp/)** — 97 domains across all topics (NVIDIA + science, finance, law, healthcare, and more)
- **[KRB Benchmark](https://huggingface.co/datasets/danyarm/ckg-benchmark)** — open benchmark dataset
- **[graphifymd.com](https://graphifymd.com)** — CKG catalog and Context-as-a-Service

---

*Built by [Graphify.md](https://graphifymd.com). Patent pending.*
