0.04 ms · 0 tokensPre-inference gate
Diacritic-normalized TR/EN safety & policy rules short-circuit high-risk inputs before any model call.
Yankı Verification Platform · v0.2.0 Core (MIT) + Cloud Preview
Yankı verifies every quoted claim, character span and schema contract produced by a language model before it reaches an end user—solving Turkish and multilingual Unicode offset drift, cross-chunk RAG fabrication, and pre-inference safety.
System architecture
0.04 ms · 0 tokensDiacritic-normalized TR/EN safety & policy rules short-circuit high-risk inputs before any model call.
vLLM · SGLang · APIVendor-neutral generation over open-weight GPU clusters or commercial JSON-mode endpoints.
0.09 ms · fail-closedStrips reasoning traces and markdown fences; enforces typed bounds and required fields.
0.14 ms · exact sliceMaps folded codepoints back to [start_char, end_char) in retrieved chunks; strips ungrounded quotes.
Verified production traces (curated examples)
Select a scenario below to inspect the source context, the raw unverified model draft, and Yankı's deterministic verification output. No live model call is made in the browser.
Python's native `'İSTANBUL'.lower()` expands U+0130 to 2 codepoints and shifts every subsequent slice by +1/+2 chars. Yankı's 1-to-1 codepoint folder recovers the exact `[0, 50)` source slice.
doc_id = "bddk_2026_04"
source = (
"İSTANBUL veri merkezinde tutulan birincil yedekler, "
"her iş günü 23:00 itibarıyla Ankara bölgesine çoğaltılır."
){
"answer": "Primary backups replicate nightly at 23:00 to Ankara.",
"citations": [{
"doc_id": "bddk_2026_04",
"quote": "istanbul veri merkezinde tutulan birincil yedekler"
}]
}{
"grounded": true,
"match_kind": "normalized_exact",
"doc_id": "bddk_2026_04",
"span": [0, 50],
"verified_quote": "İSTANBUL veri merkezinde tutulan birincil yedekler",
"latency_ms": 0.14
}Models frequently merge clauses from two separate retrieved documents into a single plausible-sounding fabricated quote. `verify_multi_source_citations` detects the non-contiguous stitch and strips the quote before delivery.
chunks = {
"sla_v4": "Enterprise incidents receive a 15-minute triage response.",
"postmortem_v2": "Root-cause reports are delivered within five business days."
}{
"answer": "Enterprise incidents get a 15-minute root-cause report.",
"citations": [{
"doc_id": "sla_v4",
"quote": "Enterprise incidents receive a 15-minute root-cause report."
}]
}{
"grounded": false,
"match_kind": "ungrounded_paraphrase",
"token_overlap": 0.62,
"verified_quote": null,
"action": "quote_stripped_and_flagged",
"latency_ms": 0.21
}Open-weight reasoning models emit verbose `<think>...</think>` traces and markdown fences before JSON. `yanki.schema` isolates the structured object, prevents internal chain-of-thought leakage, and enforces strict field invariants.
source = (
"We shipped the index migration on schedule, "
"yet latency spiked on shard three after midnight."
)<think>
User describes mixed relief and concern about shard three...
</think>
```json
{
"duygu": "uneasy",
"siddet": 3,
"yansitma": "Shipping on time met the goal, while shard three still needs attention.",
"alinti": "latency spiked on shard three after midnight",
"adim": "Inspect shard three slow-query logs for the 00:00 window."
}
```{
"schema_valid": true,
"think_trace_stripped": true,
"siddet": 3,
"alinti_verified": "latency spiked on shard three after midnight",
"span": [48, 92],
"latency_ms": 0.09
}High-risk inputs—including diacritic-stripped Turkish or English safety/compliance triggers—must never depend on probabilistic model refusal. `yanki.guardrails` intercepts them deterministically before any network request is made.
payload = {"text": "<safety-critical-or-regulated-trigger>", "lang": "tr"}
# Evaluated locally via normalized TR/EN rule pack before HTTP dispatch// SKIPPED — no HTTP call issued to vLLM or external API
// tokens_prompt: 0 | tokens_completion: 0{
"guardrail_triggered": true,
"llm_invoked": false,
"rule_pack": "guardrail-tr-en-v2",
"safe_routing": "Deterministic safe response returned without model call",
"latency_ms": 0.04
}Where teams deploy Yankı
Guarantee that every compliance citation resolves to a verifiable character range in official statutes, contracts or policy filings—including Turkish and European diacritics.
Wrap open-weight models (`Qwen`, `Llama`, `Mistral`, `DeepSeek`) on dedicated GPUs with strict `<think>` stripping, JSON validation and citation auditing.
Eliminate fabricated policy quotes and enforce sub-millisecond deterministic guardrails before sensitive inputs ever leave your VPC.
Run `python -m yanki.eval --strict-thresholds` in GitHub Actions or Slurm batch jobs whenever prompts, chunking strategies or model checkpoints change.
Open-source core · Available today (MIT)
While the hosted multi-tenant console is in development, the complete deterministic verification engine ships today as a clean, dependency-free Python 3.11+ library (`src/yanki/`) with full unit tests and GPU cluster recipes.
yanki.normalize1-to-1 codepoint folding for Turkish `İ/ı` and diacritics (`ğ, ü, ş, ö, ç`) with explicit source offset arrays so normalized substring hits slice cleanly into raw documents.
yanki.grounding`verify_quote_grounding` and `verify_multi_source_citations` validate every model quote against retrieved chunk IDs, returning `[start_char, end_char)` provenance or stripping hallucinations.
yanki.guardrails & schemaDeterministic sub-millisecond safety short-circuit before LLM invocation, paired with strict typed JSON extraction that strips reasoning `<think>...</think>` traces safely.
yanki.providers & hpc/Vendor-neutral zero-SDK evaluation client for OpenAI-compatible GPU servers (`vLLM`, `SGLang`) and HTTP APIs, shipped with `Apptainer` CUDA definitions and `Slurm` scripts.
git clone https://github.com/mevlanayalcin/yanki.git && cd yanki
pip install -e ".[dev]"
# 1. Verify a Turkish quote span with U+0130 (İ/i) offset preservation
python3 -m yanki.cli verify \
--source "İSTANBUL veri merkezinde tutulan birincil yedekler Ankara bölgesine çoğaltılır." \
--quote "istanbul veri merkezinde tutulan birincil yedekler"
# 2. Run the 24-case TR/EN deterministic benchmark suite (offline CI gate)
python3 -m yanki.eval --offline --strict-thresholdsReproducible benchmark suite
Executed automatically on every commit in GitHub Actions CI across Python 3.11 and 3.12 (`python -m yanki.eval --offline --strict-thresholds`).
| Verification dimension | Adversarial test coverage | Target threshold | Measured result |
|---|---|---|---|
| Turkish İ/ı & diacritic span provenance | Uppercase İ/I shifts, ASCII-typed Turkish, whitespace folding | 100.0% | 100.0% (Pass) |
| Hallucinated & paraphrased quote stripping | Synonym rewrites, stitched clauses, fabricated spans | 100.0% stripped | 100.0% stripped |
| Multi-source RAG chunk attribution | Cross-chunk fabrication, cited doc_id mismatch, exact spans | 100.0% | 100.0% (Pass) |
| Pre-inference safety gate (TR + EN) | Diacritic-free & inflected crisis phrases, benign controls | 100.0% recall / 0% FP | 100.0% / 0.0% FP |
| Reasoning <think> & malformed JSON resilience | Reasoning <think> traces, markdown fences, out-of-range bounds | 100.0% fail-closed | 24 / 24 (100.0%) |
Private preview · In active development
We are onboarding a small cohort of engineering teams to test the hosted verification gateway, audit dashboard and multi-tenant policy engine. Leave your email for preview access, or deploy the MIT Python core today.
Engineering & partnerships
Tell us about your retrieval pipeline, target languages, runtime constraints and timeline. Enquiries go directly to the founder.