You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2022/03/28 20:09:40 UTC

[incubator-nlpcraft] branch master updated: Update NCConversation.java

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/master by this push:
     new 35cf0ee  Update NCConversation.java
35cf0ee is described below

commit 35cf0ee4068709c37a1ce7946de25cc5addd3f8d
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Mon Mar 28 13:09:34 2022 -0700

    Update NCConversation.java
---
 .../src/main/scala/org/apache/nlpcraft/NCConversation.java  | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCConversation.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCConversation.java
index 7856601..f997aea 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCConversation.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCConversation.java
@@ -21,7 +21,18 @@ import java.util.List;
 import java.util.function.Predicate;
 
 /**
- *
+ * Conversation container. This container is unique for user and data model pair.
+ * <p>
+ * Conversation management is based on idea of a short-term-memory (STM). STM can be viewed as a condensed
+ * short-term history of the input for a given user and data model. Every submitted user request that wasn't
+ * rejected is added to the conversation STM as a list of tokens. Existing STM tokens belonging to the same
+ * group will be overridden by the more recent tokens from the same group. Note also that tokens in STM automatically
+ * expire (i.e. context is "forgotten") after a certain period of time and/or based on the depth of the
+ * conversation since the last mention.
+ * <p>
+ * You can also maintain user state-machine between requests using converasation's session. Conversation's session is
+ * a mutable thread-safe container that can hold any arbitrary user data while supporting the same expiration logic as
+ * the rest of the conversation elements (i.e. tokens and previously matched intent IDs).
  */
 public interface NCConversation {
     /**