Wire the guarded conversational RAG answer layer end-to-end

This commit is contained in:
2026-08-05 14:33:13 +07:00
parent 834d9e51b0
commit ef08b4929e
127 changed files with 37921 additions and 169 deletions
@@ -0,0 +1,61 @@
# Embedding-readiness audit — 2026-08-04
## Verdict
**Technically READY TO EMBED; NOT authorized to call a paid provider or run a
full-corpus embedding job without separate owner approval.**
Workspace audited: `D:\VSF-DUOCTHU`. No work was performed in the OneDrive copy
or `D:\AITT_VSF`; no commit, push, IAM change, Bedrock call or cloud resource was
created.
## Objective evidence
| Check | Result |
|---|---:|
| Canonical schema | v4 only |
| Total chunks | 15,100 |
| Prose / descriptors | 14,949 / 151 |
| `cl100k_base` tokens | 4,105,382 |
| Over 800 tokens | 0 |
| Reassembly failures using `source_text` | 0 |
| Non-unique/missing `source_text` support | 0 |
| Inexact physical ranges | 0 |
| Missing/inexact printed provenance | 0 |
| Unverified attachment headers present | 0 |
| Descriptor text with inferred columns | 0 |
| Descriptor/block count | 151 / 151 |
| Ingestion tests | 292 passed |
| AI-service tests with live local stores | 25 passed |
| Full local pseudo-vector load | 15,100 points twice; idempotent |
| Qdrant after cleanup | 0 collections |
Raw artifact SHA-256:
`8dfae08ae6d9222089c5cdb4207a064fe67989f10f7552b555af0aef6331d9a1`
Normalized manifest SHA-256:
`04a27166eaa255b516829f8364227e65ad700e51446b569609d18b5efd11189c`
## Safety changes reviewed
- Dose continuations repeat active route/population context in retrieval text;
compound dose-plus-next-label atoms split losslessly. Focused historical seam
audit reconstructed 49 high-risk cases and found 49 safe, 0 unsafe.
- `source_text` remains contiguous source evidence; retrieval-only label prefixes
are explicit in `context_labels`, so reassembly does not depend on stripping
guessed text.
- All inferred table headers are embargoed. Descriptor chunks contain verified
metadata only and route users to the source region/crop.
- Prose and descriptor citations use exact chunk/attachment page support;
attachment `block_id`, `bbox`, physical page and printed page propagate through
Qdrant to the API.
- Loader validation is fail-closed and accepts exactly schema v4.
## Not established by this audit
- No real embedding vector was generated and no embedding model was selected.
- No retrieval-quality claim follows from deterministic pseudo-vectors.
- There is no whole-document human-reviewed medical ground truth.
- Quarantined tables/formulas are citable visual evidence, not reconstructed
numeric rows; borderless-table and bar-less-formula recall remain open risks.
- Clinical release still requires clinician-authored evaluation cases.