Question and answer pair generation method and device based on API document, equipment and storage medium

By structuring the API document and combining multiple logical inferences with the language model, the target Q&A data is generated, which solves the problem of inefficient Q&A data generation and inability to simulate practical problems in the existing technology, and realizes efficient and accurate Q&A data generation.

CN119739755AActive Publication Date: 2025-04-01SHENZHEN SMARTMORE TECH CO LTD
5 Cites 1 Cited by

Patent Information

Application Number
CN202510252098.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-04-01
Estimated Expiration
2045-03-05

AI Technical Summary

Technical Problem

The existing technology is inefficient and cannot truly simulate the practical problems that enterprises may encounter when generating Q&A data. This is mainly because manual design problems require input of an open source language model and does not consider the API call method in different application scenarios.

Method used

By structuring the document function blocks in the API document, structured function blocks are generated, and multiple logical inferences are performed in combination with the preset prompt template and language model to generate target question and answer data. The method includes determining the question to be entered, generating an intermediate question, code generation request and final code answer, and using it as the target question and answer data after the code answer is verified.

Benefits of technology

It improves the efficiency of Q&A data generation, ensures that the generated Q&A data can truly simulate the actual problems that the enterprise may encounter, and avoids the inefficiency of manual design problems.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention relates to a question and answer pair generation method and device based on an API document, equipment and a storage medium. The method comprises the following steps: performing structured processing on a document function block in an obtained API document to obtain a structured function block; determining a to-be-input question based on the structured function block and a preset first prompt template; inputting the to-be-input question into a preset language model for processing, and outputting an intermediate question; based on the intermediate question, the language model and a preset second prompt template, determining a question answer and a code generation request; inputting the code generation request into a language model for processing, and outputting a code answer; and in response to passing of the code answer verification, taking the to-be-input question, the intermediate question, the question answer, the code generation request and the code answer corresponding to the code answer as a target question-answer pair. By adopting the method and the device, the generation efficiency of the question and answer pairs can be improved, and the generated question and answer pairs can really simulate actual problems possibly encountered by enterprises.
Need to check novelty before this filing date? Find Prior Art