sinc-LLM: Open Source Framework for Nyquist-Compliant Prompts
Table of Contents
What Is sinc-LLM?
sinc-LLM is the open-source framework I built that applies the Nyquist-Shannon sampling theorem to LLM prompts. It replaces trial-and-error prompt engineering with formal specification theory, math you can audit yourself.
I based it on my sinc-LLM paper, where I analyzed 275 production prompt-response pairs across 11 autonomous agents and demonstrated a 97% cost reduction while increasing output quality from SNR 0.003 to 0.92. Auditable open-source math is the easy part; the harder question is whether your AI vendor's proprietary prompt stack is auditable at all. This article walks through the framework, and the audit at the end gives you the contractual questions about source ownership and platform lock-in.
Core Concepts
I designed sinc-LLM to treat every prompt as a sampled version of a continuous specification signal. The key concepts:
- 6 Specification Bands, PERSONA, CONTEXT, DATA, CONSTRAINTS, FORMAT, TASK. Every complete prompt must sample all 6.
- Nyquist Rate, The minimum sampling rate for faithful reconstruction. For prompts, this means all 6 bands must be present.
- Aliasing = Hallucination, When bands are missing, the model fills them with phantom specifications. This is mathematically equivalent to aliasing in signal processing.
- Band Weighting, CONSTRAINTS (42.7%) and FORMAT (26.3%) carry the most quality weight. Token allocation should reflect this.
Architecture
I built the framework with three components:
1. Auto-Scatter Engine
Takes any raw prompt and decomposes it into 6 specification bands. Identifies missing bands and suggests content. Available as CLI tool and HTTP API.
py -X utf8 auto_scatter.py "your raw prompt" --execute # or POST http://localhost:8461/execute
2. sinc JSON Format
A structured format for Nyquist-compliant prompts:
{
"formula": "x(t) = ... sinc((t - nT) / T)",
"T": "specification-axis",
"fragments": [
{"n": 0, "t": "PERSONA", "x": "..."},
{"n": 1, "t": "CONTEXT", "x": "..."},
{"n": 2, "t": "DATA", "x": "..."},
{"n": 3, "t": "CONSTRAINTS", "x": "..."},
{"n": 4, "t": "FORMAT", "x": "..."},
{"n": 5, "t": "TASK", "x": "..."}
]
}
3. Online Transformer
A free web tool at sincllm.com that converts raw prompts into sinc JSON format in real time.
Getting Started
Clone the repository and start using sinc-LLM in under 5 minutes:
git clone https://github.com/mdalexandre/sinc-llm.git cd sinc-llm pip install -r requirements.txt py -X utf8 auto_scatter.py "Write a blog post about AI" --execute
The auto-scatter engine will decompose the raw prompt into 6 bands, identify that CONSTRAINTS, FORMAT, and DATA are missing, and suggest content for each missing band.
Community and Contributing
I released sinc-LLM under an open source license on GitHub. Contributions are welcome in several areas:
- Band detection accuracy improvements
- Language support beyond English
- Integration plugins for popular LLM frameworks (LangChain, LlamaIndex)
- Empirical validation studies with different models
- Additional ablation studies on band weighting
Read my full paper for the theoretical foundation. Try my online transformer to see it in action.
The Bigger Question
The framework is open source for a reason. The math is the math. The 6 bands are the 6 bands. You can audit the code, fork the repo, propose better metrics. The signal-theoretic argument is yours to verify.
Auditing the open framework is the easy part. The hard part is asking your AI vendor whether their proprietary prompt stack is auditable at all, whether they hand over source code in the contract, whether they leave you operating after termination. Most lock you into platforms.
Now ask your AI vendor the same questions.
You just learned the open framework. The 10-Point AI Vendor Audit asks whether the agency running your AI matches the same transparency standards: source-code ownership, audit trail, no platform lock-in. Free 16-page PDF, yes/no checklist, 15 minutes per vendor.
→ Get the auditReal sinc-LLM Prompt Example
This is the exact JSON format that sinc-LLM uses. Paste any raw prompt at sincllm.com to generate one automatically.
{
"formula": "x(t) = Σ x(nT) · sinc((t - nT) / T)",
"T": "specification-axis",
"fragments": [
{
"n": 0,
"t": "PERSONA",
"x": "You are a Open source maintainer and developer advocate. You provide precise, evidence-based analysis with exact numbers and no hedging."
},
{
"n": 1,
"t": "CONTEXT",
"x": "This analysis is part of a production system where accuracy determines revenue. The sinc-LLM framework identifies 6 specification bands with measured importance weights."
},
{
"n": 2,
"t": "DATA",
"x": "Fragment importance: CONSTRAINTS=42.7%, FORMAT=26.3%, PERSONA=7.0%, CONTEXT=6.3%, DATA=3.8%, TASK=2.8%. SNR formula: 0.588 + 0.267 * G(Z1) * H(Z2) * R(Z3) * G(Z4). Production data: 275 observations, 51 agents."
},
{
"n": 3,
"t": "CONSTRAINTS",
"x": "State facts directly. Never hedge with 'I think' or 'probably'. Use exact numbers for every claim. Do not suggest generic solutions. Every recommendation must be specific and verifiable. Include at least 3 MUST/NEVER rules specific to this task."
},
{
"n": 4,
"t": "FORMAT",
"x": "Lead with the definitive answer. Use structured headers. Tables for comparisons. Numbered lists for sequences. Code blocks for implementations. No trailing summaries."
},
{
"n": 5,
"t": "TASK",
"x": "Write the getting-started tutorial for sinc-llm showing pip install through first SNR computation"
}
]
}