Fine-Tuning Language Models for Structured Botanical Trait Extraction and Species Comparison
As artificial intelligence (AI) becomes central to biodiversity research, transforming morphological descriptions of species into structured data remains a challenge, particularly in botany, where species descriptions are rich in detail but lack formal structure. Despite the progress brought by transformer architectures (Vaswani et al. 2017) and their multilingual variants such as CamemBERT (Martin et al. 2020), most large language models (LLMs) are trained on general-domain English corpora, limiting their effectiveness for non-English biodiversity applications. We present a two-stage information extraction pipeline that fine-tunes LLaMA (Large Language Model Meta AI)- based LLMs (Touvron et al. 2023) to extract botanical traits from French floristic texts and enable species-level comparison at scale. Trained on a curated corpus of legacy botanical descriptions and expert-validated French question-answer pairs, the system demonstrates how domain-specific fine-tuning can bridge the gap between narrative botanical knowledge and structured trait data (Fig. 1). At the user-interface layer, we add a third stage that automatically converts the trait-value pairs generated by the question-answering module into a structured CSV table for downstream use. Our approach unifies question generation and trait extraction within a single information extraction workflow. First, predefined botanical traits (e.g., leaf shape, flower color) are reformulated as natural-language questions tailored to each species description. Then, using these questions as prompts, the model identifies and extracts the corresponding trait values: for example, extracting "lanceolate" as the standardized leaf shape from "lanceolate leaves." This converts unstructured text into consistent character-state pairs aligned with botanical ontologies. A proof-of-concept showing the input species descriptions processed by the pipeline is shown in Fig. 2. The LLaMA model was fine-tuned via Low-Rank Adaptation (LoRA) (Hu et al. 2021) on ~17,000 manually verified French question-answer pairs derived from floristic descriptions across multiple French-language flora, including: Flore de Nouvelle-Calédonie and Flore du Cameroun . Building on FloraNER (Named Entity Recognition) (Nainia et al. 2024a) and earlier CamemBERT-based pipelines (Nainia et al. 2024b), the current system, F-LoRA-QA (Nainia et al. 2025b), substantially improves structured trait generation from domain-specific descriptions. In evaluation, F-LoRA-QA outperformed an untuned LLaMA baseline with ~4× higher BLEU score (Bilingual Evaluation Understudy), a 16% gain in semantic similarity, and exact-match accuracy rising from 2% to 24%. Expert botanists further validated trait accuracy, completeness, fluency, and terminology, supporting critiques of over-reliance on automatic metrics for domain question answering (Nainia et al. 2025a). A key application is the enrichment of descriptor-based systems like Xper³ (Kerner et al. 2025), which rely on structured trait matrices to describe and differentiate taxa. Fig. 3 and Fig. 4 illustrate trait discovery, value extraction, and a comparison matrix with evidence links, supporting descriptor systems and interoperable biodiversity databases.
Authors
- Régine Vignes Lebbe
- Jihad Zahir (ORCID: https://orcid.org/0000-0003-1263-2593)
- Ayoub Nainia
Institutions
- Cadi Ayyad University (MA)
- Centre National de la Recherche Scientifique (FR)
- École Pratique des Hautes Études (FR)
- Sorbonne Université (FR)
- Institut de Systématique, Évolution, Biodiversité (FR)
Publication Details
- Journal
- Biodiversity Information Science and Standards
- Published
- 2026-01-16
- DOI
- https://doi.org/10.3897/biss.10.183035
- Primary Topic
- Biomedical Text Mining and Ontologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Agence Nationale de la Recherche
- HORIZON EUROPE Framework Programme