Skip to Content

Semantic-Sift

Semantic-Sift is the flagship intelligence engine of the Context Design ecosystem. It serves as a specialized high-density refinery that transforms noisy, unreasoning-ready data into high-fidelity context.

githubluismichio/semantic-sift
CI statusTestsLicense

Philosophy: Signal-to-Noise Ratio (SNR)

While modern LLMs have massive context windows, their reasoning accuracy often degrades as noise increases. Semantic-Sift solves this by treating your context window as a precious resource—optimizing for SNR so your models spend more time reasoning and less time navigating boilerplate.

The Engine: Multi-Stage Distillation

Sift employs a multi-layered kernel designed for technical precision:

1. The Heuristic Sieve

A high-speed regex-based engine that incinerates structural noise in milliseconds. It targets:

  • Log Boilerplate: Timestamps, thread IDs, and ETags.
  • Minified Code: Identifies and suppresses non-human-readable chunks.
  • Markdown Junk: Strips navigation bars, footers, and repetitive sidebars from documentation.

2. The Neural Refinery (LLMLingua-2)

A model-based semantic pruner that uses natural language processing to remove redundant tokens while preserving 95% of the core intent. It ensures that the final output is grammatically coherent and dense with meaning.

Value Engineering: The Dual ROI

1. Operational ROI (Quality & Performance)

  • Attention Precision: Prevents “Lost in the Middle” syndrome by ensuring the model’s full reasoning power is focused on the technical signal.
  • Latency Reduction: Smaller prompts lead to faster “Time to First Token” (TTFT).

2. Economic ROI (Direct Savings)

  • Wallet Protection: Typically reduces outgoing token volume by 30-70%, directly lowering API costs for pay-per-token models like Claude 3.5 or GPT-4o.

High-Impact Use Cases

  • The Log Hunter: Synthesizing 100,000 lines of logs into clear error signatures and stack traces.
  • The Knowledge Hunter: Converting 50-page PDFs and complex technical Word specs into high-density Markdown summaries.
  • The Context Strategist: Managing long chat histories and RAG-extracted documents to keep the agent’s attention focused on the current task.

Dual Engine Routing

Semantic-Sift features a Hybrid Engine strategy to balance performance and scale:

  • Rust Sift-Core: An ultra-low-latency sidecar for everyday tasks and code files (under 30k characters).
  • Python PyTorch: A heavy-duty engine with Flash Attention for massive document batches and multi-modal ingestion.

Universal Ingestion

Supports high-fidelity conversion of binary formats to structured Markdown:

  • Documents: PDF, DOCX, PPTX
  • Data: XLSX, CSV
  • Web: HTML, ZIP

Performance Benchmarks

ScenarioInput ProfileOutputReduction
AWS Framework (PDF)1.9M Chars / 14MBHigh-Density MDSurgical
Natural LanguageConversational ProseCore Intent~50.0%
GitHub Actions (CI)Verbose Build LogsClean Stack Trace47.5%
System Logs (HDFS)100k Lines of LogsError Signatures32.5%