# parand1khalili/llm-gnn architecture

> Architecture diagram of the GitHub repository parand1khalili/llm-gnn, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/parand1khalili/llm-gnn
- Repository: https://github.com/parand1khalili/llm-gnn

## Overview

LLM-GNN / SARA is a research system for ground-truth-free graph-node annotation, selective evidence review, and separately controlled GNN evaluation; GraphScope is its static research-evidence viewer. The principal workflow admits frozen graph/text evidence, forms matched B1 and Narrative annotations, routes selected cases through blind verification and evidence checks, then prepares—but does not automatically authorize—downstream evaluation. The graph also preserves routing variants, audits, historical experiments, and website views. Relationships are based on README workflow statements and the shown source excerpts/index; unsampled implementation details are not inferred.

Main entry points: [`web/graphscope/src/main.tsx`](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/main.tsx) (GraphScope app), [`src/llmgnn_sara/sara3/pipeline.py`](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/pipeline.py) (Verification and arbitration), [`src/llmgnn_sara/io/project.py`](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/io/project.py) (Frozen evidence admission), [`src/llmgnn_sara/io/frozen.py`](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/io/frozen.py) (Parsed evidence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_research["Research workflow"]
  node_admission["Frozen evidence admission<br/>[project.py]"]
  node_frozen[("Parsed evidence<br/>[frozen.py]")]
  node_historical["Matched B1 / Narrative<br/>[run_matched.py]"]
  node_annotation["Annotation methods"]
  node_policy["Agreement policy<br/>[policy.py]"]
end

subgraph group_review["SARA review"]
  node_atlas["Class Atlas<br/>[atlas.py]"]
  node_routing["Risk routing variants<br/>[r1_candidate.py]"]
  node_review_inputs["Verifier evidence inputs<br/>[inputs.py]"]
  node_blind_review["Blind review packets"]
  node_pipeline["Verification and arbitration<br/>[pipeline.py]"]
  node_evidence["Evidence validation<br/>[evidence.py]"]
  node_audit[("Private audit receipts<br/>[audit.py]")]
  node_durable["Durable runner<br/>[runner.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_downstream["Controlled GNN plan<br/>[plan.py]"]
  node_gcn["GCN evaluation<br/>[nn.py]"]
  node_metrics["Research evaluation"]
end

subgraph group_website["GraphScope website"]
  node_web_app["GraphScope app<br/>[main.tsx]"]
  node_web_data["Pinned research data<br/>[data.ts]"]
  node_explorer["Graph explorer<br/>[GraphExplorer.tsx]"]
  node_agents["Agents and decisions<br/>[Agents.tsx]"]
  node_methods["Methods and workflow<br/>[sections.tsx]"]
  node_benchmarks["Benchmark views<br/>[BenchmarkViews.tsx]"]
  node_scenario["Prediction desk<br/>[ScenarioDesk.tsx]"]
  node_research_context["Research context"]
end

node_researcher(("Researcher"))
node_web_user(("Website visitor"))

node_researcher -->|"admits evidence"| node_admission
node_admission -->|"loads pinned data"| node_frozen
node_frozen -->|"supplies frozen annotations"| node_historical
node_historical -->|"runs annotation arms"| node_annotation
node_annotation -->|"provides candidate labels"| node_policy
node_policy -->|"provides routing basis"| node_atlas
node_atlas -->|"scores lexical risk"| node_routing
node_routing -->|"selects review cases"| node_pipeline
node_pipeline -->|"builds verifier inputs"| node_review_inputs
node_pipeline -->|"validates responses"| node_evidence
node_pipeline -->|"records receipts"| node_audit
node_blind_review -->|"prepares review"| node_pipeline
node_durable -.->|"executes workflow"| node_pipeline
node_pipeline -->|"proposes admission"| node_downstream
node_downstream -->|"authorizes separate training"| node_gcn
node_gcn -->|"produces evaluation results"| node_metrics
node_researcher -->|"inspects research"| node_web_app
node_web_app -->|"loads and validates"| node_web_data
node_web_app -->|"routes to"| node_explorer
node_web_app -->|"routes to"| node_agents
node_web_app -->|"routes to"| node_methods
node_web_app -->|"routes to"| node_benchmarks
node_web_app -->|"routes to"| node_scenario
node_web_app -->|"provides context"| node_research_context

click node_admission "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/io/project.py"
click node_frozen "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/io/frozen.py"
click node_historical "https://github.com/parand1khalili/llm-gnn/blob/main/recovered_sources/experiments/matched_cora/run_matched.py"
click node_annotation "https://github.com/parand1khalili/llm-gnn/tree/main/src/llmgnn_sara/annotation"
click node_policy "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara2/policy.py"
click node_atlas "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/atlas.py"
click node_routing "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/r1_candidate.py"
click node_review_inputs "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/inputs.py"
click node_blind_review "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/blind_review_pack.py"
click node_pipeline "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/pipeline.py"
click node_evidence "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/evidence.py"
click node_audit "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/audit.py"
click node_durable "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/runner.py"
click node_downstream "https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/downstream/plan.py"
click node_gcn "https://github.com/parand1khalili/llm-gnn/blob/main/recovered_sources/src/models/nn.py"
click node_metrics "https://github.com/parand1khalili/llm-gnn/tree/main/src/llmgnn_sara/evaluation"
click node_web_app "https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/main.tsx"
click node_web_data "https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/data.ts"
click node_explorer "https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/GraphExplorer.tsx"
click node_agents "https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/Agents.tsx"
click node_methods "https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/sections.tsx"
click node_benchmarks "https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/BenchmarkViews.tsx"
click node_scenario "https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/ScenarioDesk.tsx"
click node_research_context "https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/ResearchContext.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_admission,node_frozen,node_historical,node_annotation,node_policy toneBlue
class node_atlas,node_routing,node_review_inputs,node_blind_review,node_pipeline,node_evidence,node_audit,node_durable toneAmber
class node_downstream,node_gcn,node_metrics toneMint
class node_web_app,node_web_data,node_explorer,node_agents,node_methods,node_benchmarks,node_scenario,node_research_context toneRose
class node_researcher,node_web_user toneIndigo
```

## Components

### Research workflow

- [Frozen evidence admission](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/io/project.py): `src/llmgnn_sara/io/project.py`
- [Parsed evidence](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/io/frozen.py): `src/llmgnn_sara/io/frozen.py`
- [Matched B1 / Narrative](https://github.com/parand1khalili/llm-gnn/blob/main/recovered_sources/experiments/matched_cora/run_matched.py): `recovered_sources/experiments/matched_cora/run_matched.py`
- [Annotation methods](https://github.com/parand1khalili/llm-gnn/tree/main/src/llmgnn_sara/annotation): `src/llmgnn_sara/annotation`
- [Agreement policy](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara2/policy.py): `src/llmgnn_sara/sara2/policy.py`

### SARA review

- [Class Atlas](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/atlas.py): `src/llmgnn_sara/sara3/atlas.py`
- [Risk routing variants](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/r1_candidate.py): `src/llmgnn_sara/sara3/r1_candidate.py`
- [Verifier evidence inputs](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/inputs.py): `src/llmgnn_sara/sara3/inputs.py`
- [Blind review packets](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/blind_review_pack.py): `src/llmgnn_sara/sara3/blind_review_pack.py`
- [Verification and arbitration](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/pipeline.py): `src/llmgnn_sara/sara3/pipeline.py`
- [Evidence validation](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/evidence.py): `src/llmgnn_sara/sara3/evidence.py`
- [Private audit receipts](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/audit.py): `src/llmgnn_sara/sara3/audit.py`
- [Durable runner](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/sara3/runner.py): `src/llmgnn_sara/sara3/runner.py`

### Evaluation

- [Controlled GNN plan](https://github.com/parand1khalili/llm-gnn/blob/main/src/llmgnn_sara/downstream/plan.py): `src/llmgnn_sara/downstream/plan.py`
- [GCN evaluation](https://github.com/parand1khalili/llm-gnn/blob/main/recovered_sources/src/models/nn.py): `recovered_sources/src/models/nn.py`
- [Research evaluation](https://github.com/parand1khalili/llm-gnn/tree/main/src/llmgnn_sara/evaluation): `src/llmgnn_sara/evaluation`

### GraphScope website

- [GraphScope app](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/main.tsx): `web/graphscope/src/main.tsx`
- [Pinned research data](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/data.ts): `web/graphscope/src/data.ts`
- [Graph explorer](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/GraphExplorer.tsx): `web/graphscope/src/GraphExplorer.tsx`
- [Agents and decisions](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/Agents.tsx): `web/graphscope/src/Agents.tsx`
- [Methods and workflow](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/sections.tsx): `web/graphscope/src/sections.tsx`
- [Benchmark views](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/BenchmarkViews.tsx): `web/graphscope/src/BenchmarkViews.tsx`
- [Prediction desk](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/ScenarioDesk.tsx): `web/graphscope/src/ScenarioDesk.tsx`
- [Research context](https://github.com/parand1khalili/llm-gnn/blob/main/web/graphscope/src/ResearchContext.tsx): `web/graphscope/src/ResearchContext.tsx`

### Other components

- **Researcher**
- **Website visitor**

## Connections

- Researcher → Frozen evidence admission: admits evidence (evidence: `README.md`)
- Frozen evidence admission → Parsed evidence: loads pinned data (evidence: `src/llmgnn_sara/io/project.py`)
- Parsed evidence → Matched B1 / Narrative: supplies frozen annotations (evidence: `README.md`)
- Matched B1 / Narrative → Annotation methods: runs annotation arms (evidence: `README.md`)
- Annotation methods → Agreement policy: provides candidate labels (evidence: `README.md`)
- Agreement policy → Class Atlas: provides routing basis (evidence: `src/llmgnn_sara/sara3/atlas.py`)
- Class Atlas → Risk routing variants: scores lexical risk (evidence: `src/llmgnn_sara/sara3/r1_candidate.py`)
- Risk routing variants → Verification and arbitration: selects review cases (evidence: `README.md`)
- Verification and arbitration → Verifier evidence inputs: builds verifier inputs (evidence: `src/llmgnn_sara/sara3/pipeline.py`)
- Verification and arbitration → Evidence validation: validates responses (evidence: `src/llmgnn_sara/sara3/pipeline.py`)
- Verification and arbitration → Private audit receipts: records receipts (evidence: `src/llmgnn_sara/sara3/pipeline.py`)
- Blind review packets → Verification and arbitration: prepares review (evidence: `src/llmgnn_sara/sara3/blind_review_pack.py`)
- Durable runner → Verification and arbitration: executes workflow
- Verification and arbitration → Controlled GNN plan: proposes admission (evidence: `README.md`)
- Controlled GNN plan → GCN evaluation: authorizes separate training (evidence: `README.md`)
- GCN evaluation → Research evaluation: produces evaluation results (evidence: `README.md`)
- Researcher → GraphScope app: inspects research (evidence: `README.md`)
- GraphScope app → Pinned research data: loads and validates (evidence: `web/graphscope/src/main.tsx`)
- GraphScope app → Graph explorer: routes to (evidence: `web/graphscope/src/main.tsx`)
- GraphScope app → Agents and decisions: routes to (evidence: `web/graphscope/src/main.tsx`)
- GraphScope app → Methods and workflow: routes to (evidence: `web/graphscope/src/main.tsx`)
- GraphScope app → Benchmark views: routes to (evidence: `web/graphscope/src/main.tsx`)
- GraphScope app → Prediction desk: routes to (evidence: `web/graphscope/src/main.tsx`)
- GraphScope app → Research context: provides context (evidence: `web/graphscope/src/main.tsx`)
