LAMOST document celestial body identification information extraction method and device, equipment and medium
Patent Information
- Application Number
- CN202311341443.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-10-17
AI Technical Summary
但是,这些模型需要大量训练数据,容易过拟合,并且它们的解释性和健壮性较差
[0051]从上述技术方案可以看出,本公开提供的基于大语言模型Claude2的LAMOST文献天体标识信息提取方法、装置、设备及介质,具有以下有益效果:
Smart Images

Figure CN117454895B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a method, apparatus, device and medium for extracting celestial body identification information from LAMOST documents based on the large language model Claude2. Background Technology
[0002] LAMOST (Large Sky Area Multi-Object Fiber Spectroscopic Telescope) is a large multi-object fiber spectroscopic telescope located in China, renowned for its large-scale spectroscopic observations and efficient target selection system, providing invaluable observational data for astronomical research. LAMOST's survey capabilities and scientific contributions have made it an important facility in the international astronomical community, attracting numerous scholars to study its data and resulting in a significant increase in the number of published papers. Platforms such as the Astrophysical Data System (ADS) and ArXiv index its rich literature resources, which contain valuable researched data, including object identifiers, coordinate information, mass, size, brightness, etc. A comprehensive understanding of the research foundations of certain data, and the ability to conduct in-depth extrapolations based on these foundations, is one of the keys to achieving major breakthroughs. Therefore, assisting researchers in efficiently linking and cross-referencing LAMOST literature and observational data is an essential task. To achieve this goal, the most important task is to extract three types of entity information from a large number of documents: LAMOST celestial identifier, right ascension (RA) and declination (Dec), and OBSID (the three can identify a unique celestial body; although OBSID is a unique number for the celestial body's spectrum, researchers often use it to represent the corresponding celestial body).
[0003] The task of extracting entity information from text is called Named Entity Recognition (NER), and many researchers have also conducted research and applied NER in the field of astronomy.
[0004] Early Named Entity Recognition (NER) methods were primarily rule-based and dictionary-based, using manually defined rules to identify named entities. Lesteven et al. developed the DJIN system, which utilizes resources such as astronomical naming dictionaries to match astronomical names and identifiers in literature. It can also track the location and frequency of each astronomical name within the literature, thereby assessing the relevance of the literature to specific astronomical objects. The most successful application of this system is CDS's integration with literature retrieval and star catalog retrieval services. This allows readers to access relevant literature for a given astronomical object using its identifier, and conversely, readers can directly access all astronomical identifiers contained within a document while browsing it, clicking on an identifier to link to SIMBAD for related information. This association and cross-referencing service between literature and observational data greatly facilitates astronomers' literature reading and research work, demonstrating the crucial role of entity information extraction in connecting heterogeneous astronomical information resources.
[0005] With the rise of machine learning, NER methods based on statistical models have become increasingly popular, such as maximum entropy models and hidden Markov models. Murphy et al. used a maximum entropy model to train a NER system specifically for astronomical literature, aiming to identify named entities with significant scientific value in the literature, such as source type, source name, and equipment name. These methods can learn the contextual information and distribution characteristics of entities from large-scale corpora, achieving more accurate entity recognition. However, they rely too heavily on human intervention, have poor generalization and transferability, and cannot adapt to the increasingly diverse NER needs in the field of astronomy. Furthermore, they struggle to complete large-scale NER tasks efficiently and in a timely manner.
[0006] To further address the challenge of timely and effective extraction and utilization of named entity data from a large volume of astronomical literature, Grezes et al. attempted to introduce large-scale pre-trained language models. They pre-trained the BERT language model on 395,499 astronomical documents, obtaining a superior astroBERT language model for the astronomical domain. Using astroBERT, they attempted to extract information such as institution names from the documents. At the first Scientific Publication Information Extraction Workshop in 2022, the Detecting Entities in the Astrophysics Literature (DEAL) project was proposed. DEAL is a shared task that encourages participants to build systems capable of automatically extracting astronomical named entities. Large-scale pre-trained language models such as mT5 and BERT were considered effective tools by participants. However, these models require large amounts of training data, are prone to overfitting, and have poor interpretability and robustness. Summary of the Invention
[0007] (a) Technical problems to be solved
[0008] To address the existing technical problems, this disclosure proposes a method, device, equipment, and medium for extracting LAMOST celestial body identification information from massive astronomical documents based on the large language model Claude2, so as to realize the automated batch extraction of three types of LAMOST celestial body identification information from massive astronomical documents.
[0009] (II) Technical Solution
[0010] This disclosure provides a method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2, including:
[0011] Using keywords, we can selectively crawl PDF files of LAMOST-related literature on the arXiv platform to create a local LAMOST literature database.
[0012] Construct a Prompt-NER prompting strategy that includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation;
[0013] With the prompting strategy of the constructed Prompt-NER, the large language model Claude2 is used to extract three types of celestial identification information from the LAMOST literature in the local LAMOST literature database.
[0014] In the above scheme, the step of using keywords to selectively crawl PDF files of LAMOST-related literature on the arXiv platform to form a local LAMOST literature database includes: using "Large Sky Area Multi-Object Fiber Spectroscopic Telescope" or "LAMOST" as keywords, using a literature crawling tool to search the arXiv platform for literature containing the strings "Large Sky Area Multi-Object Fiber Spectroscopic Telescope" or "LAMOST" in the full text range; if they can be found, downloading the PDF files of these literatures to form a local LAMOST literature database.
[0015] In the above scheme, the step of using keywords to selectively crawl PDF files of LAMOST-related literature on the arXiv platform to form a local LAMOST literature database also includes: regularly performing crawling operations to obtain the latest LAMOST-related literature and ensuring that the data is continuously updated.
[0016] In the above scheme, the step of constructing a Prompt-NER prompting strategy that includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation, wherein the Task Descriptions include roles, tasks, and basic requirements, and the specific steps of constructing the Prompt-NER prompting strategy for the Task Descriptions prompting element include:
[0017] To fully utilize the astronomical knowledge of the large language model Claude2, it is given the role of a senior astronomer and informed of the skills it needs to master.
[0018] It is clear that the large language model Claude2 needs to complete the astronomical NER task;
[0019] The output is required to be in JSON format, and a JSON example is provided for easy processing later.
[0020] The three types of celestial identification information in the literature appear in both unstructured text and structured tables. In order to ensure the attention of the large language model Claude2, the two tasks are required to be performed independently.
[0021] In the above scheme, the step of constructing a Prompt-NER prompting strategy that includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation, specifically includes constructing the Prompt-NER prompting strategy for the Entity Definitions prompting element: The Entity Definitions part defines the three types of celestial body identifier entities that need to be extracted, including celestial body identifier, right ascension (RA) and declination (Dec), and OBSID.
[0022] In the above scheme, the step of constructing a Prompt-NER prompting strategy that includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation, involves emphasizing task details in the Emphases prompting element to make the output of the large language model Claude2 more satisfactory. Specifically, the Prompt-NER prompting strategy for the Emphases prompting element includes:
[0023] This paper introduces several common forms that are likely to appear to help the large language model Claude2 identify and extract these named entities. Claude2 identifies these named entities through semantic reasoning.
[0024] The requirement for the large language model Claude2 to perform self-checking on the recognition results can improve the recognition effect to a certain extent.
[0025] The large language model Claude2 is required to explain the reason for extracting celestial information entities, and this self-guided strategy can also improve accuracy.
[0026] In the above scheme, the step of constructing a Prompt-NER prompting strategy that includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation, specifically involves constructing a Prompt-NER prompting strategy for the Task Examples prompting element: relying on expertise to construct three high-quality input-output example pairs to help the large language model Claude2 learn the pattern between inputs and outputs, thereby better understanding the task and striving to generate responses similar to the example outputs.
[0027] In the above scheme, the step of constructing a Prompt-NER prompting strategy that includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation, wherein the Second Conversation employs a second dialogue as a self-verification strategy, and the specific steps of constructing the Prompt-NER prompting strategy for the Second Conversation prompting element include:
[0028] Suppose that the named entities extracted in the first dialogue are not complete or accurate enough;
[0029] Here's another important reminder;
[0030] The large language model Claude2 is required to self-validate the extraction results of the first dialogue and extract them again.
[0031] In the above scheme, under the guidance of the constructed Prompt-NER prompting strategy, the large language model Claude2 is used to extract three types of celestial body identification information from the LAMOST literature in the local LAMOST literature database, including:
[0032] Suppose that the named entities extracted in the first dialogue are not complete or accurate enough;
[0033] First, enter the four prompt elements in the Prompt-NER prompting strategy: Task Descriptions, Entity Definitions, Emphases, and Task Examples.
[0034] Load the PDF file from which you want to extract information;
[0035] The large language model Claude2 performs the task of extracting three types of celestial body identification information;
[0036] Match JSON formatted information in the returned results using regular expressions;
[0037] Obtain the three celestial body identification information from the first returned unstructured text and structured table;
[0038] Then enter the Second Conversation prompt element of the Prompt-NER prompt strategy.
[0039] Match JSON formatted information in the returned results using regular expressions;
[0040] Obtain the three celestial body identification information from the second returned unstructured text and structured table.
[0041] In the above scheme, after extracting the three types of celestial body identification information from the LAMOST literature using the large language model Claude2 in the local LAMOST literature database, the scheme further includes: verifying the three types of celestial body identification information from the LAMOST literature in the LAMOST observation star catalog, determining whether the three types of celestial body identification information from the LAMOST literature are valid, filtering out invalid or erroneous data, and ensuring that accurate and reliable information is used subsequently.
[0042] Another aspect of this disclosure provides a device for extracting celestial body identification information from LAMOST documents based on the large language model Claude2, including:
[0043] The LAMOST literature crawling module is used to crawl PDF files of LAMOST-related literature on the arXiv platform using keywords, forming a local LAMOST literature database.
[0044] The Prompt-NER prompting strategy building module is used to construct a Prompt-NER prompting strategy that includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation.
[0045] The celestial body identification information extraction module is used to extract three types of celestial body identification information from the LAMOST literature using the large language model Claude2 in the local LAMOST literature database, under the prompting of the constructed Prompt-NER prompting strategy.
[0046] In the above scheme, the device also includes: a celestial body identification information verification module, which is used to verify the three types of celestial body identification information obtained from LAMOST literature in the LAMOST observation catalog, determine whether the three types of celestial body identification information obtained from LAMOST literature are valid, filter out invalid or erroneous data, and ensure that accurate and reliable information is used subsequently.
[0047] This disclosure also provides an electronic device, including: a processor; and a memory storing a computer-executable program that, when executed by the processor, causes the processor to perform the LAMOST document astronomical identification information extraction method based on the large language model Claude2.
[0048] This disclosure also provides a computer-readable medium containing computer-executable instructions, which, when executed, implement the LAMOST document astronomical identification information extraction method based on the large language model Claude2.
[0049] This disclosure also provides a computer program product, characterized in that it includes: computer-executable instructions, which, when executed, are used to implement the LAMOST document astronomical identification information extraction method based on the large language model Claude2.
[0050] (III) Beneficial Effects
[0051] As can be seen from the above technical solutions, the method, apparatus, equipment, and medium for extracting celestial body identification information from LAMOST documents based on the large language model Claude2 provided in this disclosure have the following beneficial effects:
[0052] 1. The present invention discloses a method, apparatus, device and medium for extracting LAMOST celestial body identification information from a large language model Claude2. By designing a Prompt-NER strategy for prompting engineering, using text crawling tools and leveraging the zero-shot learning capability of the large language model, it achieves automated batch extraction of LAMOST celestial body identification information from massive amounts of astronomical literature, greatly reducing the workload of manual annotation and enabling continuous information acquisition from newly added literature.
[0053] 2. The method, apparatus, equipment and medium for extracting celestial body identification information from LAMOST literature based on the large language model Claude2 provided in this disclosure can effectively guide the model to identify and extract target information by designing a Prompt-NER strategy for cue engineering, without the need for additional training. This also demonstrates the important role of cue engineering in improving the accuracy and controllability of the model.
[0054] 3. The LAMOST document celestial identification information extraction method, device, equipment and medium based on the large language model C1aude2 provided in this disclosure, with the help of text crawling tools and celestial information verification tools, realizes a complete process of screening target documents from massive documents, extracting information in batches and automatically verifying information, which provides support for the deep association between relevant documents and data.
[0055] 4. The LAMOST document celestial identification information extraction method, device, equipment and medium based on the large language model Claude2 provided in this disclosure can be continuously applied to newly emerging documents and can be transferred to other similar information extraction tasks, and has strong scalability.
[0056] 5. The method, apparatus, equipment, and medium for extracting celestial body identification information from LAMOST documents based on the large language model Claude2 provided in this disclosure improve the data information mining capabilities of document content and facilitate document content management, search, and knowledge discovery.
[0057] 6. The method, apparatus, equipment and medium for extracting astronomical object identification information from LAMOST documents based on the large language model Claude2 provided in this disclosure provide information support for astronomical data science and promote the correlation and application of multi-source heterogeneous astronomical data. Attached Figure Description
[0058] To gain a more complete understanding of this disclosure and its advantages, reference will now be made to the following description taken in conjunction with the accompanying drawings, in which:
[0059] Figure 1 The flowchart illustrates a method for extracting celestial body identification information from LAMOST documents based on the large language model Claude2, according to an embodiment of this disclosure.
[0060] Figure 2 A block diagram of a LAMOST document astronomical identification information extraction device based on the large language model Claude2, according to an embodiment of the present disclosure, is shown schematically.
[0061] Figure 3 The illustration shows a schematic diagram of a method for extracting celestial body identification information from LAMOST documents based on the large language model Claude2, according to an embodiment of the present disclosure.
[0062] Figure 4 A block diagram of an electronic device for extracting LAMOST astronomical identification information based on the large language model Claude2 according to an embodiment of the present disclosure is shown schematically.
[0063] [Figure Labels]:
[0064] S1, S2, S3: Step 200: LAMOST Document Celestial Identification Information Extraction Device Based on Large Language Model Claude2
[0065] 201: LAMOST Literature Crawling Module
[0066] 202: Prompt-NER suggestion strategy building module
[0067] 203: Celestial Identifier Information Extraction Module
[0068] 204: Celestial Identification Information Verification Module
[0069] 400: Electronic Equipment
[0070] 410: Processor
[0071] 420: Memory
[0072] 421: Computer Programs Detailed Implementation
[0073] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0074] In the past two years, large-scale language models (LLMs) have demonstrated powerful zero-shot or few-shot learning capabilities in NER tasks, such as GPT 3.5. These models, with hundreds of billions of parameters, learn the grammatical structure and rich semantic knowledge of the language, enabling them to quickly identify and classify entities in text without requiring large amounts of labeled data for supervised training. Due to their strong transfer learning capabilities, LLMs can quickly adapt to new domains and accurately extract entities even with very few samples.
[0075] Sotnikov et al. explored the zero-shot learning performance of models such as InstructGPT-3 and Flan-T5-XXL in astronomical text NER tasks. Through cue engineering and model fine-tuning, they achieved high accuracy in extracting celestial objects and event type entities from astronomical telegrams and GCN announcements, demonstrating the great application potential of LLMs in astronomical NER tasks.
[0076] Hint engineering is a crucial component in the application of large language models. It is an important technique that guides the model to generate the desired output by adjusting methods such as the input text, without altering the model's parameters. By optimizing hint engineering, this disclosure improves the accuracy and controllability of large language models, enabling them to adapt to various new tasks and scenarios without additional training. This means that large language models can perform unseen tasks with zero samples, greatly expanding their application scope. However, different tasks may require different hint strategies, and extensive research and experimentation are needed to continuously optimize these strategies.
[0077] Therefore, this disclosure proposes a Prompt-NER suggestion strategy and uses the Claude2 large language model, which can directly process PDF documents, to attempt to identify three types of entity information in LAMOST (Large Sky Area Multi-Object Fiber Spectroscopy Telescope) documents under zero-shot learning conditions. Combined with the document crawling tool (AstroCrawler) and celestial entity information verification tool (PyLAMOST) provided in this disclosure, it is possible to automatically extract and verify the three types of LAMOST celestial entity identification information in batches from massive amounts of astronomical literature, providing technical support for in-depth services such as the association and mutual retrieval of literature and observational data.
[0078] This disclosure proposes a method for extracting celestial body identification information from LAMOST documents based on the large language model Claude2.
[0079] like Figure 1 As shown, Figure 1 A flowchart illustrating a method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2 according to an embodiment of the present disclosure is shown. The method includes:
[0080] Step S1: Use keywords to crawl PDF files of literature related to LAMOST on the arXiv platform to form a local LAMOST literature database.
[0081] In this step, using "Large Sky Area Multi-Object Fiber Spectroscopic Telescope" or "LAMOST" as keywords, a literature crawling tool is used to search the arXiv platform for literature containing the strings "Large Sky Area Multi-Object Fiber Spectroscopic Telescope" or "LAMOST" in its full text. If found, the PDF file of the literature is downloaded to form a local LAMOST literature database.
[0082] In this step, the step of using keywords to selectively crawl PDF files of LAMOST-related literature on the arXiv platform to form a local LAMOST literature database also includes: regularly performing crawling operations to obtain the latest LAMOST-related literature and ensuring that the data is continuously updated.
[0083] Step S2: Construct a Prompt-NER prompting strategy that includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation.
[0084] In this step, the task descriptions include roles, tasks, and basic requirements. The specific steps for constructing a Prompt-NER prompting strategy based on these task descriptions include:
[0085] i. In order to fully utilize the astronomical knowledge of the large language model Claude2, the large language model Claude2 is given the role of a senior astronomer and informed of the skills that the large language model Claude2 needs to master;
[0086] ii. It is clear that the large language model Claude2 needs to complete the astronomical NER task;
[0087] iii. The output is required to be in JSON format, and a JSON example is provided to facilitate subsequent processing;
[0088] iv. The three types of celestial identification information in the literature appear in both unstructured text and structured tables. In order to ensure the attention of the large language model Claude2, the two tasks are required to be performed independently.
[0089] In this step, the Prompt-NER prompting strategy is constructed for the Entity Definitions prompting element. Specifically, the Entity Definitions part defines the three types of celestial body identifiers to be extracted, including celestial body identifier, right ascension (RA), declination (Dec), and OBSID.
[0090] In this step, to make the output of the large language model Claude2 more satisfactory, task details are emphasized in the emphases cue element. The Prompt-NER cue strategy for the emphases cue element specifically includes:
[0091] i. Introduce several high-probability forms to help the large language model Claude2 identify and extract them. The large language model Claude2 identifies these named entities through semantic reasoning.
[0092] ii requires the large language model Claude2 to perform self-checking on the recognition results, which can improve the recognition effect to a certain extent;
[0093] iii. The large language model Claude2 is required to explain the reason for extracting celestial information entities. This self-guided strategy can also improve accuracy.
[0094] In this step, the Prompt-NER prompting strategy for the prompting element of Task Examples specifically includes: building three high-quality input-output example pairs based on expertise to help the large language model Claude2 learn the pattern between input and output, thereby better understanding the task and striving to generate responses similar to the example outputs.
[0095] In this step, the Second Conversation uses a second dialogue as a self-verification strategy. The Prompt-NER prompt strategy constructed specifically for this Second Conversation prompt element includes:
[0096] i. Assume that the named entities extracted in the first dialogue are not complete or accurate enough;
[0097] ii provides another important reminder;
[0098] iii. Require the large language model Claude2 to self-validate the extraction results of the first dialogue and extract them again.
[0099] Step S3: Under the guidance of the constructed Prompt-NER prompting strategy, the large language model Claude2 is used to extract three types of celestial body identification information from the LAMOST literature in the local LAMOST literature database, specifically including:
[0100] i. Assume that the named entities extracted in the first dialogue are not complete or accurate enough;
[0101] ii. First, enter the four prompt elements in the Prompt-NER prompting strategy: Task Descriptions, Entity Definitions, Emphases, and Task Examples;
[0102] iii. Load the PDF file from which you want to extract information;
[0103] iv. The large language model Claude2 performs the task of extracting three types of celestial body identifier information;
[0104] v. Match JSON formatted information in the returned results using regular expressions;
[0105] vi. Obtain the three celestial body identification information from the first returned unstructured text and structured table;
[0106] vii. Enter the Second Conversation prompt element of the Prompt-NER prompt strategy.
[0107] viii. Match JSON formatted information in the returned results using regular expressions;
[0108] ix. Obtain the three celestial body identification information from the second returned unstructured text and structured table.
[0109] Thus, the method for extracting LAMOST celestial object identification information based on the large language model Claude2 provided in this embodiment of the present disclosure, under the prompting of the constructed Prompt-NER prompting strategy, uses the large language model Claude2 to extract three types of celestial object identification information from the LAMOST literature in the local LAMOST literature database. Then, it further includes: verifying the three types of celestial object identification information in the obtained LAMOST literature in the LAMOST observation star catalog, determining whether the three types of celestial object identification information in the obtained LAMOST literature are valid, filtering out invalid or erroneous data, and ensuring that accurate and reliable information is used subsequently.
[0110] PyLAMOST is a tool used to verify LAMOST object identifiers extracted from literature. Its main function is to receive object identifiers, right ascension (RA), declination (Dec), and OBSID, and then call the three APIs (desearch, conesearch, and obsidsearch) in the LAMOST observation catalog for verification based on the specific information. It automatically determines the validity of the object identifiers extracted by Claude2, filtering out invalid or erroneous data to ensure accurate and reliable information is used subsequently, thus improving the quality of information extraction. PyLAMOST serves as a crucial bridge between extracting object identifiers from literature and verifying the LAMOST observation catalog, which is a collection of data generated by the LAMOST telescope.
[0111] The three types of celestial object identification information obtained from the LAMOST observation catalog are verified to determine their validity. The specific steps are as follows:
[0112] i. Check if the celestial body identifier information is empty. If it is, do not perform verification; otherwise, call the `desearch` method to perform verification.
[0113] ii. Check if the right ascension (RA) and declination (Dec) information are empty. If they are, no verification is performed; otherwise, the conesearch method is called to perform verification.
[0114] iii. Check if the OBSID information is empty. If it is, no verification is performed; otherwise, the obsidsearch method is called to perform verification.
[0115] Thus, the method for extracting LAMOST celestial body identification information based on the large language model Claude2 provided in this disclosure, through the design of the Prompt-NER strategy for prompting engineering, the use of text crawling tools, and the zero-shot learning capability of the large language model, achieves automated batch extraction of LAMOST celestial body identification information from massive amounts of astronomical literature, greatly reducing the workload of manual annotation, and can continuously obtain information from newly added literature.
[0116] based on Figure 1 The flowchart shown is a method for extracting celestial body identification information from LAMOST documents based on the large language model Claude2, according to an embodiment of this disclosure. Figure 2 A block diagram of a LAMOST document celestial identification information extraction device based on the large language model Claude2, according to an embodiment of the present disclosure, is shown schematically.
[0117] like Figure 2 As shown in the embodiments of this disclosure, the LAMOST literature celestial body identification information extraction device 200 based on the large language model Claude2 includes a LAMOST literature crawling module 201, a Prompt-NER prompting strategy construction module 202, and a celestial body identification information extraction module 203. Specifically: the LAMOST literature crawling module 201 is used to crawl PDF files of LAMOST-related literature on the arXiv platform using keywords to form a local LAMOST literature database; the Prompt-NER prompting strategy construction module 202 is used to construct a Prompt-NER prompting strategy containing five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation; the celestial body identification information extraction module 203 is used to extract three types of celestial body identification information from the LAMOST literature in the local LAMOST literature database under the prompts of the constructed Prompt-NER prompting strategy, using the large language model Claude2.
[0118] Furthermore, after extracting the three types of celestial body identification information from the LAMOST literature, in order to verify whether the obtained three types of celestial body identification information from the LAMOST literature is valid, filter out invalid or erroneous data, and ensure the use of accurate and reliable information in the future, the LAMOST literature celestial body identification information extraction device 200 based on the large language model Claude2 provided in this embodiment of the disclosure also includes: a celestial body identification information verification module 204, used to verify the three types of celestial body identification information from the obtained LAMOST literature in the LAMOST observation star catalog, determine whether the obtained three types of celestial body identification information from the obtained LAMOST literature is valid, filter out invalid or erroneous data, and ensure the use of accurate and reliable information in the future.
[0119] It should be understood that the LAMOST document crawling module 201, the Prompt-NER prompting strategy construction module 202, the celestial body identification information extraction module 203, and the celestial body identification information verification module 204 can be implemented in one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the LAMOST document crawling module 201, the Prompt-NER prompting strategy construction module 202, the celestial body identification information extraction module 203, and the celestial body identification information verification module 204 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or in a suitable combination of software, hardware, and firmware implementations. Alternatively, at least one of the LAMOST literature crawling module 201, the Prompt-NER prompting strategy construction module 202, the celestial body identification information extraction module 203, and the celestial body identification information verification module 204 can be at least partially implemented as a computer program module, which can perform the functions of the corresponding module when the program is run by a computer.
[0120] based on Figure 1 The flowchart shown is for a method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2, according to an embodiment of this disclosure. Figure 2 The diagram shown is a block diagram of a LAMOST document astronomical identifier information extraction device based on the large language model Claude2, according to an embodiment of this disclosure. Figure 3 The illustration shows a schematic diagram of a method for extracting celestial body identification information from LAMOST documents based on the large language model Claude2, according to an embodiment of the present disclosure.
[0121] like Figure 3 As shown in the embodiments of this disclosure, a method for extracting LAMOST celestial body identification information based on the large language model Claude2 is provided. This method realizes automated batch extraction and verification of LAMOST celestial body information using the large language model under zero-shot learning conditions, and mainly includes the following four steps:
[0122] Step 1: Due to the current lack of a complete LAMOST literature database, this disclosure requires further screening by retrieving LAMOST-related literature from a vast amount of astronomical literature. If relevant literature is found, its PDF files will be downloaded and collected into the folder to be analyzed; otherwise, it will be discarded.
[0123] Based on the above requirements, this publication constructs AstroCrawler, a literature crawling tool. Its main function is to use keywords on the arXiv platform to crawl and download PDF files of relevant literature, forming a local LAMOST literature database, and regularly crawling the latest literature to provide a continuously updated literature data source for subsequent information extraction tasks.
[0124] The specific steps are as follows:
[0125] a) Using the literature crawling tool AstroCrawler, search arXiv for literature containing the full-text scope of "Large SkyArea Multi-Object Fiber Spectroscopic Telescope" and its abbreviation "LAMOST".
[0126] b) If included, download and collect its PDF file to the folder to be analyzed.
[0127] c) Otherwise, discard directly.
[0128] d) Repeat the above steps regularly to obtain the latest LAMOST-related literature and ensure that the data is continuously updated.
[0129] Step 2: Construct the Prompt-NER prompting strategy, which includes five prompting elements: Task Descriptions, Entity Definitions, Emphases, Task Examples, and Second Conversation. The main content is as follows:
[0130] a) Task Descriptions include roles, tasks, and basic requirements.
[0131] i. In order to fully awaken Claude2's astronomical knowledge, we gave it the role of a senior astronomer and told it the skills it needed to master.
[0132] ii. Claude2 needs to complete the astronomical NER mission.
[0133] iii. The output is required to be in JSON format, and a JSON example is provided to facilitate subsequent processing.
[0134] iv. The three types of celestial identification information in the literature appear both in unstructured text and in structured tables. To ensure Claude2's attention is focused, the two tasks are required to be performed independently.
[0135] b) Entity Definitions: This section defines the three types of celestial identifier entities that need to be extracted, including celestial identifier, right ascension (RA), declination (Dec), and OBSID.
[0136] c) Emphases: To make the Claude2 output more satisfactory, we emphasize task details in Emphases. Key points are as follows:
[0137] i. This information often has inconsistent formats. For example, celestial body identifiers can have multiple forms such as LAMOST J004936.62+375022.8, J034753.05+291200.0, 225723.83+164123.6, and J05:51:04.50+52:24:28.5, which increases the difficulty for Claude2 to recognize them. Therefore, this section introduces several common forms to help Claude2 recognize and extract them. In fact, Claude2 recognizes these named entities through semantic reasoning, rather than simply making a judgment based on prior knowledge.
[0138] ii. Require Claude2 to perform self-checks on the recognition results, which can improve the recognition effect to some extent.
[0139] iii. Asking Claude2 to explain the reason for extracting celestial information entities can also improve accuracy through this self-guided strategy.
[0140] d) Task Examples: Three high-quality input-output example pairs are built using expertise to help Claude2 learn the patterns between inputs and outputs, thereby better understanding the task and striving to generate responses similar to the example outputs.
[0141] e) Second Conversation: Secondary conversation is a self-validation strategy.
[0142] The specific steps are as follows:
[0143] i. Assume that the named entities extracted in the first dialogue are not complete or accurate enough.
[0144] ii. Here is another important reminder.
[0145] iii. Require Claude2 to self-verify the extraction results of the first dialogue and extract them again.
[0146] Step 3: Following the Prompt-NER strategy, use Claude2 to extract the three LAMOST celestial body identifiers from the literature selected in Step 1. The specific steps are as follows:
[0147] i. Assume that the named entities extracted in the first dialogue are not complete or accurate enough.
[0148] ii. First, enter the first 4 prompt elements of Prompt-NER.
[0149] iii. Load the PDF file from which you want to extract information.
[0150] iv. The large language model Claude2 performs the task of extracting three types of celestial body identification information.
[0151] v. Use regular expressions to match JSON-formatted information in the returned results.
[0152] vi. Obtain the three celestial body identification information from the first returned unstructured text and structured table.
[0153] vii. Then enter the Second Conversation prompt element for Prompt-NER.
[0154] viii. Match JSON formatted information in the returned results using regular expressions.
[0155] ix. Obtain the three celestial body identification information from the second returned unstructured text and structured table.
[0156] Step 4: After obtaining the three celestial object identification information from the LAMOST literature through Claude2, further verification is required in the LAMOST observation catalog.
[0157] PyLAMOST is a tool used to verify LAMOST object identifiers extracted from literature. Its main function is to receive object identifiers, right ascension (RA), declination (Dec), and OBSID, and then call the LAMOST observation catalog's three APIs (desearch, conesearch, and obsidsearch) to verify the information within the LAMOST observation catalog. It automatically determines the validity of the object identifiers extracted by Claude2, filtering out invalid or erroneous data to ensure accurate and reliable information is used subsequently, thus improving the quality of information extraction. PyLAMOST serves as a crucial bridge connecting the extraction of object identifiers from literature and catalog verification. The specific steps are as follows:
[0158] i. Check if the celestial body identifier information is empty. If it is, do not perform verification; otherwise, call the `desearch` method to perform verification.
[0159] ii. Check if the right ascension (RA) and declination (Dec) information are empty. If they are, no verification is performed; otherwise, the conesearch method is called to perform verification.
[0160] iii. Check if the OBSID information is empty. If it is, do not perform verification; otherwise, call the obsidsearch method to perform verification.
[0161] This disclosure also provides an electronic device for extracting celestial body identification information from LAMOST documents based on the large language model Claude2, such as... Figure 4 As shown, Figure 4 A block diagram schematically illustrates an electronic device 400 for extracting LAMOST astronomical identification information based on the Claude2 large language model according to an embodiment of the present disclosure. The electronic device 400 includes: one or more processors 410; and a memory 420 storing a computer-executable program that, when executed by the processors 410, causes the processors 410 to perform… Figure 1 The method for extracting celestial body identification information from LAMOST documents based on the large language model Claude2 is shown.
[0162] Specifically, processor 410 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. Processor 410 may also include onboard memory for caching purposes. Processor 410 may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this disclosure.
[0163] Memory 420 may be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, readable storage media may include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, apparatuses, or propagation media. Specific examples of readable storage media include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); memories such as random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0164] The memory 420 may include a computer program 421, which may include code / computer-executable instructions that, when executed by the processor 410, cause the processor 410 to perform a method or any variation thereof according to an embodiment of this disclosure.
[0165] Computer program 421 may be configured to have computer program code, for example, including computer program modules. For example, in an exemplary embodiment, the code in computer program 421 may include at least one program module, such as module 421A, module 421B, ... It should be noted that the division and number of modules are not fixed. Those skilled in the art can use appropriate program modules or combinations of program modules according to the actual situation. When these combinations of program modules are executed by processor 410, processor 410 can perform the method according to the embodiments of this disclosure or any variation thereof.
[0166] This disclosure also provides a computer-readable medium containing computer-executable instructions. This computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable medium carries one or more programs, which, when executed, implement the method according to the embodiments of this disclosure or any variation thereof.
[0167] According to embodiments of this disclosure, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.
[0168] This disclosure also provides a computer program product comprising: computer-executable instructions, which, when executed, are used to implement the LAMOST document astronomical identification information extraction method based on the large language model Claude2 according to embodiments of this disclosure.
[0169] This disclosure has now been described in detail with reference to the accompanying drawings. Based on the above description, those skilled in the art should have a clear understanding of this disclosure.
[0170] It should be noted that implementations not shown or described in the accompanying drawings or the main text of the specification are all forms known to those skilled in the art and are not described in detail. Furthermore, the definitions of the elements above are not limited to the various specific structures, shapes, or methods mentioned in the embodiments, and those skilled in the art can easily modify or substitute them.
[0171] Although this disclosure has been shown and described with reference to specific exemplary embodiments thereof, various changes in form and detail may be made to this disclosure without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. Therefore, the scope of this disclosure should not be limited to the above-described embodiments, but should be determined not only by the appended claims but also by their equivalents.
Claims
1. A method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2, characterized in that, include: Using keywords, we can selectively crawl PDF files of LAMOST-related literature on the arXiv platform to create a local LAMOST literature database. Construct a Prompt-NER prompting strategy that includes five prompting elements: task description, entity definition, emphasis, task example, and secondary verification; With the prompts of the constructed Prompt-NER prompting strategy, the large language model Claude2 is used to extract three types of celestial identification information from the LAMOST literature in the local LAMOST literature database; Specifically, the Prompt-NER prompting strategy for the entity definition prompting element includes: defining the three types of celestial body identifier entities to be extracted, including celestial body identifier, right ascension RA and declination Dec, and OBSID; The Prompt-NER prompting strategy, which emphasizes this prompting element, specifically includes: introducing various forms of information appearance to help the large language model Claude2 identify and extract them; Claude2 identifies these named entities through semantic reasoning; requiring Claude2 to self-check the recognition results; and requiring Claude2 to explain the reasons for extracting celestial information entities. Under the guidance of the constructed Prompt-NER prompting strategy, the large language model Claude2 is used to extract three types of celestial body identification information from the local LAMOST literature database. This includes: assuming the named entities extracted in the first dialogue are incomplete and inaccurate; first, inputting the four prompting elements of the Prompt-NER prompting strategy: task description, entity definition, emphasis, and task example; loading the PDF file of the literature from which information needs to be extracted; the large language model Claude2 performing the task of extracting the three types of celestial body identification information; matching JSON format information in the returned results using regular expressions; obtaining the three types of celestial body identification information from the first returned unstructured text and structured table; then inputting the second verification prompting element of the Prompt-NER prompting strategy; matching JSON format information in the returned results using regular expressions; and obtaining the three types of celestial body identification information from the second returned unstructured text and structured table.
2. The method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2 according to claim 1, characterized in that, The method of using keywords to selectively crawl PDF files of LAMOST-related literature on the arXiv platform to form a local LAMOST literature database includes: Using "Large Sky Area Multi-Object Fiber Spectroscopic Telescope" or "LAMOST" as keywords, a literature crawling tool was used to search the arXiv platform for literature containing the strings "Large Sky Area Multi-Object Fiber Spectroscopic Telescope" or "LAMOST" in its full text. If the documents can be retrieved, download the PDF files of these documents to create a local LAMOST document database.
3. The method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2 according to claim 2, characterized in that, The method of using keywords to selectively crawl PDF files of LAMOST-related literature on the arXiv platform to form a local LAMOST literature database also includes: Regularly perform web scraping operations to obtain the latest literature related to LAMOST and ensure that the data is continuously updated.
4. The method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2 according to claim 1, characterized in that, In the step of constructing a Prompt-NER prompting strategy that includes five prompting elements: task description, entity definition, emphasis, task example, and secondary verification, the task description includes roles, tasks, and basic requirements. Specifically, constructing the Prompt-NER prompting strategy for this task description prompting element includes: To fully utilize the astronomical knowledge of the large language model Claude2, it is given the role of a senior astronomer and informed of the skills it needs to master. It is clear that the large language model Claude2 needs to complete the astronomical NER task; The output is required to be in JSON format, and a JSON example is provided for easy processing later. The three types of celestial identification information in the literature appear in both unstructured text and structured tables. In order to ensure the attention of the large language model Claude2, the two tasks are required to be performed independently.
5. The method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2 according to claim 1, characterized in that, In the step of constructing a Prompt-NER prompting strategy that includes five prompting elements: task description, entity definition, emphasis, task example, and secondary verification, the specific steps for constructing the Prompt-NER prompting strategy for the task example prompting element include: Three high-quality input-output example pairs were constructed using expertise to help the large language model Claude2 learn patterns between inputs and outputs and strive to generate responses similar to the example outputs.
6. The method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2 according to claim 1, characterized in that, In the step of constructing a Prompt-NER prompting strategy that includes five prompting elements: task description, entity definition, emphasis, task example, and secondary verification, the secondary verification adopts a secondary dialogue as a self-verification strategy. The specific steps of constructing the Prompt-NER prompting strategy for this secondary verification prompting element include: Suppose that the named entities extracted in the first dialogue are not complete or accurate enough; Here's another important reminder; The large language model Claude2 is required to self-validate the extraction results of the first dialogue and extract them again.
7. The method for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2 according to claim 1, characterized in that, After extracting the three types of celestial body identification information from the LAMOST literature using the large language model Claude2 in the local LAMOST literature database, the process also includes: The three types of celestial object identification information obtained from the LAMOST observation catalog are verified to determine whether the three types of celestial object identification information obtained from the LAMOST literature are valid, and invalid or erroneous data are filtered out.
8. A device for extracting celestial body identifier information from LAMOST documents based on the large language model Claude2, characterized in that, include: The LAMOST literature crawling module is used to crawl PDF files of LAMOST-related literature on the arXiv platform using keywords, forming a local LAMOST literature database. The Prompt-NER prompting strategy building module is used to build a Prompt-NER prompting strategy that includes five prompting elements: task description, entity definition, emphasis, task example, and secondary verification. The celestial body identification information extraction module is used to extract three types of celestial body identification information from the LAMOST literature using the large language model Claude2 in the local LAMOST literature database under the prompting of the constructed Prompt-NER prompting strategy. Specifically, the Prompt-NER prompting strategy for the entity definition prompting element includes: defining the three types of celestial body identifier entities to be extracted, including celestial body identifier, right ascension RA and declination Dec, and OBSID; The Prompt-NER prompting strategy, which emphasizes this prompting element, specifically includes: introducing various forms of information appearance to help the large language model Claude2 identify and extract them; Claude2 identifies these named entities through semantic reasoning; requiring Claude2 to self-check the recognition results; and requiring Claude2 to explain the reasons for extracting celestial information entities. Under the guidance of the constructed Prompt-NER prompting strategy, the large language model Claude2 is used to extract three types of celestial body identification information from the local LAMOST literature database. This includes: assuming the named entities extracted in the first dialogue are incomplete and inaccurate; first, inputting the four prompting elements of the Prompt-NER prompting strategy: task description, entity definition, emphasis, and task example; loading the PDF file of the literature from which information needs to be extracted; the large language model Claude2 performing the task of extracting the three types of celestial body identification information; matching JSON format information in the returned results using regular expressions; obtaining the three types of celestial body identification information from the first returned unstructured text and structured table; then inputting the second verification prompting element of the Prompt-NER prompting strategy; matching JSON format information in the returned results using regular expressions; and obtaining the three types of celestial body identification information from the second returned unstructured text and structured table.
9. The LAMOST document celestial body identification information extraction device based on the large language model Claude2 according to claim 8, characterized in that, The device also includes: The celestial body identification information verification module is used to verify the three types of celestial body identification information obtained from LAMOST literature in the LAMOST observation catalog, determine whether the three types of celestial body identification information obtained from LAMOST literature are valid, filter out invalid or erroneous data, and ensure that accurate and reliable information is used subsequently.
10. An electronic device, comprising: processor; The memory stores a computer-executable program that, when executed by the processor, causes the processor to perform the LAMOST document astronomical identification information extraction method based on the large language model Claude2 as described in any one of claims 1-7.
11. A computer-readable medium containing computer-executable instructions, characterized in that, When the computer-executable instructions are executed, they implement the method for extracting celestial body identification information from LAMOST documents based on the large language model Claude2 as described in any one of claims 1-7.
12. A computer program product, characterized in that, include: Computer-executable instructions, when executed, are used to implement the LAMOST document astronomical identification information extraction method based on the large language model Claude2 as described in any one of claims 1-7.