CN117271611B - Information retrieval method, device and equipment based on large model - Google Patents

Information retrieval method, device and equipment based on large model Download PDF

Info

Publication number
CN117271611B
CN117271611B CN202311557131.5A CN202311557131A CN117271611B CN 117271611 B CN117271611 B CN 117271611B CN 202311557131 A CN202311557131 A CN 202311557131A CN 117271611 B CN117271611 B CN 117271611B
Authority
CN
China
Prior art keywords
query
search result
updated
original
query set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311557131.5A
Other languages
Chinese (zh)
Other versions
CN117271611A (en
Inventor
王书龙
李常宝
顾平莉
袁媛
艾中良
刘忠麟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 15 Research Institute
Original Assignee
CETC 15 Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CETC 15 Research Institute filed Critical CETC 15 Research Institute
Priority to CN202311557131.5A priority Critical patent/CN117271611B/en
Publication of CN117271611A publication Critical patent/CN117271611A/en
Application granted granted Critical
Publication of CN117271611B publication Critical patent/CN117271611B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24578Query processing with adaptation to user needs using ranking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/041Abduction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification discloses an information retrieval method, device and equipment based on a large model. The method comprises the following steps: transforming the original Query based on the large model to obtain a new Query set; based on the updated Query set, acquiring a retrieval result set corresponding to the updated Query set from a full-text search engine in a form of sub-Query, wherein the updated Query set is obtained by de-duplicating the new Query set; based on the reference answers of the original Query, carrying out semantic distance calculation on the search result set corresponding to the updated Query set to form an optimized search result set with semantic approximate priority, wherein the reference answers of the original Query are the reference answers obtained by using the large model; and outputting the optimized search result set as the search result of the original Query.

Description

Information retrieval method, device and equipment based on large model
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for information retrieval based on a large model.
Background
The information retrieval technology is a technology for rapidly and accurately finding out the process and method of matching information with the user requirement from a large amount of information sets according to the user requirement.
The traditional information retrieval technology can solve the user retrieval requirement based on the keywords and part of the semantics, but the technology faces the problems of incomplete retrieval content, low retrieval result quality and the like. Therefore, a method of information retrieval by a full-text search technique has emerged. The full text search technology can quickly and accurately perform information retrieval to realize quick response to a retrieval request, but the semanteme of an information retrieval result obtained by the method is poor, and the retrieval request of a user cannot be understood at the semanteme level.
Based on this, the present specification provides an information retrieval method based on a large model.
Disclosure of Invention
The embodiment of the specification provides an information retrieval method, device and equipment based on a large model, which are used for solving the following technical problems: the semantics of the information retrieval result obtained by the existing information retrieval technology are poor, and the retrieval request of the user cannot be understood at the semantic level.
In order to solve the above technical problems, the embodiments of the present specification are implemented as follows:
the embodiment of the specification provides an information retrieval method based on a large model, which comprises the following steps:
transforming the original Query based on the large model to obtain a new Query set;
based on the updated Query set, acquiring a retrieval result set corresponding to the updated Query set from a full-text search engine in a form of sub-Query, wherein the updated Query set is obtained by de-duplicating the new Query set;
based on the reference answers of the original Query, carrying out semantic distance calculation on a search result set corresponding to the updated Query set to form an optimized search result set with semantic approximate priority, wherein the reference answers of the original Query are reference answers obtained by using the large model;
and outputting the optimized search result set as the search result of the original Query.
The embodiment of the specification also provides an information retrieval device based on a large model, which comprises:
the transformation module is used for transforming the original Query based on the large model to obtain a new Query set;
the full-text search module is used for acquiring a search result set corresponding to the updated Query set from a full-text search engine in a form of sub-Query based on the updated Query set, wherein the updated Query set is obtained by de-duplicating the new Query set;
the reordering module is used for calculating the semantic distance of a search result set corresponding to the updated Query set based on the reference answer of the original Query to form an optimized search result set with semantic approximate priority, wherein the reference answer of the original Query is a reference answer obtained by using the large model;
and the output module is used for outputting the optimized search result set as the search result of the original Query.
The embodiment of the specification also provides an electronic device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
transforming the original Query based on the large model to obtain a new Query set;
based on the updated Query set, acquiring a retrieval result set corresponding to the updated Query set from a full-text search engine in a form of sub-Query, wherein the updated Query set is obtained by de-duplicating the new Query set;
based on the reference answers of the original Query, carrying out semantic distance calculation on a search result set corresponding to the updated Query set to form an optimized search result set with semantic approximate priority, wherein the reference answers of the original Query are reference answers obtained by using the large model;
and outputting the optimized search result set as the search result of the original Query.
According to the information retrieval method based on the large model, on the basis of obtaining a larger-scale retrieval result set through Query transformation, the large model is used for generating a reference answer to perform semantic distance calculation on the retrieval result, semantic approximate priority retrieval result ordering is formed, the result submitted to a user is enabled to be more fit with the actual retrieval requirement of the user, the output retrieval result is more accurate, and the output retrieval result is from a full-text search engine and has plasticity, so that the authenticity and the plasticity of the retrieval result can be guaranteed, and the accuracy is higher.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a system architecture of a large model-based information retrieval method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a large model-based information retrieval method according to an embodiment of the present disclosure;
FIG. 3 is a block diagram of a large model-based information retrieval method according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of an information retrieval device based on a large model according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
The full text retrieval technique is to scan each word of information to be retrieved and to establish an index for each word, indicating the number of times and the position of occurrence of the word. By establishing the index, quick response to the user retrieval request can be realized. Currently, this technology is mainly represented by the full text search engine Elastic Search (ES). Full text retrieval techniques are essentially information retrieval techniques, and even through Query transformations, the user's retrieval request cannot be understood at the semantic level.
The artificial intelligent model based on the deep learning technology has huge training data and parameter scale (millions to billions of parameters are all constant), can simulate the creative thinking of human beings, and generates information content with certain logic and consistency. Currently, the mainstream big models include ChatGPT, GPT-4, chatGLM, confucius, etc. The generation type large model can solve the problem that the retrieval request of a user is understood at the semantic level, but the reliability and traceability of the generated answer cannot be realized by the method due to the black box characteristic of the generation type large model.
Based on the above, the embodiment of the specification provides an information retrieval method based on a large model, which performs Query transformation by using the natural language understanding capability of the large model, and performs information retrieval based on the transformed Query set; meanwhile, a reference answer is generated based on the large model, the semantic distance between the retrieval result and the large model generated reference answer is used as a sorting correction factor, and a result set with the large model semantic approximate priority is provided for a user, so that the accuracy and the plasticity of the information retrieval result are improved.
Fig. 1 is a schematic diagram of a system architecture of an information retrieval method based on a large model according to an embodiment of the present disclosure. As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages or the like. Various client applications can be installed on the terminal devices 101, 102, 103. For example, a dedicated program such as information search based on a large model is performed.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be a variety of special purpose or general purpose electronic devices including, but not limited to, smartphones, tablets, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module.
The server 105 may be a server providing various services, such as a back-end server providing services for client applications installed on the terminal devices 101, 102, 103. For example, the server may perform information retrieval based on a large model so as to display the information retrieval result on the terminal device servers 101, 102, 103, or the server may perform information retrieval based on a large model so as to display the retrieval result on the terminal devices 101, 102, 103.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When server 105 is software, it may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services), or as a single software or software module.
Fig. 2 is a flow chart of an information retrieval method based on a large model according to an embodiment of the present disclosure. From the program perspective, the execution subject of the flow may be a program installed on an application server or an application terminal. It is understood that the method may be performed by any apparatus, device, platform, cluster of devices having computing, processing capabilities. As shown in fig. 2, the information retrieval method includes:
step S201: transforming the original Query based on the large model to obtain a new Query set.
In the prior art, the Query transformation method is mainly realized by using synonym/hyponym expansion and other modes, and the number of Query sets obtained by the method is limited. In the application, the Query transformation is performed by adopting a method based on a large model, so that the acquired new Query set is more comprehensive.
In the present embodiment, the large model refers to a generative large model. The artificial intelligent model based on the deep learning technology has huge training data and parameter scale (millions to billions of parameters are all constant), can simulate the creative thinking of human beings, and generates information content with certain logic and consistency. In a specific embodiment, the large model may be ChatGPT, GPT-4, chatGLM, confucius, etc. The particular type of large model is not limiting of the present application.
Query is a question posed by a user, or a Query condition specified by a user. In the embodiment of the present disclosure, the original Query is a Query request of the user, where the Query request belongs to a general problem, such as a daily communication scenario, or a daily Query scenario, and the general problem does not need to have a professional property, so the original Query does not need to rely on a self-contained template of a large model.
In this embodiment of the present disclosure, transforming the original Query based on the large model to obtain a new Query set specifically includes:
based on the large model, obtaining m1 questions with similar meanings to the original Query, and obtaining m1 new Query;
and/or
Based on the large model, obtaining m2 problems similar to the original Query content, and obtaining m2 new queries;
the m1 new Query and/or the m2 new Query are used as the new Query set.
In a specific embodiment, obtaining m1 questions with similar meanings to the original Query, which are really asking questions to a large model, "please give m1 different questions with similar meanings to the original Query", so as to obtain m1 new Query;
and obtaining m2 questions similar to the original Query content, namely asking questions to a large model, and giving m2 different question methods similar to the original Query content, so as to obtain m2 new Query.
It should be specifically noted that the specific values of m1 and m2 may be determined according to the specific service scenario, and m1 and m2 may be the same or different.
Step S203: based on the updated Query set, a search result set corresponding to the updated Query set is obtained from a full-text search engine in the form of sub-Query, and the updated Query set is obtained after the new Query set is de-duplicated.
In this embodiment of the present disclosure, the obtaining, by using a sub Query form, a search result set corresponding to the updated Query set from a full-text search engine based on the updated Query set specifically includes:
and taking the relation that each sub Query in the updated Query set is OR as search input, and calling the full-text search engine to obtain a search result set corresponding to the updated Query set.
In the present embodiment, the updated Query set is a set of multiple sub-queries. If the full text search is carried out by taking each sub Query as a search keyword, after the search result corresponding to each sub Query is obtained, the search result corresponding to each sub Query is used as a search result set, and the method is time-consuming and labor-consuming.
Therefore, in the embodiment of the present specification, the or relationship is adopted by each sub Query in the updated Query set as the search input, and full text search is performed, so that the purpose of obtaining the search result set at one time can be achieved.
In the embodiment of the present disclosure, the full text search engine may be an Elastic Search (ES) search engine, and of course, other types of full text search engines may also be used, and the specific type of full text search engine is not limited to this application and will not be described herein.
In the embodiment of the specification, the search result set is scored based on the score of the full-text search engine, and in a specific embodiment, top-K ranked search results can be selected according to specific situations, so that each search result in the search result set has a ranking.
Step S205: and calculating the semantic distance of a search result set corresponding to the updated Query set based on the reference answer of the original Query to form an optimized search result set with semantic approximation priority, wherein the reference answer of the original Query is the reference answer obtained by using the large model.
The above steps are based on the search result set obtained by the full-text search engine, and the accuracy is relatively high, but the accuracy of the search result set is affected due to the poor semanteme. According to the embodiment of the specification, the semantic understanding is synthesized, and the search result set is optimized, so that the accuracy of the search result set is improved.
In this embodiment of the present disclosure, the calculating, based on the reference answer of the original Query, a semantic distance for a search result set corresponding to the updated Query set to form an optimized search result set with semantic approximate priority specifically includes:
based on the reference answer of the original Query, obtaining the semantic similarity between the search result set corresponding to the updated Query set and the reference answer of the original Query;
scoring the TOP-K ranking and the semantic similarity ranking of each search result corresponding to the search result set corresponding to the updated Query set to obtain a comprehensive score of each search result corresponding to the updated Query set;
and based on the comprehensive score of each search result corresponding to the updated Query set, carrying out descending order rearrangement on the search result set corresponding to the updated Query set to form the optimized search result set with the semantic approximate priority.
In the embodiment of the present specification, the obtaining of the semantic similarity ranking includes the following steps:
obtaining semantic similarity between each search result corresponding to the search result set corresponding to the updated Query set and the reference answer of the original Query by adopting cosine similarity;
and ranking the semantic similarity to obtain the semantic similarity ranking.
In the embodiment of the present specification, the calculation formula of the composite score is:
Score(i)=a/Re(i)+b/Rank(i)
wherein,
score (i) represents a composite Score of an ith search result corresponding to the updated Query set;
re (i) is the ranking of the semantic similarity between the ith search result corresponding to the updated Query set and the reference answer of the original Query;
rank (i) is the original Top-K ranking of the ith retrieval result corresponding to the updated Query set;
a is a similarity coefficient;
b is the ranking coefficient.
In the embodiment of the present disclosure, in the calculation formula of the composite score, a+b=1, a has a default value of 0.3, and b has a default value of 0.7. The values of a and b can be adjusted according to specific business scenes.
In the embodiment of the present specification, the cosine similarity is calculated as follows:
cos(i)=cos(v(a),v(b));
wherein,
v (a) is a word vector of the ith search result corresponding to the updated Query set;
v (b) is a word vector of the reference answer of the original Query.
The closer the cosine similarity is to 1, the smaller the difference between the two texts is, namely the closer the ith search result corresponding to the updated Query set is to the reference answer of the original Query.
And (3) adopting the comprehensive score of each search result corresponding to the updated Query set, and carrying out descending order rearrangement on the search result set corresponding to the updated Query set to form an optimized search result set with the semantic approximate priority, so that the optimized search result set can realize the ranking of the search results under the condition of considering the semantic, and the search results are more accurate.
Step S207: and outputting the optimized search result set as the search result of the original Query.
In order to further understand the information retrieval method provided by the embodiment of the present disclosure, the embodiment of the present disclosure further provides a framework diagram of a large model-based information retrieval method, as shown in fig. 3, after receiving Query input by a user, performing Query transformation by using a large model, performing information retrieval based on a Query set after deduplication, obtaining a Top-K retrieval result set, further calculating semantic similarity between each retrieval result and a large model reference answer, reordering the retrieval result set, and outputting an answer (set) to the user.
According to the information retrieval method provided by the embodiment of the specification, on the basis of acquiring a larger-scale retrieval result set through Query transformation, the large model is utilized to generate the reference answer to perform semantic distance calculation on the retrieval result, so that the retrieval result sequence with semantic approximate priority is formed, the result submitted to the user is more fit with the actual retrieval requirement of the user, the output retrieval result is more accurate, and the output retrieval result is derived from the full-text search engine and has plasticity, so that the authenticity and the plasticity of the retrieval result can be ensured, and the accuracy is higher.
The foregoing details a large model-based information retrieval method, and accordingly, the present disclosure also provides a large model-based information retrieval device, as shown in fig. 4. Fig. 4 is a schematic diagram of an information retrieval device based on a large model according to an embodiment of the present disclosure, where the information retrieval device includes:
the transformation module 401 transforms the original Query based on the large model to obtain a new Query set;
the full text search module 403 obtains a search result set corresponding to the updated Query set from a full text search engine in a form of sub-Query based on the updated Query set, wherein the updated Query set is obtained by de-duplicating the new Query set;
the reordering module 405 performs semantic distance calculation on the search result set corresponding to the updated Query set based on the reference answer of the original Query, so as to form an optimized search result set with semantic approximation priority, where the reference answer of the original Query is a reference answer obtained by using the large model;
the output module 407 outputs the optimized search result set as the search result of the original Query.
The embodiment of the specification also provides an electronic device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
transforming the original Query based on the large model to obtain a new Query set;
based on the updated Query set, acquiring a retrieval result set corresponding to the updated Query set from a full-text search engine in a form of sub-Query, wherein the updated Query set is obtained by de-duplicating the new Query set;
based on the reference answers of the original Query, carrying out semantic distance calculation on a search result set corresponding to the updated Query set to form an optimized search result set with semantic approximate priority, wherein the reference answers of the original Query are reference answers obtained by using the large model;
and outputting the optimized search result set as the search result of the original Query.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, electronic devices, non-volatile computer storage medium embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to the description of the method embodiments.
The apparatus, the electronic device, the nonvolatile computer storage medium and the method provided in the embodiments of the present disclosure correspond to each other, and therefore, the apparatus, the electronic device, the nonvolatile computer storage medium also have similar beneficial technical effects as those of the corresponding method, and since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, the electronic device, the nonvolatile computer storage medium are not described here again.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing one or more embodiments of the present description.
It will be appreciated by those skilled in the art that the present description may be provided as a method, system, or computer program product. Accordingly, the present specification embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description embodiments may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (7)

1. An information retrieval method based on a large model, characterized in that the information retrieval method comprises:
transforming the original Query based on the large model to obtain a new Query set;
based on the updated Query set, acquiring a retrieval result set corresponding to the updated Query set from a full-text search engine in a form of sub-Query, wherein the updated Query set is obtained by de-duplicating the new Query set;
based on the reference answer of the original Query, carrying out semantic distance calculation on the search result set corresponding to the updated Query set to form an optimized search result set with semantic approximate priority, wherein the method specifically comprises the following steps: based on the reference answer of the original Query, obtaining the semantic similarity between the search result set corresponding to the updated Query set and the reference answer of the original Query; scoring the TOP-K ranking and the semantic similarity ranking of each search result corresponding to the search result set corresponding to the updated Query set to obtain a comprehensive score of each search result corresponding to the updated Query set; based on the comprehensive score of each search result corresponding to the updated Query set, carrying out descending order rearrangement on the search result set corresponding to the updated Query set to form the optimized search result set with the semantic approximate priority, wherein the reference answer of the original Query is the reference answer obtained by using the large model, and the calculation formula of the comprehensive score is as follows: score (i) =a/Re (i) +b/Rank (i); wherein Score (i) represents a composite Score of an ith search result corresponding to the updated Query set; re (i) is the ranking of the semantic similarity between the ith search result corresponding to the updated Query set and the reference answer of the original Query; rank (i) is the original Top-K ranking of the ith retrieval result corresponding to the updated Query set; a is a similarity coefficient; b is a ranking coefficient;
and outputting the optimized search result set as the search result of the original Query.
2. The information retrieval method according to claim 1, wherein transforming the original Query based on the large model to obtain a new Query set comprises:
based on the large model, obtaining m1 questions with similar meanings to the original Query, and obtaining m1 new Query;
and/or
Based on the large model, obtaining m2 problems similar to the original Query content, and obtaining m2 new queries;
the m1 new Query and/or the m2 new Query are used as the new Query set.
3. The information retrieval method according to claim 1, wherein the obtaining, based on the updated Query set, a retrieval result set corresponding to the updated Query set from a full-text search engine in the form of a sub Query specifically includes:
and taking the relation that each sub Query in the updated Query set is OR as search input, and calling the full-text search engine to obtain a search result set corresponding to the updated Query set.
4. The information retrieval method of claim 1, wherein the obtaining of the semantic similarity ranking comprises the steps of:
obtaining semantic similarity between each search result corresponding to the search result set corresponding to the updated Query set and the reference answer of the original Query by adopting cosine similarity;
and ranking the semantic similarity to obtain the semantic similarity ranking.
5. The information retrieval method as recited in claim 1, wherein a+b=1, a has a default value of 0.3 and b has a default value of 0.7 in the calculation formula of the composite score.
6. An information retrieval apparatus based on a large model, the information retrieval apparatus comprising:
the transformation module is used for transforming the original Query based on the large model to obtain a new Query set;
the full-text search module is used for acquiring a search result set corresponding to the updated Query set from a full-text search engine in a form of sub-Query based on the updated Query set, wherein the updated Query set is obtained by de-duplicating the new Query set;
the reordering module performs semantic distance calculation on the retrieval result set corresponding to the updated Query set based on the reference answer of the original Query to form an optimized retrieval result set with semantic approximate priority, and specifically comprises the following steps: based on the reference answer of the original Query, obtaining the semantic similarity between the search result set corresponding to the updated Query set and the reference answer of the original Query; scoring the TOP-K ranking and the semantic similarity ranking of each search result corresponding to the search result set corresponding to the updated Query set to obtain a comprehensive score of each search result corresponding to the updated Query set; based on the comprehensive score of each search result corresponding to the updated Query set, carrying out descending order rearrangement on the search result set corresponding to the updated Query set to form the optimized search result set with the semantic approximate priority, wherein the reference answer of the original Query is the reference answer obtained by using the large model, and the calculation formula of the comprehensive score is as follows: score (i) =a/Re (i) +b/Rank (i); wherein Score (i) represents a composite Score of an ith search result corresponding to the updated Query set; re (i) is the ranking of the semantic similarity between the ith search result corresponding to the updated Query set and the reference answer of the original Query; rank (i) is the original Top-K ranking of the ith retrieval result corresponding to the updated Query set; a is a similarity coefficient; b is a ranking coefficient;
and the output module is used for outputting the optimized search result set as the search result of the original Query.
7. An electronic device, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
transforming the original Query based on the large model to obtain a new Query set;
based on the updated Query set, acquiring a retrieval result set corresponding to the updated Query set from a full-text search engine in a form of sub-Query, wherein the updated Query set is obtained by de-duplicating the new Query set;
based on the reference answer of the original Query, carrying out semantic distance calculation on the search result set corresponding to the updated Query set to form an optimized search result set with semantic approximate priority, wherein the method specifically comprises the following steps: based on the reference answer of the original Query, obtaining the semantic similarity between the search result set corresponding to the updated Query set and the reference answer of the original Query; scoring the TOP-K ranking and the semantic similarity ranking of each search result corresponding to the search result set corresponding to the updated Query set to obtain a comprehensive score of each search result corresponding to the updated Query set; based on the comprehensive score of each search result corresponding to the updated Query set, carrying out descending order rearrangement on the search result set corresponding to the updated Query set to form the optimized search result set with the semantic approximate priority, wherein the reference answer of the original Query is the reference answer obtained by using the large model, and the calculation formula of the comprehensive score is as follows: score (i) =a/Re (i) +b/Rank (i); wherein Score (i) represents a composite Score of an ith search result corresponding to the updated Query set; re (i) is the ranking of the semantic similarity between the ith search result corresponding to the updated Query set and the reference answer of the original Query; rank (i) is the original Top-K ranking of the ith retrieval result corresponding to the updated Query set; a is a similarity coefficient; b is a ranking coefficient;
and outputting the optimized search result set as the search result of the original Query.
CN202311557131.5A 2023-11-21 2023-11-21 Information retrieval method, device and equipment based on large model Active CN117271611B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311557131.5A CN117271611B (en) 2023-11-21 2023-11-21 Information retrieval method, device and equipment based on large model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311557131.5A CN117271611B (en) 2023-11-21 2023-11-21 Information retrieval method, device and equipment based on large model

Publications (2)

Publication Number Publication Date
CN117271611A CN117271611A (en) 2023-12-22
CN117271611B true CN117271611B (en) 2024-02-13

Family

ID=89210911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311557131.5A Active CN117271611B (en) 2023-11-21 2023-11-21 Information retrieval method, device and equipment based on large model

Country Status (1)

Country Link
CN (1) CN117271611B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015915A (en) * 2020-09-01 2020-12-01 哈尔滨工业大学 Question-answering system and device based on knowledge base generated by questions
CN112632261A (en) * 2020-12-30 2021-04-09 中国平安财产保险股份有限公司 Intelligent question and answer method, device, equipment and storage medium
CN114637760A (en) * 2020-12-15 2022-06-17 暗物智能科技(广州)有限公司 Intelligent question and answer method and system
CN116340467A (en) * 2023-05-11 2023-06-27 腾讯科技(深圳)有限公司 Text processing method, text processing device, electronic equipment and computer readable storage medium
CN116911312A (en) * 2023-09-12 2023-10-20 深圳须弥云图空间科技有限公司 Task type dialogue system and implementation method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015915A (en) * 2020-09-01 2020-12-01 哈尔滨工业大学 Question-answering system and device based on knowledge base generated by questions
CN114637760A (en) * 2020-12-15 2022-06-17 暗物智能科技(广州)有限公司 Intelligent question and answer method and system
CN112632261A (en) * 2020-12-30 2021-04-09 中国平安财产保险股份有限公司 Intelligent question and answer method, device, equipment and storage medium
CN116340467A (en) * 2023-05-11 2023-06-27 腾讯科技(深圳)有限公司 Text processing method, text processing device, electronic equipment and computer readable storage medium
CN116911312A (en) * 2023-09-12 2023-10-20 深圳须弥云图空间科技有限公司 Task type dialogue system and implementation method thereof

Also Published As

Publication number Publication date
CN117271611A (en) 2023-12-22

Similar Documents

Publication Publication Date Title
CN110162796B (en) News thematic creation method and device
CN111898643B (en) Semantic matching method and device
CN116227474B (en) Method and device for generating countermeasure text, storage medium and electronic equipment
CN117235226A (en) Question response method and device based on large language model
CN111159343A (en) Text similarity searching method, device, equipment and medium based on text embedding
CN110737756B (en) Method, apparatus, device and medium for determining answer to user input data
CN110795541B (en) Text query method, text query device, electronic equipment and computer readable storage medium
CN113806487B (en) Semantic searching method, device, equipment and storage medium based on neural network
CN111046304B (en) Data searching method and device
CN111209277B (en) Data processing method, device, equipment and medium
CN116150380B (en) Text matching method, device, storage medium and equipment
CN117271611B (en) Information retrieval method, device and equipment based on large model
CN117113174A (en) Model training method and device, storage medium and electronic equipment
CN115221523A (en) Data processing method, device and equipment
CN113505196A (en) Part-of-speech-based text retrieval method and device, electronic equipment and storage medium
CN117992600B (en) Service execution method and device, storage medium and electronic equipment
CN117494068B (en) Network public opinion analysis method and device combining deep learning and causal inference
CN113987156B (en) Long text generation method and device and electronic equipment
CN117807961B (en) Training method and device of text generation model, medium and electronic equipment
CN117332282B (en) Knowledge graph-based event matching method and device
CN116451808B (en) Model training method and device, storage medium and electronic equipment
CN117992600A (en) Service execution method and device, storage medium and electronic equipment
CN117370494A (en) Question answering method and device
CN117171346A (en) Entity linking method and device, storage medium and electronic equipment
CN117953258A (en) Training method of object classification model, object classification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant