Semantic Band-Gap (LLM + KG)

NL query to the Knowledge graph.
RDF / SPARQL · 1.36M triples NL→SPARQL via fine-tuned Llama 3.2 3B 150,987 materials · symmetry-aware screening

A neuro-symbolic pipeline for symmetry-aware materials screening. Multi-constraint questions in materials science are rarely blocked by a single missing number — they are blocked by constraints living in different formats. Finding a candidate for ultraviolet frequency doubling, for instance, requires a non-centrosymmetric crystal (even-order nonlinear response vanishes identically under inversion symmetry — a selection rule, not a tendency) and a wide band gap. Symmetry comes from the crystal structure, the gap from an electronic-structure calculation, composition from a formula string. Here that is one question: "non-centrosymmetric materials with band gap above 2.5 eV" returns 9,429 candidates from 150,987, provenance attached. Two LoRA adapters fine-tuned on Llama 3.2 (3B) drive it — one generating SPARQL from natural language, one extracting deduplicated triples from unstructured text. A deterministic sanitizer sits between model and graph, repairing and schema-enforcing every generated query, turning understood failure modes into corrected output. The RDF schema covers composition, crystal system, centrosymmetry, band gap, and provenance across 1.36M triples. Node identity is the Materials Project material_id, not chemical formula: one composition crystallises into structurally distinct phases, and 91.6% of multi-entry compositions were confirmed to hold genuinely different structures via pymatgen StructureMatcher.

Live Demo GitHub