Smart Comprehend: Assigned Case Filtering & Event Sampling

Updated 

Smart Comprehend introduces optimizations to reduce inference overhead and improve the relevance of knowledge base suggestions. These enhancements ensure inference is triggered only for active cases and at controlled intervals across channels.


Use Case

Info

Problem Statement

Earlier, Smart Comprehend triggered inference for every incoming message across all cases, regardless of assignment status or message type. This resulted in increased system load and reduced relevance of generated suggestions.


Info

Challenges Identified

  • Inference executed for all cases, including unassigned or queued cases

  • Increased infrastructure and compute usage due to redundant processing

  • Suggestions generated before agent interaction, reducing their usefulness

  • Brand-generated messages included in inference, introducing noise

  • Duplicate conversation-building logic across components


Info

Solution

The following enhancements are introduced:

  • Trigger inference only after a case is assigned to an agent

  • Apply channel-level sampling to regulate inference execution

  • Consider only customer messages for sampling decisions

  • Standardize conversation-building logic across components


Capabilities

Assigned Case Filtering

Inference execution is restricted to cases that are assigned to an agent. Unassigned cases are skipped during processing.







Java



if (isCaseAssignmentFilteringEnabled() && !isCaseAssignedToUser(universalCase)) {

return;

}


Show more lines

A case is considered assigned when:

  • A valid user assignment exists, or

  • A work assignment is present with a user as assignee

Note

This ensures that Smart Comprehend generates suggestions only when an agent is actively working on the case, improving relevance and reducing unnecessary processing.


Channel-Level Event Sampling

Inference execution is further optimized by applying sampling logic at the channel level.







Java



if (isEventSamplingEnabled(universalCase.getFromUserSocialNetwork())

&& !shouldSampleEvent(universalCase, universalMessageKeyStr)) {

return;

}

``


Show more lines

Sampling Behavior:

  • Inference is triggered at fixed intervals based on message position in the conversation

  • For a frequency N, inference runs for messages at indices: 0, N, 2N, etc.

  • Only customer messages are considered when evaluating sampling

Note

If sampling is not configured for a channel, inference continues to run for all messages (default behavior).