docs: reconcile project status and local stack operations

Refresh entry points and progress checkpoints, document schema revision 0006, and consolidate the final ElevenLabs/GapGPT profile and host prerequisites.

Preserve dated activation evidence and distinguish implementation, targeted validation, incomplete full-suite checks and remaining human acceptance gates.

Validation: 409 local Markdown link targets resolved and staged whitespace checks passed.
This commit is contained in:
amirhosein mazaheri
2026-10-20 09:00:55 +03:30
parent 42400495af
commit 9b5be918d4
15 changed files with 817 additions and 377 deletions
+36
View File
@@ -0,0 +1,36 @@
# User-authorized grounding correction (2026-10-18)
Scope: stop unsupported voice answers and send up to ten retrieved passages. The reported incorrect hours and offered appointment coordination were not supported by the supplied evidence. The earlier phone case had its supporting FAQ at rank eight and only five sources reached the model.
## Behavior
Shared retrieval now admits up to ten whole chunks within the existing 12,000-character evidence budget; eligibility, document identities, access scope, exact matching and embeddings are unchanged. Fewer than ten may be returned because of cutoff or the text budget. Retrieval policy identity changes to `whole-10-12000`.
The common voice instruction requires current-turn evidence for every factual claim, ignores source-order authority, forbids invented hours/prices/current open status and unsupported action promises, and requires extractive answers. It distinguishes static documented hours from current day/time/holiday status.
For the local engine, `LOCAL_S2S_STRICT_GROUNDING=true` activates a gateway gate before assistant text can reach TTS. It accepts answer text only when it is a contiguous excerpt of evidence reported and successfully retrieved/revalidated after the most recent user message, or one of a few fixed nonfactual greetings/clarifications/abstention messages. FAQ question premises are excluded. If there is exactly one cited FAQ with a bounded answer, a generated paraphrase is replaced by that FAQ answer verbatim. Otherwise unsupported output is replaced by a fixed Persian abstention. Tool calls pass through; accompanying unverified assistant prose is removed. Previous assistant prose and previous turns cannot supply evidence. This gate is local-engine-specific; common instructions also affect other voice adapters.
Chat completion responses are bounded and buffered before forwarding, including SSE, so partial hallucinated sentences cannot reach TTS before validation. This adds waiting until completion and restricts paraphrasing/multi-passage synthesis. It prevents newly generated wording from passing the gate, but does not establish truth of the uploaded text or semantic relevance of every literal excerpt.
## Validation
108 focused provider-free tests passed, covering ten-source admission, the former rank-eight phone case, prompt propagation, numeric/hour/appointment rejection, prior-turn and unreported-source rejection, and streamed tool-call preservation.
The old synthetic calibration report was re-evaluated, then replaced locally by a fresh measured calibration against the active uploaded FAQ and actual current eligible corpus. Six source-bound support cases (phone, CEO contact procedure, hours, land pricing conditions, address and IT extension) and four out-of-domain negative cases produced 6/6 complete support and 0/4 unsupported retrieval positives, at measured cosine cutoff 0.5498457982262681. These are calibration observations, not held-out quality acceptance. Original report and diagnostic reanalysis remain in ignored local evidence files. No document was re-embedded or modified.
A real-provider prompt-only trial still produced unsupported claims, which motivated the deterministic gate. Do not present prompt instructions alone as a guarantee. Local evidence: `production-ten-calibration.json`, `grounded-provider-answers.json` under ignored `.local-s2s-build/combined-evidence`.
Final live-provider gateway checks used the actual retrieved passages and current GapGPT `gpt-4.1-mini`, with normal tool reporting. Phone: returned literal `031 - 3125`; CEO: returned the literal documented contact procedure; current open/closed status and land total price: refused unsupported generated output with the fixed insufficient-evidence message. These checks verify Chat Completions/gateway output, not a human microphone/TTS quality acceptance. Actual backend/engine WebSocket admission also returned `session_ready` and closed normally. Extractive refusal may reject a valid paraphrase or a multi-source answer; this is the deliberate strict mode tradeoff requested here.
### Search-query normalization (reconciled 2026-10-20)
The shared SearchInput validator strips recognized Persian forms of the Isfahan
industrial-parks organization name from a longer query, trims adjacent leading
or trailing prepositions and collapses whitespace. A removal is retained only
when at least three characters remain; an organization-only query is preserved.
This reduces repeated organization-name expansion in entity/contact searches.
It changes retrieval query text, not authenticated organization scope, document
eligibility or the optional context field. The tool description also asks the
model not to append the organization name. This code path is separate from the
extractive output gate and does not establish measured relevance improvement.