Table of Contents
Fetching ...

Capability-Driven Skill Generation with LLMs: A RAG-Based Approach for Reusing Existing Libraries and Interfaces

Luis Miguel Vieira da Silva, Aljosha Köcher, Nicolas König, Felix Gehlhoff, Alexander Fay

TL;DR

The paper introduces LLMCap2Skill, a retrieval-augmented framework that generates executable robot skills from formal capability descriptions by reusing existing libraries and interfaces. It combines capability ontologies with user-defined skill specifications and API documentation, then uses a LangChain-based retrieval pipeline to inform an LLM that generates Python/ROS 2 skills within the pySkillUp framework. Evaluation on a mobile robot in simulation demonstrates largely correct and executable skills with notable variance between LLMs, underscoring improvements from interface retrieval and few-shot prompts. The approach reduces manual coding effort and shows promise for scalable, cross-language skill generation, with future work focusing on broader frameworks and formal verification.

Abstract

Modern automation systems increasingly rely on modular architectures, with capabilities and skills as one solution approach. Capabilities define the functions of resources in a machine-readable form and skills provide the concrete implementations that realize those capabilities. However, the development of a skill implementation conforming to a corresponding capability remains a time-consuming and challenging task. In this paper, we present a method that treats capabilities as contracts for skill implementations and leverages large language models to generate executable code based on natural language user input. A key feature of our approach is the integration of existing software libraries and interface technologies, enabling the generation of skill implementations across different target languages. We introduce a framework that allows users to incorporate their own libraries and resource interfaces into the code generation process through a retrieval-augmented generation architecture. The proposed method is evaluated using an autonomous mobile robot controlled via Python and ROS 2, demonstrating the feasibility and flexibility of the approach.

Capability-Driven Skill Generation with LLMs: A RAG-Based Approach for Reusing Existing Libraries and Interfaces

TL;DR

The paper introduces LLMCap2Skill, a retrieval-augmented framework that generates executable robot skills from formal capability descriptions by reusing existing libraries and interfaces. It combines capability ontologies with user-defined skill specifications and API documentation, then uses a LangChain-based retrieval pipeline to inform an LLM that generates Python/ROS 2 skills within the pySkillUp framework. Evaluation on a mobile robot in simulation demonstrates largely correct and executable skills with notable variance between LLMs, underscoring improvements from interface retrieval and few-shot prompts. The approach reduces manual coding effort and shows promise for scalable, cross-language skill generation, with future work focusing on broader frameworks and formal verification.

Abstract

Modern automation systems increasingly rely on modular architectures, with capabilities and skills as one solution approach. Capabilities define the functions of resources in a machine-readable form and skills provide the concrete implementations that realize those capabilities. However, the development of a skill implementation conforming to a corresponding capability remains a time-consuming and challenging task. In this paper, we present a method that treats capabilities as contracts for skill implementations and leverages large language models to generate executable code based on natural language user input. A key feature of our approach is the integration of existing software libraries and interface technologies, enabling the generation of skill implementations across different target languages. We introduce a framework that allows users to incorporate their own libraries and resource interfaces into the code generation process through a retrieval-augmented generation architecture. The proposed method is evaluated using an autonomous mobile robot controlled via Python and ROS 2, demonstrating the feasibility and flexibility of the approach.
Paper Structure (11 sections, 2 figures, 2 tables)

This paper contains 11 sections, 2 figures, 2 tables.

Figures (2)

  • Figure 1: Skill generation using by retrieving relevant resource interfaces and combining them with user input to construct a prompt for the .
  • Figure 2: Class structure for resource interface documentation templates and specific implementations.