knowledge-graph-builder

Builds domain knowledge graphs from structured databases and LLM-extracted literature claims.

89|5|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill knowledge-graph-builder-cuhk-aim-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knowledge-graph-builder
Source: https://github.com/CUHK-AIM-Group/NeuroDiscovery/tree/main/skills/knowledge-graph-builder
Command: npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill knowledge-graph-builder-cuhk-aim-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires networkx, requests, openai, biopython, nilearn, nibabel, and includes scripts (resource) components.

What problem does it solve? Constructing a domain-specific knowledge graph requires combining curated databases with unstructured scientific literature, which is tedious and error-prone to do manually. This Skill provides a three-phase pipeline that ingests structured data sources, extracts claims from PubMed abstracts with LLMs, and generates ranked research hypotheses from the resulting graph. ## Core Features & Use Cases - Structured Data Ingestion: Import concepts and relations from NeuroNames, MeSH, DisGeNET, Cognitive Atlas, and Nilearn brain atlases into a NetworkX DiGraph with typed edges and provenance. - Literature Claim Extraction: Search PubMed, deduplicate candidates against the existing graph, extract structured claims (subject, predicate, object, p-value, sample size, conditions, population) via LLM prompts, and resolve entities with a 5-level cascading matcher. - Hypothesis Engine: Batch-generate cross-domain hypotheses, detect contradictions and gaps, find trending evidence, and rank results by confidence, novelty, evidence, and testability. - Use Case: A neuroimaging researcher runs batch extraction over 10 diseases across 27 years of PubMed abstracts with checkpoint/resume support, then queries the graph for novel hippocampus-to-disease paths to prioritize experiments. ## Quick Start Ask the agent to build a knowledge graph by ingesting atlas data and extracting claims from PubMed papers about Alzheimer's disease neuroimaging studies.

Frequently Asked Questions about knowledge-graph-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a knowledge graph from PubMed papers?

Search PubMed with disease and neuroimaging keywords, deduplicate candidates against the existing graph, then send abstracts to an LLM with a structured extraction prompt. Extracted claims are resolved to concept IDs and ingested as nodes and typed edges in a NetworkX DiGraph.

How do I extract structured claims from scientific abstracts with an LLM?

Send the complete abstract with a concise prompt listing field names like subject, predicate, object, p_value, and sample_size. Use temperature 0.0 and max_tokens of 8192, and fix common JSON errors such as double brackets in the LLM output.

What data sources can be ingested into a biomedical knowledge graph?

Supported sources include NeuroNames and Nilearn atlases for brain region hierarchies, MeSH for medical subject headings, DisGeNET for gene-disease associations, and Cognitive Atlas for tasks and concepts. New sources can be added with a template ingestion script.

How does entity resolution work when ingesting extracted claims?

Entity names are resolved with a 5-level cascading strategy: exact match, case-insensitive match, alias match, substring match preferring the shortest name, then creation of a new concept node. String matching is recommended for graphs under 100K concepts.

Why does LLM claim extraction return empty responses?

Empty responses usually occur when the prompt plus expected output exceeds the model's token window. Keep extraction prompts concise, send the full abstract without truncation, and set max_tokens to 8192 rather than 4096.

How do I resume a long batch extraction job after interruption?

The batch extraction pipeline saves a checkpoint after each disease and year combination, tracking completed work in a checkpoint JSON file. Rerunning the same command auto-resumes from the checkpoint, or pass the no-resume flag to start fresh.