LLM-X-NetLab: the LLM-x poster as real working code - RAG tutor, subnet/topology engines, IP tracker
172
๐ Merged from three sources Darion supplied: the LLM-x Architecture Diagram, the 7 handwritten Computer Networking notes (@i.lovecoding), and his own additions โ an IP address hopper / tracker / mapper (track the start point, middle point and ending point of a path), the Google Earth and Google Flow seats, and Gemini Carbon 4 Extended Thinking.
docker pull credkellar/llm-x-netlab:latest
docker run --rm credkellar/llm-x-netlab:latest
# the container entrypoint runs the self-checks: CHECKS 21/21, VERDICT: PROCEED
From source: python3 main.py demo ยท python3 main.py ask "What does a router do?" ยท python3 main.py track 192.168.1.1,10.0.0.1,203.0.113.10 ยท python3 main.py checks
โน๏ธ Honest badge note: these are static shields.io badges. The repo is live; the live workflow badges activate after the workflows are pasted into
.github/workflows/(plural) and each runs once. The workflow files are ready in the paste pack (ci.yml,docker-publish.yml).
๐ Python stdlib only. One CLI (main.py), one package (llmx_netlab/), JSON-friendly output everywhere.
๐ซ No Web3 component exists in this project โ none is claimed. The infrastructure here is the networking layer itself: IP addressing, subnetting, topologies, devices, protocols and the OSI / TCP-IP models โ all simulated or computed locally.
๐ง Runs anywhere Python 3.11+ runs; ships a python:3.12-slim Docker image whose entrypoint runs the self-checks.
โ๏ธ Hand-rolled TF-IDF embeddings + cosine search, a bigram SLM trained on the notes corpus, ipaddress-based subnet math, graph BFS for topology paths and failure analysis.
โ๏ธ No cloud is required. Seats are names-only: Gemini Carbon 4 Extended Thinking decides (key GEMINI_API_KEY, free tier exists), Muse advises (MODEL_API_KEY, pay-as-you-go, not free, authority: none), Google Earth receives a KML file export (never called live, never fed invented coordinates), Google Flow receives a video plan (rendering is HOLD โ it needs Darion's own Flow access).
๐ The LLM-x poster describes a complete modern LLM system in three layers: clients on top; a core of orchestrator, multi-modal gateway, LLM backbone, RAG, memory and domain modules in the middle; MLOps and guardrails underneath.
๐ The networking notes are a full beginner course in 28 topics: what a network is, PAN/LAN/MAN/WAN, devices, topologies, IP addressing and classes, protocols, the OSI and TCP/IP models, routing vs switching, cables, firewalls, security, bandwidth and the troubleshooting commands.
๐งฉ LLM-X-NetLab is those two things merged into one running system: every poster block is a real module, and the notes are its knowledge โ the RAG corpus, the tutor's textbook, the SLM's training text, and the source of four working engines (subnet, topology, layers, devices) plus the IP path tracker Darion added.
Step by step, python main.py ask "What does a router do?":
Other faces of the same system: subnet (calculator), topology (simulator), layer (mapper), device (advisor), track / track-topo (IP hopper-tracker-mapper), earth (Google Earth KML export), flow (Google Flow video plan), quiz (tutor cards), bench (MLOps benchmark), checks, hold-demo.
flowchart TD
U[User via main.py] --> O[Orchestrator & Planner]
O --> SF[Guardrails: safety filter]
O --> RT{Route}
RT --> RAG[RAG: TF-IDF vectors + knowledge graph over the notes KB]
RT --> NL[NetLab engines: subnet / topology / layer / device]
RT --> TR[Tracker: IP hopper - start / middle / end]
O --> DM[Domain X: code interpreter / data analysis / math solver]
RAG --> C[Council: Carbon 4 DECIDER + Muse advisor]
NL --> C
TR --> C
C -->|PROCEED| A[Grounded answer with sources]
C -->|HOLD| H[Refused: live-network action]
A --> MEM[Session + episodic memory]
O -.-> EARTH[Google Earth seat: KML export]
O -.-> FLOW[Google Flow seat: video plan, render HOLD]
main.py โ the one interfaceflowchart LR
M[main.py] --> D[demo] & A[ask] & S[subnet] & T[topology] & L[layer] & DV[device]
M --> Q[quiz] & TR[track / track-topo] & E[earth] & F[flow] & B[bench] & C[checks / hold-demo]
llmx_netlab/orchestrator.py โ agentic orchestrator & plannerflowchart TD
Q[Question] --> SF[Safety filter]
SF -->|blocked| HOLD[HOLD]
SF -->|ok| R[Decompose + route]
R --> AG[Sub-agent: retriever / subnet / topology / layer / device / tracker]
AG --> EV[Evidence + tool output]
EV --> CO[Council review]
CO -->|PROCEED| ANS[Answer + sources]
CO -->|HOLD| HOLD
llmx_netlab/rag.py โ retrieval-augmented generationflowchart LR
KB[(Networking KB: 21 entries)] --> EMB[TF-IDF embedder]
EMB --> VS[(Vector store)]
Q[Query] --> QE[Query vector]
QE --> VS --> TOP[Top-3 chunks]
KB --> KG[Knowledge graph edges]
TOP --> OUT[Evidence]
KG --> OUT
llmx_netlab/netlab.py โ networking enginesflowchart TD
IN[CIDR / topology / thing / need] --> SC[subnet_info: network, broadcast, hosts, class, private?]
IN --> TS[analyse_topology: links, worst hops, single points of failure]
IN --> LM[layer_of: OSI + TCP/IP layer]
IN --> DA[advise_device: from the notes]
IN --> PS[simulate_ping: path over the simulated graph]
llmx_netlab/iphop.py โ IP hopper / tracker / mapperflowchart LR
P[Supplied IP path OR simulated topology path] --> HOP[Hopper: analyse each hop]
HOP --> TRK[Tracker: START point / MIDDLE points / ENDING point]
TRK --> MAP[Mapper: text path map + per-hop table]
TRK --> KML[Google Earth KML export]
llmx_netlab/brains/ โ the councilflowchart TD
REQ[Action + question + evidence] --> C4[Carbon 4: MAP - MODEL - STRESS - DECIDE]
REQ --> MU[Muse: advice, authority none]
C4 --> V{Strictest wins}
MU --> V
V -->|any HOLD| HOLD[HOLD - never overridable]
V -->|clear| PRO[PROCEED]
llmx_netlab/backbone.py โ LLM core, honestly stagedflowchart LR
PT[Pre-training: bigram counts over KB] --> SFT[SFT: KB entries are the curated set]
SFT --> RLHF[RLHF: feedback log - votes recorded, no offline weight update]
PT --> SLM[Tiny bigram SLM: generates from KB words]
llmx_netlab/kb.py โ the knowledge baseflowchart LR
N[7 handwritten notes pages] --> KB[21 structured entries: title / body / tags]
KB --> RAG[Feeds the RAG corpus]
KB --> SLM[Trains the bigram SLM]
KB --> TUT[Tutor study cards]
llmx_netlab/gateway.py โ multi-modal gateway & input processingflowchart LR
IN[Text input] --> TOK[Tokenizer]
TOK --> VOC[Vocabulary over the KB corpus]
IN2[Image / audio bytes] --> FP[Fingerprint only: sha256 + size, never decoded]
llmx_netlab/embeddings.py โ embedding modelsflowchart LR
DOC[Documents] --> TF[Term frequency]
TF --> IDF[Inverse document frequency]
IDF --> VEC[TF-IDF vectors]
Q[Query vector] --> COS[Cosine similarity]
VEC --> COS
llmx_netlab/memory.py โ memory systemsflowchart LR
TURN[Conversation turn] --> SES[Session memory: short-term, in RAM, last 20]
TURN --> EPI[Episodic memory: long-term JSON, only at an explicit path]
llmx_netlab/domain.py โ domain-specific 'X' modulesflowchart TD
X[Domain X] --> CI[Code interpreter: safe AST arithmetic, no eval]
X --> DA[Data analysis: transfer-time over a link]
X --> MS[Math solver: bandwidth unit conversion]
X --> API[External API integrations: contracts by name, never called]
llmx_netlab/earth.py โ Google Earth seatflowchart LR
TRK[Tracked path] --> C{Caller supplied coordinates?}
C -->|yes, their own points| KML[KML: START / MIDDLE / END placemarks + path line]
C -->|no| NOTE[KML with a no-coordinates note - nothing invented]
llmx_netlab/flowvideo.py โ Google Flow seatflowchart LR
TOPIC[Notes topic] --> G[Ground in the KB entry]
G --> SB[Storyboard: setup / explain / diagram / recap]
SB --> HOLD[Render: HOLD - needs Darions own Flow access]
llmx_netlab/guardrails.py โ guardrails & monitoringflowchart LR
REQ[Request / answer] --> SF[Content safety filter]
REQ --> PII[PII redaction for logs]
CALL[Any timed call] --> LAT[Latency monitor: samples + summary]
llmx_netlab/mlops.py โ MLOps & continuous learningflowchart LR
BENCH[Fixed 10-question benchmark] --> GRADE[Grade retriever top-1 vs expected entry]
GRADE --> ACC[Accuracy report]
VOTE[Helpful? votes] --> LOG[Feedback log - human promotes to KB, never automatic]
Permanently refused: live_network_scan, real_ping_sweep, live_packet_capture, execute_shell_command, fetch_live_url, modify_real_network_config, connect_live_device, geolocate_real_ip, track_person_device, identify_ip_owner. Run python main.py hold-demo โ it exits 2. (A scoped live-socket mode is in progress at Darion's direction: TCP/DNS/HTTP to named targets; person-tracking and geolocation stay refused permanently.)
Content type
Image
Digest
sha256:275bf56cfโฆ
Size
41.4 MB
Last updated
3 days ago
docker pull credkellar/llm-x-netlab