Available Engines
Rule-Based
RTRuleRegexRTNewLine
LLM-Based (Boundary Inference)
RTLLMOffsetBasedRTLLMSegUnitBasedRTLLMForcedDecoderBasedRTLLMSurprisalRTLLMEntropyRTLLMTopKShiftRTLLMFlatnessBreak
Discourse / Reasoning Schemas
RTLLMThoughtAnchorRTLLMReasoningFlowRTLLMArgument
Topic / Semantic / NLI
RTBERTopicSegmentationRTEmbeddingBasedSemanticShiftRTEntailmentBasedSegmentationRTZeroShotSeqClassificationRTZeroShotSeqClassificationRFRTZeroShotSeqClassificationTA
PRM-Based
RTPRMBase
Engine Configuration
You can override engine parameters at call time:
from rt_seg import RTSeg
from rt_seg import RTRuleRegex
from rt_seg import RTBERTopicSegmentation
from rt_seg import OffsetFusionGraph
segmentor = RTSeg(
engines=[RTRuleRegex, RTBERTopicSegmentation],
aligner=OffsetFusionGraph,
label_fusion_type="concat", # or "majority"
seg_base_unit="clause",
)
trace = "..."
offsets, labels = segmentor(
trace,
model_name="Qwen/Qwen2.5-7B-Instruct",
chunk_size=200,
)