Skip to search boxSkip to navigationSkip to main content

Semantic architectures for domain-specific programming AI agents: lessons from a JavaScript semantic assistant

  • Muhammad Ishaq(corresponding author)
    ,
  • Muhammad Sarmad
    ,
  • Muhammad Asim
    ,
  • ,
  • Nikola Ivković
*Corresponding author for this work
Research Output:
Contribution to journal
Article
Research
Peer-review

Open access

Abstract

This work proposes a semantic ontology-based dataset leveraging fine tuning large language model to facilitate JavaScript debugging and domain-specific code generation. Ontology is used to train the model with a dataset that has an exact or logical relationship between JavaScript syntax elements. The system gains deep subject knowledge with the help of a formal linked database, producing a high-quality QandA dataset from it, and employing parameter-efficient fine-tuning of a base LLM (LLaMA-3B). The fine-tuned model is assessed through a strict framework for domain competency. Code correctness, logical consistency, adaptability, and error detection efficiency metrics were used for evaluation. Experimental results show that the ontology-augmented model performs much better across all measures than baseline generic LLaMA model. Baseline here refers to a model refined on non-ontology data, and retrieval-based techniques. Logical verification and comparisons of fine-tuning techniques (BitFit, LoRA, and standard tuning) is provided. For performance contextualization, an additional benchmark against a cutting-edge code model (CodeLlama) is provided. The enhanced outcomes show that using ontologies to incorporate structured semantic knowledge can result in significant improvements in domain-specific code comprehension, providing a repeatable route for creating specialized programming AI systems. For reproducibility, the implementation and resources (ontology, SPARQL queries, code) are made publicly accessible.

Research Output Information

Output type

Research Output:
Contribution to journal
Article
Research
Peer-review

Original language

English

Article number

23959

Journal (Volume, Issue Number)

Scientific Reports (Volume 16, Issue 1)

Publication milestones

  • Published - 12/2026

Publication status

Published - 12/2026

Publication IDs

  • Scopus: 105046515194
  • PubMed: 42185547

Publication metrics