A service integrating a chatbot and a knowledge base
By integrating a knowledge base with a conversational agent, personalized responses are generated using similarity measures, addressing the lack of individualized content in existing conversational agents, thereby improving user experience.
Patent Information
- Application Number
- FR2023007351
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-01-17
AI Technical Summary
Conversational agents lack the ability to provide individualized content based on specific data, as they are trained on general databases and do not account for specific user or group-specific information in their responses.
A method that integrates a knowledge base with a conversational agent, allowing the selection of elements from the knowledge base based on similarity criteria to generate personalized responses, without modifying the conversational agent itself, by using a similarity measure to match user queries with specific data stored in the knowledge base.
Enables the conversational agent to provide responses that consider specific information, enhancing user experience by providing tailored content without altering the conversational agent's existing functionality.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Title of the invention: SERVICE integrating a conversational agent and a knowledge base FIELD OF THE INVENTION
[0001] The present invention relates to a service platform for a communication network such as the Internet, enabling dialogue with a conversational agent.
[0002] Conversational agents (or "chatbots" in English terminology) are today traditionally used to access content by providing qualitative responses to user requests.
[0003] More particularly, a conversational agent is a programmed system allowing, for example using text or voice synthesis, an online conversation with a user. An analysis engine, generally based on artificial intelligence technologies, allows the conversational agent to categorize the requests it receives from the user and to respond by simulating a human conversation.
[0004] Such conversational agents can be used for various purposes, including supporting customers browsing a commercial website.
[0005] Although in full development, existing conversational agents suffer from various shortcomings.
[0006] In particular, conversational agents are trained on general databases and can provide qualitative responses based on these databases.
[0007] This mode of operation is very interesting in many application cases, but does not allow individualized content to be provided for, for example, a group of users. In particular, current conversational agents are not designed to take specific data into account when establishing their responses. Summary of the invention
[0008] A general aim of the invention is to enable a further improved user experience.
[0009] To this end, the invention proposes a method for the automatic generation of a conversational response in response to a request transmitted by a telecommunications terminal, comprising a step of selecting at least one element in a knowledge base according to a similarity criterion, and a step of providing said at least one element to a conversational agent and said request to determine a response to said request.
[0010] According to embodiments, the method according to the invention can implement one or more of the following characteristics, individually or in combination: - The method comprises a prior step of constituting said knowledge base by inserting elements determined from a set of specific documents. - said elements comprise first elements obtained by cutting documents from said set of specific documents, and second elements obtained from said first elements. - one of said elements is a summary of at least one specific document of said set. - one of said elements is a collection of questions and answers corresponding to at least one specific document of said set. - said selection step comprises a measurement of similarity between a vector calculated from said query and vectors associated with elements of said knowledge base. - the method comprises a step of establishing a second measure of similarity between the content of said response and said at least one element. - said knowledge base is deployed on a private server. Another aspect of the invention relates to a platform comprising at least one processor adapted to implement a method as previously defined.
[0011] Another aspect of the invention relates to a computer program product comprising code instructions for implementing the method as previously defined when they are executed on a computer.
[0012] In particular, the invention allows a knowledge base to be taken into account upstream of the query of the conversational agent, and thus to provide a response to a request which depends on specific information stored in this knowledge base.
[0013] A particular advantage of the invention is that it can be adapted to any conversational agent, without the need to make modifications to it. BRIEF DESCRIPTION OF THE FIGURES
[0014] Other characteristics and advantages of the invention will emerge from the following description, which is purely illustrative and non-limiting, and must be read in conjunction with the appended figures in which:
[0015] [Fig.l] a schematic representation of an example environment in which the invention can be implemented;
[0016] [Fig.2] represents an illustrative flowchart of an embodiment of the invention;
[0017] [Fig.3] represents a preliminary step in the creation of a knowledge base according to an embodiment of the invention.
[0018] DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION
[0019] [Fig. 1] illustrates a possible implementation of the invention.
[0020] In this example of implementation, a telecommunications terminal 1 can enter into communication with a remote server 3 via a telecommunications network 2.
[0021] This telecommunications terminal 1 can be of any type: computer (fixed or portable), mobile telephone of the “smartphone” type, digital tablet, etc. Generally speaking, the telecommunications terminal is any digital information processing device adapted to connect to a telecommunications network.
[0022] The telecommunications network 2 can also be of any type. It can in particular be a set of interconnected networks, including for example an access network (Ethernet, Wi-Fi, cellular, etc.) and the Internet network. It can also be an internal network for a home or a business.
[0023] The server can be understood as a logical server. This can be implemented on a physical server or on a set of physical servers abstracted on a server farm or on a cloud computing infrastructure.
[0024] This server 3 may comprise processing means 31 to enable the reception of requests 4 sent by a telecommunications terminal 1, and for the sending of responses 5. These requests and these responses may comply with different telecommunications protocols, for example a protocol of the http type (“HyperText Transfer Protocol”, in English). The server 3 may in particular be accessible via a “web” type interface.
[0025] This server can thus be accessible on the web, or on a corporate “intranet” type network, for example (including via a virtual network of the VPN type for “Virtual Private Network”, in English).
[0026] Since the server can be understood in its broadest sense, that is to say a logical entity, it is clear that the knowledge base 32 and the processing means 31 can be relocated to separate physical entities.
[0027] The server may include a knowledge base 32. It may be in communication with a conversational agent 33 with which it can collaborate.
[0028] This conversational agent can be deployed on a separate server than the server 3 deploying the processing means 31 and the knowledge base 32. In particular the processing means 31 can interact with the conversational agent 33 through a telecommunications network (for example the telecommunications network 2 also allowing the server to be connected to the telecommunications terminal 1). According to an alternative embodiment, the conversational agent 33 can be embedded on the same logical server 3.
[0029] In this exemplary implementation, a telecommunications terminal 1 transmits a request 4. Typically, this request contains a question. The request may also contain contextual information which may specify constraints or methods for establishing a desired response.
[0030] This request can come from a human user of the telecommunications terminal 1. The user can enter a question in order to address it to the server 3.
[0031] An example of a question might be “what about gender inequalities in our society?”
[0032] An example of contextual information might be "the answer should be written in 3 complete sentences of less than 50 words."
[0033] This server 3 offers a new service, combining a conversational agent with a knowledge base, in order to provide a specific response to user requests.
[0034] The processing means, or orchestrator, 31 of the server 3 can implement a method 10 as illustrated in the example of [Fig.2].
[0035] The method may comprise a step 11 of selecting at least one element in the knowledge base 32. In a particular case, a single element may be selected.
[0036] The method can then comprise a step 12 of providing this or these selected elements to the conversational agent 33 to determine the response 5 to the request 4.
[0037] This response 5 can then be processed by the telecommunications terminal 1 and, possibly, presented to the user who originated the request 4.
[0038] The selection step 11 comprises querying the knowledge base 32.
[0039] The database may include elements (or "records" if we adopts the vocabulary from relational databases) which can be of different natures (texts, images, etc.). These elements can be representative of specific knowledge that we wish to take into account in establishing responses to queries.
[0040] The elements are selected on the basis of a criterion of similarity with a content of the query 4.
[0041] This similarity criterion consists of measuring the distance between an element of the knowledge base and the content of the query, then selecting the element(s) minimizing this distance.
[0042] Different distance measurements are possible (Dice, Manhattan, Bhattacharyya, of Levenstein, in cosine...).
[0043] A step prior to measuring the distance between elements may be the vectorization of these: the elements contained in the knowledge base 32 may have been previously vectorized and a similarity is then sought between the vectors calculated on the elements contained in the knowledge base and a vector calculated on the query 4.
[0044] A possible example of implementation is a cosine similarity measure. If we consider X and Y as the sets of sub-elements (e.g. words) of the elements to be compared (a knowledge base element and the query content), we can express this distance by the expression
[0045] [Math.l] / V v\ cos(X; I ) = - / =-7
[0046] In a step 12, this element (or possibly, the elements) is provided to the conversational agent 33. The question contained in the request 4 is also provided to the conversational agent 33. When the request contains contextual information, this can also be provided to the conversational agent.
[0047] Natively, the conversational agent processes the transmitted data, i.e. an element selected from the knowledge base, and the query 4 (comprising a question and, possibly, contextual information). It can then provide a response and transmit it to the telecommunications terminal. This response can pass through the server 3, the one that triggered the call to the conversational agent.
[0048] In an optional step 13, the response 5 may be compared with the element (or elements) having been selected in step 11. In particular, a similarity measure is established between the content of said response 5 and said selected element in order to verify the relevance of this response 5, and, indirectly, of the model of the conversational agent. It can indeed be assumed that the response must be semantically very linked to the information which has been submitted to the conversational agent 33, and one can therefore expect a very high similarity measure.
[0049] If this similarity measure is lower than a given threshold (for example 90%), we can discard response 5. We can then, for example, replace this response 5 with a response indicating that the method cannot provide a reliable response.
[0050] The conversational agent 33 may comprise a natural language processing engine, NLP (for “Nattirai Language Processing” in English). It may for example be an NLP type engine LUIS.ai or QnaMaker from Microsoft Cognitives Services, coupled with a keyword understanding service carried out via an algorithmic approach.
[0051] It can also be an engine based on a large language model (LLM for "Large Language Model"). Such a model draws on large corpora of texts from various sources, such as books, press articles, web pages, forums, social networks, etc. to predict, from a given word, the following words and phrases in a text.
[0052] Thus, according to the proposed method, no modification is made to the agent. The latter may be completely external to the method implemented by the server 3. However, taking into account the elements of the knowledge base 32 obliges it to take into account specific knowledge and to provide a response 5 taking into account this specific knowledge.
[0053] Specific knowledge can be seen as data external to the conversational agent. This includes data that has not given rise to learning by the conversational agent.
[0054] Thus, according to one embodiment, the knowledge base 32 belongs to a computer domain distinct from that of the conversational agent 33.
[0055] In particular, the knowledge base 32 corresponds to the domain of the manager of the server 3. The conversational agent 33 corresponds to a domain not belonging to the manager of the server 3.
[0056] Generally speaking, in order to be able to respond to a wide variety of requests, the conversational agent 33 natively takes into account (during its learning, for example) a large number of general and public data. In general, the knowledge base 32 is specific, in the sense that it is made up of data that has not been taken into account for the learning of the conversational agent.
[0057] Thus, the knowledge base forms a data source distinct from those taken into account by the conversational agent 33.
[0058] For example, the knowledge base and server 3 can be deployed on a private server. The elements thus correspond to the domain of the private server.
[0059] For example, the knowledge base may correspond to a company, manager of server 3; the elements then reflecting a set of knowledge specific to this company.
[0060] The conversational agent 33 may belong to a public network, and take into account public data. For example, it may be deployed on a public server and be accessible via the Internet network.
[0061] Taking the example mentioned above of the query containing the question “what about gender inequalities in our society?”, the method described can first select elements from the knowledge base specific to this company. These elements are representative, for example, of the documentation produced by the company. The element(s) presenting the best similarity with the question can then be presented to the conversational agent.
[0062] These elements may contain specific data specific to the company (for example, encrypted data, data relating to internal policy, etc.). These data are then taken into account by the conversational agent as input data and will be used to establish, in a manner known per se, a response. Thus, the specific data are integrated into the input data of the conversational agent so that it generates a response based on these specific data.
[0063] This specific knowledge may be contained in a set of documents. These documents may consist of all or part of the documentation specific to the server manager 3.
[0064] In a prior step, different types of elements can be generated and added, or inserted, into the knowledge base 32, from these specific documents.
[0065] [Fig.3] illustrates an embodiment of this preliminary step of constituting the knowledge base 32.
[0066] The knowledge base 32 is constituted, or enriched, by the insertion of elements determined from a set 100 of specific documents.
[0067] These elements are generated by a generation module 200.
[0068] Different types of elements can be determined by different sub-modules 200i, 2002, 2003..., 200n of the generation module 200, n representing the number of sub-modules.
[0069] Each sub-module may be specialized in generating one type of element. The different sub-modules may operate independently and in parallel, i.e. by taking the documents 100 as input and directly generating elements. They may also be interdependent: for example, a given sub-module may take as input the elements generated by another sub-module.
[0070] According to one embodiment, a first subset can be distinguished consisting of sub-modules 200i, 2002, 2003..., 200; provided for cutting the documents 100 into blocks, or "chunks" according to the English terminology, and a second subset consisting of sub-modules 200i+i, ..., 200n> provided for developing elements from the blocks originating from the sub-modules of the first subset.
[0071] These blocks represent textual parts extracted from the documents and representative of knowledge.
[0072] These blocks can be generated by a sentence-by-sentence division of the documents 100.
[0073] They can also be generated by paragraph-by-paragraph division. In the latter case, a limit can be set that must not be exceeded per block, in number of words. It is also possible to avoid cutting a sentence by keeping a complete sentence in a given block, even if its size exceeds the number of words set.
[0074] It is also possible to provide for dividing the documents 100 into semantic blocks. To do this, we determine changes in semantic subjects within a document 100, in order to divide it into blocks presenting a single semantic subject.
[0075] Different cutting methods are therefore possible, and according to one embodiment, several sub-modules can be implemented in parallel in order to generate different cuttings on the basis of the same document 100.
[0076] One of the advantages of dividing a document into blocks is to create less voluminous data for the subsequent processing undertaken by the conversational agent and thus to optimize the calculation times and computational resources used.
[0077] Based on these blocks, or independently of these blocks, other types of elements can be determined, by the second subset of sub-modules, such as for example:
[0078] - summaries of the documents,
[0079] - question and answer games,
[0080] - sets of keywords,
[0081] Etc.
[0082] These elements are vectorized by a vectorization module 300 before being inserted into the knowledge base 32.
[0083] Vectorization consists of transforming a piece of text into a digital representation. These digital representations (or vectors, or "embeddings" in English terminology) allow for better manipulation and, in particular here, facilitate a similarity measurement.
[0084] Vectorization can be performed using available tools, such as for example the “text-embedding-ada-002” tool available on the OpenAI platform (https: / / openai.com / ), or described in articles such as Breitung, Christian and Millier, Sébastian, Global Business Similarity Networks (Tuesday 21, 2023); https: / / ssm.com / abstract=4395079; http: / / dx.doi.org / 10.2139 / ssrn.4395079
[0085] A human validation step can be implemented beforehand.
[0086] The knowledge base 32 can thus include elements of heterogeneous types, in order to enrich the possibilities of searching for similar elements which may correspond to a query 4.
[0087] In particular, the knowledge base 32 may comprise one or more blocks corresponding to a specific document, a summary of a specific document, a collection of questions and answers corresponding to at least one specific document, a set of keywords corresponding to at least one specific document, etc.
[0088] The proposed mechanism is open to the types and number n of types of elements that can be inserted into the knowledge base 32.
[0089] One of the advantages is also to be able to take into account a plurality of elements of different nature, in order to improve the performance of the selection step 11.
Claims
Claims
1. Method for the automatic generation of a conversational response in response to a query (4) transmitted by a telecommunications terminal (1), comprising a step of selecting (11) at least one element in a knowledge base (32) according to a similarity criterion, and a step of providing (12) said at least one element to a conversational agent (33) and said query (4) to determine a response (5) to said query (4).
2. Method according to the preceding claim, comprising a prior step of constituting said knowledge base by inserting elements determined from a set of specific documents.
3. Method according to the preceding claim, in which said elements comprise first elements obtained by cutting documents from said set of specific documents, and second elements obtained from said first elements.
4. Method according to the preceding claim, in which one element among said elements is a summary of at least one specific document of said set.
5. A method according to one of claims 2 or 3, wherein one of said elements is a collection of questions and answers corresponding to at least one specific document of said set.
6. Method according to one of the preceding claims, in which said selection step (11) comprises a measure of similarity between a vector calculated from said query and vectors associated with elements of said knowledge base (32).
7. Method according to one of the preceding claims, comprising a step (13) of establishing a second measure of similarity between the content of said response (5) and said at least one element.
8. Method according to one of the preceding claims, wherein said knowledge base (32) is deployed on a private server.
9. Platform comprising at least one processor adapted to implement a method according to one of the preceding claims.
10. Computer program product comprising code instructions for implementing the method according to one of the preceding claims when executed on a computer.
Citation Information
Patent Citations
Contextual and intent based natural language processing system and method
US10943072B1
Automatically generating natural language responses to users' questions
US20210232613A1