Inference
This document explains how recommendations are created in the Next Best Message, Search & Autocomplete feature. The process involves multiple components working together to generate and refine suggestions based on user input.
Overview
The inference process is designed to provide accurate and contextually relevant recommendations. It leverages various helpers and searchers to gather, filter, and finalize candidate suggestions. The following diagram illustrates the sequence of operations:
Explanation of Components
- Autocompleter: The central component orchestrating the inference process. It interacts with various helpers and searchers to gather candidates.
- PersonalCollectionHelper: Retrieves prefix matches from the user's personal collection.
- DeepdeskSearcher (personal collection): Searches the user's personal collection for candidates when the input is a single word.
- TrieHelper: Utilizes a dynamic trie structure to find prefix matches.
- DynamicTrie: A data structure optimized for prefix matching.
- Semantic: Provides candidates based on semantic analysis, particularly when the input ends on a split point.
- Recommendation Helper: Generates additional candidates when the input ends on a split point.
- DeepdeskSearcher (generic): Searches a generic collection for candidates when the input is a single word.
Process Summary
- The Autocompleter queries multiple sources to gather candidate suggestions.
- Each helper or searcher contributes a set of candidates based on its specific logic.
- The Autocompleter sorts, filters, and finalizes the candidates to produce the final recommendations.
This modular approach ensures that the recommendations are both comprehensive and contextually relevant.