Enhanced Conditional Generation of Double Perovskite by Knowledge-Guided Language Model Feedback

A multi-agent LLM framework that generates double perovskite compositions with LLM, domain-knowledge, and ML-surrogate text gradients

arXiv 2025

Inhyo Lee1,†, Junhyeong Lee1,†, Jongwon Park1, KyungTae Lim2,*, Seunghwa Ryu1,3,*

1Department of Mechanical Engineering, KAIST 2Graduate School of Culture Technology, KAIST 3KAIST InnoCORE PRISM-AI Center

*Corresponding authors

(a) A stability map of the double perovskite composition space where an initial design moves along an LLM-based gradient, a knowledge-informed gradient, and an ML-driven gradient toward different regions. (b) A Formula Proposal Agent proposes composition x; LLM-based, knowledge-informed, and ML-based evaluator agents produce losses L_LLM, L_DK, and L_ML; matching text gradient agents feed the sum of their gradients back to the proposer. (c) End-to-end workflow: user query, condition extractor, the multi-agent feedback loop, and a POSCAR formatter for DFT calculation. Example: for the query 'lead-free halide double perovskite that is thermodynamically stable', the proposed Cs2CuInI6 gets an LLM gradient suggesting replacing Cu with Ag, a knowledge-informed gradient reporting a new tolerance factor of 4.545 and suggesting replacing iodide with bromide, and an ML gradient predicting instability and suggesting Cs2AgInI6.
Figure 1. Overall architecture of the multi-agent LLM framework for condition-aware double perovskite (DP) composition generation. (a) The LLM agent explores the DP composition space by following text gradients: LLM-based (green), domain-knowledge-enriched (blue), and ML-informed (red). (b) The Formula Proposal Agent proposes a composition, Evaluator Agents estimate text-based losses for the given condition, and Text Gradient Agents suggest the update direction. (c) End-to-end workflow from a natural-language query to a POSCAR structure for DFT validation.

Abstract

Double perovskites (DPs) are promising candidates for sustainable energy technologies due to their compositional tunability and compatibility with low-energy fabrication, yet their vast design space poses a major challenge for conditional materials discovery. This work introduces a multi-agent, text gradient-driven framework that performs DP composition generation under natural-language conditions by integrating three complementary feedback sources: LLM-based self-evaluation, DP-specific domain knowledge-informed feedback, and ML surrogate-based feedback. Analogous to how knowledge-informed machine learning improves the reliability of conventional data-driven models, our framework incorporates domain-informed text gradients to guide the generative process toward physically meaningful regions of the DP composition space. Systematic comparison of three incremental configurations, (i) pure LLM generation, (ii) LLM generation with LLM reasoning-based feedback, and (iii) LLM generation with domain knowledge-guided feedback, shows that iterative guidance from knowledge-informed gradients improves stability-condition satisfaction without additional training data, achieving over 98% compositional validity and up to 54% stable or metastable candidates, surpassing both the LLM-only baseline (43%) and prior GAN-based results (27%). Analyses of ML-based gradients further reveal that they enhance performance in in-distribution (ID) regions but become unreliable in out-of-distribution (OOD) regimes. Overall, this work provides the first systematic analysis of multi-agent, knowledge-guided text gradients for DP discovery and establishes a generalizable blueprint for MAS-driven generative materials design aimed at advancing sustainable technologies.

Keywords Double perovskite Generative materials design Multi-agent LLM system Text gradients Knowledge-guided machine learning Tolerance factor DFT Energy above hull Surrogate model / OOD

Method

(a) Agent graph: user query and condition extractor feed the Formula Proposal Agent and Database Comparator; LLM-based, knowledge-informed, and ML-based evaluators and text gradient agents form feedback paths; POSCAR Matcher (Cases 1 and 2) or POSCAR Formatter (Case 3) prepares DFT calculation. (b) The proposal agent prompt with conditions, history buffer, and gradients; the database comparator checks the Materials Project database of 1,494 known DPs plus newly discovered ones. (c) LLM-based evaluator and text gradient prompts. (d) Knowledge-informed evaluator computing the new tolerance factor tau = r_X/r_B − n_A(n_A − (r_A/r_B)/ln(r_A/r_B)), stable if tau < 4.18, using Shannon ionic radii from a scientific paper. (e) ML-based evaluator calling a stable/unstable surrogate classifier on the DP composition.
Figure 2. The multi-agent feedback framework with LLM-based (green), knowledge-informed (blue), and ML-based (red) evaluators and text-gradient agents added stepwise across Cases 1–3 and the ML extension.

All agents are implemented with LangChain and LangGraph on the o3-mini reasoning model. Three incremental configurations are compared:

  1. Case 1: zero-shot LLM generation. A Formula Proposal Agent proposes a DP composition for the extracted conditions; a Database Comparator rejects compositions already among the 1,494 known DPs in the Materials Project, and a POSCAR Matcher adapts the structure of the most similar known DP.
  2. Case 2: + LLM-based feedback. An LLM-based Evaluator checks the conditions using pretrained knowledge, and an LLM-based Text Gradient Agent writes natural-language suggestions (which elements to change) for the next iteration.
  3. Case 3: + knowledge-informed feedback. A Knowledge-Informed Evaluator computes the new tolerance factor τ = rX/rB − nA(nA − (rA/rB)/ln(rA/rB)) from Shannon ionic radii, and a matching text-gradient agent steers the composition toward τ < 4.18, the empirical stability threshold.
  4. + ML extension. In each case, a CrabNet stability classifier trained on Materials Project DPs can add an ML-based evaluator and text gradient.
  5. Evaluation. Five natural-language queries (stable halide, chalcogenide, and oxide DPs; lead-free halide DPs; rare-earth-containing oxide DPs) with 30 generated DPs each (150 per case). Stability is checked with DFT (VASP, PBE): negative formation energy and energy above hull of 0 eV/atom is stable, below 0.05 eV/atom metastable.

Main Results

  • Knowledge-guided feedback yields more stable candidates. The fraction of stable or metastable DPs rises from about 43% (Case 1) to 48% (Case 2) and 54% (Case 3), compared with about 27% reported for an earlier GAN-based approach. Case 3 reaches an average energy above hull of about 0.09 eV/atom, roughly 30% lower than Cases 1 and 2.
  • All generated compositions have negative formation energy, and iterative feedback lowers it further; e.g. in Case 2 (query 1) from −0.77 eV/atom for the initial Rb2CuInI6 to −2.55 eV/atom for the final Rb2AgSbF6.
  • Strict constraints have a cost. Case 3 averages about 6.1 rejections per accepted DP versus 0.6 in Case 2 (27.7 for chalcogenides), and about 98.5% of its outputs meet the element and perovskite-type conditions versus 100% in Cases 1–2. It also explores wider chemistry (Na, K, Li at the A-site; Tl, Cd, Pb, Ba, Sr at B/B′).
  • ML gradients help only in-distribution. The surrogate reaches weighted F1 of about 0.85–0.88 on in-distribution queries but about 0.4–0.5 out of distribution (Top-10 ElMD about 1.6); for the OOD chalcogenide query, Case 2 + ML averages 0.38 eV/atom energy above hull, nearly twice Case 3 without ML (0.19 eV/atom).
Summary of Cases 1–3 over all five queries (150 DPs per case), as reported in the text of Section 2.3 for Figures 3 and 4 (approximate values, as stated in the paper).
ConfigurationStable or metastable DPsElement and perovskite-type conditions metAvg. rejections per accepted DP
GAN-based prior work~27%––
Case 1: LLM only~43%100%–
Case 2: + LLM feedback~48%100%~0.6
Case 3: + knowledge-informed feedback~54%~98.5%~6.1

BibTeX

@misc{lee2025enhancedconditionalgenerationdouble,
      title={Enhanced Conditional Generation of Double Perovskite by Knowledge-Guided Language Model Feedback},
      author={Inhyo Lee and Junhyeong Lee and Jongwon Park and KyungTae Lim and Seunghwa Ryu},
      year={2025},
      eprint={2511.22307},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2511.22307},
}
More projects from KAIST MLP Lab →