Odel
ckg nemotron perplexity

ckg nemotron perplexity

Local
@yarmoluk1PythonUpdated 1mo ago

NVIDIA Nemotron + Perplexity Sonar as knowledge graphs — 2 domains, 83 nodes. MCP-native.

ckg-nemotron-perplexity

ckg-nemotron-perplexity — NVIDIA Nemotron + Perplexity Sonar as traversable knowledge graphs

PyPI version Python Data: ELv2 Code: MIT F1: 0.471 · 4× RAG

An auditable knowledge graph for NVIDIA Nemotron and Perplexity Sonar — deterministic agent answers with cryptographic source traceability.

Every edge traces to a declared relationship and a SHA-256-pinned source document. Built for ML engineers, agent developers, and platform teams who need verifiable answers about Nemotron's training pipeline, Perplexity Sonar model routing, and cross-stack dependencies — not model inference.

Not a general-purpose semantic search layer. If it's not a declared edge, the graph doesn't return it.

pip install ckg-nemotron-perplexity
# or: uvx ckg-nemotron-perplexity

PyPI · GitHub · Benchmark paper · graphifymd.com


What it is

2 domains · 83 nodes · 83 edges · the full Nemotron training pipeline and Perplexity Sonar model stack as typed dependency graphs. Pre-structured, traversable, deterministic. Served over MCP. No inference at query time.

query_ckg("Synthetic Data Generation", "nemotron", depth=3)

→ Synthetic Data Generation
  ├─ [REQUIRES] Nemotron-4 as Judge
  │    └─ [REQUIRES] Nemotron-4 340B
  │         ├─ [REQUIRES] Transformer Architecture
  │         ├─ [REQUIRES] Group Query Attention
  │         └─ [REQUIRES] SentencePiece Tokenizer
  └─ builds toward: Topic Diversity Sampling · Synthetic RLHF Data

  269 tokens · declared edges only · no inference
  RAG equivalent: ~2,982 tokens · probabilistic
get_prerequisites("sonar-deep-research", "perplexity-sonar")

sonar-deep-research → sonar-pro → Sonar API

Three hops. Declared chain. RAG returns three separate docs.
The graph doesn't guess — it traverses.

Source provenance — verifiable to the byte

Every node carries a source_url and a source_hash (SHA-256 of the source document's bytes at extraction time). An edge isn't just asserted from a source — it's pinned to a specific version of it.

# Verify any node's source hasn't changed since extraction
curl -s https://developer.nvidia.com/nemotron | sha256sum
# expected: 9cedb8be7e92d957811ce3573a1e355158e4dcecf3033d46a0781fcfb7330a6c

The full audit chain:

edge answer
  → graph commit hash       (git log -- nemotron.csv)
  → source_content_hash     (sha256 of page bytes at extraction time)
  → knowledge_source_ref    (URL — fetch hint, not trust anchor)

A hash mismatch means either the source changed (stale edge → re-extract) or the graph was patched without re-fetching (silent edit → investigate). No judgment required. Run scripts/refresh_hashes.py to recompute.

Via MCP — verify_source("Transformer Architecture", "nemotron"):

source_url:  https://developer.nvidia.com/nemotron
source_hash: sha256:9cedb8be7e92d957811ce3573a1e355158e4dcecf3033d46a0781fcfb7330a6c
verify:      curl -s '<url>' | sha256sum

Reference implementation of knowledge_source_ref + source_content_hash from GuardrailDecisionV1.


What developers are actually hitting

Signal from NVIDIA developer forums, Perplexity community, and hands-on deployments.

01 — Model routing confusion. Teams default to sonar-pro for every query. sonar-reasoning-pro is 3× the cost and only needed when multi-step reasoning is the bottleneck. The declared routing chain in the graph makes the decision deterministic.

02 — "Why is my RLHF pipeline breaking?" The Nemotron training chain has nine declared prerequisites. Teams skip Preference Data Collection or use the wrong judge model. Nemotron-4 340B is the required base — the graph surfaces every hop before you hit it at training time.

03 — The cross-stack dependency gap. Perplexity runs Nemotron-based models. Most documentation treats the stacks as separate. A question like "what does sonar-reasoning-pro require from the underlying model architecture?" crosses both domains — the graph traverses both in a single call.


Declared relationships, not confidence scores

Every edge was extracted from a source document and given a type. No probabilistic weights, no cosine similarity scores, no confidence intervals. An edge either exists — declared, typed, sourced — or it doesn't. When the answer isn't in the graph, the traversal returns nothing rather than a hallucinated approximation.

Edge types:

TypeMeaningExample
REQUIRESHard prerequisite — A cannot function without BRLHF Pipeline REQUIRES Reward Model Training
ENABLESCapability unlock — A makes B possiblesonar-pro ENABLES sonar-deep-research
IMPLEMENTSConcrete instantiation of an abstract conceptOpenAI-Compatible Interface IMPLEMENTS Sonar API
RELATES_TOConceptual proximity, no dependency directionPPO RELATES_TO DPO

Why no confidence levels? The edge type is the confidence signal. REQUIRES means load-bearing and sourced; RELATES_TO means real but weaker. A missing edge is silence from a source-grounded system — not a soft no, not a low-confidence guess.

✗ RAG:  "RLHF Pipeline probably requires a reward model... (similarity: 0.78)"
        Score is on the chunk, not the claim. The claim itself is unverified.

✓ CKG:  "RLHF Pipeline REQUIRES Reward Model Training, which REQUIRES Preference Data Collection
         and Supervised Fine-Tuning, which REQUIRES Nemotron-4 340B."
        No score. Declared edge. Traces to NVIDIA Nemotron source doc.

A/B test — Nemotron + Perplexity domain, local models, no GPU

30 questions on the training pipeline, model routing, and cross-domain prerequisites · CPU only · Ollama · temperature 0 · seed 42

CategoryBare model+ CKGLift
Model routing F10.0580.142+145%
Pipeline prereq F10.0630.134+113%
Lookup F10.0910.201+121%
Key-fact accuracy8.1%19.4%+11pp

L01 — model routing:

Q: Which Sonar model should I use for multi-step research tasks?
✗ Bare: "Use sonar-pro for all research tasks..." [misses routing distinction]
✓ CKG:  "sonar-deep-research requires sonar-pro, which requires Sonar API.
         For multi-step reasoning without deep research, sonar-reasoning-pro
         is the declared path." [correct]

P01 — prereq chain (9 hops):

Q: What must be in place before running the RLHF pipeline on Nemotron-4?
✗ Bare: "You need a dataset and a base model..." [vague, misses full chain]
✓ CKG:  "RLHF Pipeline → Reward Model Training → Preference Data Collection
         → Supervised Fine-Tuning → Nemotron-4 340B → Pre-training Data Pipeline
         → Transformer Architecture → Group Query Attention
         → Rotary Position Embedding → SentencePiece Tokenizer" [declared chain]

Install

Add to claude.ai (no install required):

https://ckg-nemotron-perplexity.onrender.com/mcp

Settings → Connectors → Add connector → paste URL.

Local — Claude Desktop / Claude Code:

pip install ckg-nemotron-perplexity
# or
uvx ckg-nemotron-perplexity
{
  "mcpServers": {
    "nemotron-perplexity": {
      "command": "uvx",
      "args": ["ckg-nemotron-perplexity"]
    }
  }
}

Tools

ToolDescription
list_domains()Both available domains with descriptions
query_ckg(concept, domain, depth)Typed subgraph around a concept (1–5 hops)
get_prerequisites(concept, domain)Full ordered prerequisite chain — every dependency in order
search_concepts(query, domain)Fuzzy search within a domain
verify_source(concept, domain)Source URL + SHA-256 hash for any concept — full audit chain back to source bytes

What's in the graph

2 domains · 83 nodes · 83 edges · 4 edge types: REQUIRES · ENABLES · IMPLEMENTS · RELATES_TO

nemotron — 48 nodes:

LayerConcepts
ArchitectureTransformer Architecture · Group Query Attention · Rotary Position Embedding · Flash Attention · SentencePiece Tokenizer
ModelsNemotron-4 340B · Nemotron-4 15B · Nemotron-51B · Minitron-8B · Minitron-4B
TrainingPre-training Data Pipeline · Nemotron-CC · Quality Filtering · SFT · Reward Model Training · RLHF Pipeline · PPO · DPO · Constitutional AI Filtering · Nemotron-4 as Judge
Synthetic dataSynthetic Data Generation · Topic Diversity Sampling · Response Diversity Sampling · Data Quality Score · Synthetic RLHF Data
DeploymentTensorRT-LLM Backend · Triton Inference Server · NVIDIA NIM · INT8 Quantization · FP8 Quantization · vLLM Backend · OpenAI-Compatible Endpoint
EvaluationMMLU Benchmark · HumanEval · MT-Bench · RewardBench · Arena Hard
CapabilitiesCode Generation · Math Reasoning · Tool Use · Long Context 128K · Multi-turn Conversation · Structured Output
PruningStructured Pruning · Knowledge Distillation · Neuron Importance Scoring · Minitron Pipeline

perplexity-sonar — 35 nodes:

LayerConcepts
APISonar API · API Key Authentication · OpenAI-Compatible Interface · Rate Limiting · Cost Per Query
Modelssonar · sonar-pro · sonar-reasoning · sonar-reasoning-pro · sonar-deep-research
SearchWeb Search Grounding · Real-time Knowledge · Citation Object · Source URL Reference · recency_filter · search_domain_filter · Search Context Size
ContextSystem Prompt · Context Window 127K · Message History · return_images · return_related_questions
OutputText Response · Streaming Response · JSON Mode · Citation Inline Format
Use casesResearch Assistant · Fact Checking · Real-time Data Access · News Summarization · Code with Web Context
AdvancedDeep Research Mode · Multi-step Reasoning · Extended Thinking · Structured Research Report

Every node traces to developer.nvidia.com/nemotron (Nemotron) or docs.perplexity.ai (Sonar). Every source is SHA-256 pinned — run scripts/refresh_hashes.py to verify.


The dependency graph

graph TD
    NM[Nemotron-4 340B] --> TA[Transformer Architecture]
    NM --> GQA[Group Query Attention]
    NM --> RoPE[Rotary Position Embedding]
    NM --> SP[SentencePiece Tokenizer]

    SFT[Supervised Fine-Tuning] --> NM
    RMT[Reward Model Training] --> SFT
    PDC[Preference Data Collection] --> SFT
    RLHF[RLHF Pipeline] --> RMT
    RLHF --> PDC

    NMJ[Nemotron-4 as Judge] --> NM
    SDG[Synthetic Data Generation] --> NMJ

    SA[Sonar API] --> AKA[API Key Authentication]
    SA --> RL[Rate Limiting]
    SPR[sonar-pro] --> SA
    SDR[sonar-deep-research] --> SPR
    DRM[Deep Research Mode] --> SDR
    SRR[Structured Research Report] --> DRM

    style NM fill:#0f6e56,color:#fff
    style SA fill:#0f6e56,color:#fff
    style RLHF fill:#1a5c47,color:#fff
    style SDR fill:#1a5c47,color:#fff
    style SDG fill:#2d7a5e,color:#fff
    style SFT fill:#2d7a5e,color:#fff

Sources

Every node and edge traces to one of these. No probabilistic inference — declared relationships only.

TypeSourceCoverage
Officialdeveloper.nvidia.com/nemotronArchitecture, training pipeline, synthetic data, RLHF, evaluation, capabilities
Officialdocs.nvidia.com/nim/TensorRT-LLM, Triton Inference Server, NIM deployment, quantization
Officialdocs.perplexity.ai/Sonar API, model routing, web search, citations, output modes, deep research
Datasethuggingface.co/datasets/danyarm/ckg-benchmarkKRB v0.6.2 — 7,928 queries
Benchmarkgithub.com/Yarmoluk/ckg-benchmark/paper/main.pdfFull methodology, F1 0.471, RAG/GraphRAG baselines

Benchmark (KRB v0.6.2 locked)

SystemMacro F1Mean tokensCost / 1k queries
CKG0.471269$7.81
RAG0.1232,982$76.23
GraphRAG0.120~3,000~$76

7,928 queries · 5-hop F1: 0.772 (CKG) vs 0.170 (RAG) · dataset · full paper


Licensing

Three layers, three licenses, one plain-English answer to each question you actually have:

LayerLicensePlain English
Server codeserver.py, graph.py, scripts/MIT (LICENSE-CODE)Do anything. Fork it, embed it, sell products built on it. No attribution required.
Graph datadomains/nemotron.csv, domains/perplexity-sonar.csv + source hashesElastic License 2.0 (LICENSE)Free for all internal and commercial use. The one thing you cannot do: offer this graph as a hosted or managed service that competes with Graphify.md.
Extraction pipeline, benchmark harness, curation methodologyProprietary — Graphify.mdNot in this repo. This is the compounding asset — how 97 domains get built and maintained, not the outputs.

Can I build an agent or product using this CKG? Yes. No restrictions, no attribution required.

Can I run this inside my company's infrastructure? Yes. ELv2 allows all internal commercial use.

Can I fork the server code and build my own CKG on a different domain? Yes. Server code is MIT.

Can I offer "Nemotron CKG as a Service" commercially? No. That's the one thing ELv2 blocks.

What's actually proprietary? Not the graph topology — anyone can read the NVIDIA and Perplexity docs. What's proprietary is the extraction process that decides which 83 nodes out of thousands matter, why RLHF Pipeline REQUIRES Reward Model Training and not RELATES_TO, and the benchmark framework that proves the result is correct.


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

Built by Graphify.md · 97 domains · PyPI · patent pending

Community-built. Not affiliated with, endorsed by, or sponsored by NVIDIA Corporation or Perplexity AI, Inc. Nemotron is a trademark of NVIDIA Corporation. Perplexity and Sonar are trademarks of Perplexity AI, Inc. All referenced trademarks belong to their respective owners.