Semantic parameter matching in Web APIs with transformer-based question answering
- OpenAPI, WADL, RAML, and API Blueprint are popular formats for documenting Web APIs. Although these formats are in general both human and machine-readable, only the part of the format describing the syntax of a Web API is machine-understandable. Descriptions, which explain the meaning and purpose of Web API elements, are embedded as natural language text snippets into documents and target human readers but not machines. To enable machines to read and process these state-of-practice Web API documentation, we propose a Transformer model that solves the generic task of identifying a Web API element within a syntax structure that matches a natural language query. For our first prototype, we focus on the Web API integration task of matching output with input parameters and fined-tuned a pre-trained CodeBERT model to the downstream task of question answering with samples from 2,321 OpenAPI documentation. We formulate the original question answering problem as a multiple choice task: given a semantic natural language description of an output parameter (question) and the syntax of the input schema (paragraph), the model chooses the input parameter (answer) in the schema that best matches the description. The paper describes the data preparation, tokenization, and fine-tuning process as well as discusses possible applications of our model as part of a recommender system. Furthermore, we evaluate the generalizability and the robustness of our fine-tuned model, with the result that it achieves an accuracy of 81.46% correctly chosen parameters.
Author of HS Reutlingen | Decker, Christian; Kotstein, Sebastian |
---|---|
DOI: | https://doi.org/10.1109/SOSE58276.2023.00020 |
ISBN: | 979-8-3503-2239-2 |
ISSN: | 2642-6587 |
Erschienen in: | 17th IEEE International Conference on Service-Oriented System Engineering (SOSE 2023), 17-20 July 2023, Athens, Greece, proceedings |
Publisher: | IEEE |
Place of publication: | Piscataway, NJ |
Document Type: | Conference proceeding |
Language: | English |
Publication year: | 2023 |
Tag: | BERT; Web API; question answering; semantic matching; transformer |
Page Number: | 10 |
First Page: | 114 |
Last Page: | 123 |
DDC classes: | 004 Informatik |
Open access?: | Nein |
Licence (German): | In Copyright - Urheberrechtlich geschützt |