Table of Contents
Fetching ...

Semantic Decomposition and Selective Context Filtering -- Text Processing Techniques for Context-Aware NLP-Based Systems

Karl John Villardar

TL;DR

The paper addresses the challenge of integrating LLMs into context-rich, real-world workflows by identifying core limitations such as limited context windows, memory constraints, and hallucinations. It introduces two techniques, Semantic Decomposition and Selective Context Filtering, to impose structured prompt schemas and prune irrelevant context, thereby enabling more coherent, context-aware interactions within LLM pipelines and leveraging existing approaches like RAG, CoT, and Structured Outputs. A formal evaluation framework using synthetic datasets SynPrompt and SynAsst, plus the Exponential Consistency Index (ECI) defined as $ \bar{S} =\frac{1}{d} \sum_{i=1}^{d} \left(\frac{\hat{k_i}}{k}\right)^\alpha$, assesses consistency under varying decomposition depth and filtering strategies. Experimental results reveal trade-offs between depth of decomposition, context exposure, and filtering strategy, with vector-based filtering often outperforming LLM-based methods and smaller models occasionally delivering more stable performance. Overall, the work provides a practical pathway to improve LLM-to-system interfaces for domains requiring dynamic, context-sensitive responses and efficient workflow automation.

Abstract

In this paper, we present two techniques for use in context-aware systems: Semantic Decomposition, which sequentially decomposes input prompts into a structured and hierarchal information schema in which systems can parse and process easily, and Selective Context Filtering, which enables systems to systematically filter out specific irrelevant sections of contextual information that is fed through a system's NLP-based pipeline. We will explore how context-aware systems and applications can utilize these two techniques in order to implement dynamic LLM-to-system interfaces, improve an LLM's ability to generate more contextually cohesive user-facing responses, and optimize complex automated workflows and pipelines.

Semantic Decomposition and Selective Context Filtering -- Text Processing Techniques for Context-Aware NLP-Based Systems

TL;DR

The paper addresses the challenge of integrating LLMs into context-rich, real-world workflows by identifying core limitations such as limited context windows, memory constraints, and hallucinations. It introduces two techniques, Semantic Decomposition and Selective Context Filtering, to impose structured prompt schemas and prune irrelevant context, thereby enabling more coherent, context-aware interactions within LLM pipelines and leveraging existing approaches like RAG, CoT, and Structured Outputs. A formal evaluation framework using synthetic datasets SynPrompt and SynAsst, plus the Exponential Consistency Index (ECI) defined as , assesses consistency under varying decomposition depth and filtering strategies. Experimental results reveal trade-offs between depth of decomposition, context exposure, and filtering strategy, with vector-based filtering often outperforming LLM-based methods and smaller models occasionally delivering more stable performance. Overall, the work provides a practical pathway to improve LLM-to-system interfaces for domains requiring dynamic, context-sensitive responses and efficient workflow automation.

Abstract

In this paper, we present two techniques for use in context-aware systems: Semantic Decomposition, which sequentially decomposes input prompts into a structured and hierarchal information schema in which systems can parse and process easily, and Selective Context Filtering, which enables systems to systematically filter out specific irrelevant sections of contextual information that is fed through a system's NLP-based pipeline. We will explore how context-aware systems and applications can utilize these two techniques in order to implement dynamic LLM-to-system interfaces, improve an LLM's ability to generate more contextually cohesive user-facing responses, and optimize complex automated workflows and pipelines.

Paper Structure

This paper contains 20 sections, 1 equation, 5 figures, 3 tables.

Figures (5)

  • Figure 1: Example system schema where Semantic Decomposition and Selective Context Filtering is implemented. Highlighted in red shows the relevant, filtered-down context and the pipeline path that is used to generate the user-facing prompt.
  • Figure 2: Example of a two-level Semantic Decomposition schema for a single processing pipeline. Inputs prompts can either be Informational, a Query, Conversational,or a Command. A Command can either be Create, Delete, or Edit. We use Miscellaneous as our negative fall-back category.
  • Figure 3: Example schema for filtering a pipeline's input context.
  • Figure 4: Complete Context-Aware System Hierarchy, with the color indicating the schema node depth. Leaf nodes are aggregated for brevity.
  • Figure 5: Plot of the Exponential Consistency Index given various $\alpha$ values $0.4, 0.65, 1.0, 1.5, 2.5$, with the x-axis corresponding to the ratio of correct evaluations $\hat{k_i}/{k}$. Higher $\alpha$ values penalize slight evaluation mistakes more heavily.