HoneyComb: A Flexible LLM-Based Agent System for Materials Science

Huan Zhang, Yu Song, Ziyu Hou, Santiago Miret, Bang Liu

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities in general-purpose tasks but often struggle with the specialized requirements of materials science, where precision, up-to-date knowledge, and complex computational reasoning are paramount. This paper introduces HoneyComb, an LLM-based agent system specifically engineered to bridge this gap. HoneyComb integrates a massive, curated knowledge base (MatSciKB) with a dynamic, self-improving Tool-Hub. By enabling LLMs to access external professional knowledge and execute complex computational tools through an agentic workflow, HoneyComb significantly reduces hallucinations and outperforms baseline models like GPT-4 and Llama-3 on domain-specific benchmarks. Our results demonstrate that providing models with a "utility belt" of tools and a "library" of verified facts is a more effective and scalable approach than continuous fine-tuning for specialized scientific domains.

Introduction

While LLMs are increasingly used as research assistants, they face three significant hurdles in scientific domains: outdated knowledge due to frozen training data, a tendency to hallucinate specific constants or formulas, and an inability to perform the precise numerical modeling required in materials science. Continuous fine-tuning is often prohibitively expensive and fails to solve the underlying problem of grounding. HoneyComb addresses these challenges by shifting the paradigm from a standalone model to an agentic system. This system provides the LLM with a structured environment where it can retrieve verified information and execute code to solve multi-step scientific problems.

The HoneyComb Architecture

The HoneyComb framework is built upon three core pillars designed to provide both the "knowledge" and the "tools" necessary for materials science research.

1. MatSciKB: The Knowledge Base

MatSciKB is a structured, tree-like database containing over 38,000 entries categorized into 16 distinct domains, such as thermodynamics and atomic structure. This repository is compiled from diverse sources, including ArXiv abstracts, Wikipedia, academic textbooks, and curated datasets. By providing a structured hierarchy, the system ensures that the agent has access to a broad spectrum of verified scientific facts.

2. Tool-Hub and Inductive Tool Construction

Rather than relying solely on pre-defined APIs, HoneyComb utilizes a novel method called Inductive Tool Construction. The system uses an LLM to generate Python functions for specific scientific queries, which are then verified by human experts. These functions are decomposed into "atomic functions"—reusable, granular code snippets. This modularity allows the agent to recombine these atomic units to solve new, unseen problems, mimicking the way a human researcher chains different software modules together for a project.

3. The Agentic Workflow

When a user query is received, the HoneyComb agent follows a structured execution path:

  • Tool Assessor: Identifies the necessary tools required for the task.
  • Tool Executor: Breaks the query into logical sub-questions and executes the relevant tools, observing the outputs to refine subsequent steps.
  • Hybrid Retriever: Uses a combination of BM25 keyword search (effective for chemical formulas) and Contriever semantic search (effective for conceptual understanding) to pull relevant context from MatSciKB.

Experimental Evaluation

The system was evaluated using two primary benchmarks to test its breadth and depth of knowledge:

  • MaScQA: A set of 650 complex questions derived from the Graduate Aptitude Test in Engineering (GATE), covering 14 materials science domains.
  • SciQA: A large-scale dataset of 11,679 multiple-choice science questions.

Key Results

HoneyComb provided a substantial performance boost across various base models:

  • GPT-4 Augmentation: On the MaScQA benchmark, GPT-4’s accuracy improved from 58.46% to 79.07% when integrated into the HoneyComb framework.
  • Specialized Model Boost: HoneyBee, a model already fine-tuned for materials science, saw its SciQA performance increase from 33.96% to 79.69%.
  • Ablation Studies: Testing confirmed that both the knowledge base and the tool hub are essential. Removing either component led to a significant drop in accuracy, proving that factual retrieval and computational execution are complementary strengths.

Discussion and Insights

The success of HoneyComb highlights several critical insights for the future of AI in science. First, Tools Over Training: providing a model with the right tools and retrieval systems is often more effective and cost-efficient than attempting to embed all scientific knowledge into a model's weights through fine-tuning. Second, Decomposition is Key: by breaking complex tools into atomic units, the system gains the flexibility to handle a wider variety of tasks. Finally, Hybrid Retrieval is necessary to handle the dual nature of scientific queries, which often require both precise terminology (formulas) and conceptual reasoning.

Limitations and Future Work

Despite its success, HoneyComb's reasoning remains dependent on the underlying LLM; if the base model fails in the initial planning phase, the tools cannot compensate for the logic error. Furthermore, the current system is primarily text and code-based. Future iterations aim to integrate multi-modal data, such as crystal structure visualizations and experimental spectra, to further enhance its utility in the laboratory setting. While HoneyComb excels at existing benchmarks, its performance on "frontier" tasks—such as the discovery of entirely new materials—remains a subject for future investigation.

Summary updated

BibTeX
@inproceedings{zhang2024honeycomb,
  author = {Huan Zhang and Yu Song and Ziyu Hou and Santiago Miret and Bang Liu},
  title = {{HoneyComb: A Flexible LLM-Based Agent System for Materials Science}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.192},
}
Figure