HIP-1346: Evidence-Grounded Retrieval and Decision Evaluation. Status Draft. Hanzo architectural specification.
This specification defines canonical evaluation harnesses, immutable vector index metadata contracts, retrieval-policy boundaries between Kai and Zen, and Research Bounties #21 through #30 across hanzoai/index, hanzoai/agents, and hanzoai/ml.
Adding another index backend does not solve poor evidence selection, silent dimension or prefix mismatches across flexible embedding models, or ungrounded hallucinations. Moreover, retrieval workflows frequently waste latency fetching unnecessary context or concatenating distractors without objective diagnosis. Evaluating retrieval behavior, enforcing immutable vector metadata, and letting Kai make structured gating decisions while Zen handles synthesis establishes clear, measurable accountability.
The key words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY are to be interpreted as in RFC 2119.
Every vector index or collection across hanzoai/cloud, hanzoai/index, hanzoai/memory, hanzoai/brain, and hanzoai/vector MUST persist and enforce immutable collection metadata upon creation, insert, and query:
model_id (canonical model identifier),model_revision (pinned immutable artifact revision / commit digest),dimensions (positive integer vector width, e.g., 128, 256, 512, or 768 under Matryoshka truncation),normalization (e.g., l2),query_prefix and doc_prefix (asymmetric task-prefix policy).Insertions or queries whose runtime parameters disagree with any stored metadata field MUST fail explicitly rather than mixing incompatible embeddings. Hosted comparisons (e.g., against external embedding APIs) MUST align identical dimensions, normalization, and task prefixes and account for media transfer, storage, rebuild, and query latency in addition to inference token cost.
Kai (HIP-1332) MUST remain a structure-only decision head returning calibrated discrete choices and confidence scores for retrieve-or-answer gating (#22), source-expansion escalation (#23), and verification triggers (#30).Zen (hanzoai/ml / hanzoai/engine) owns text/passage generation for hypothetical documents (#24), distractor-aware fine-tuning (#27), and grounded response synthesis.hanzoai/index): Benchmark direct concurrent insertions into on-disk ANN structures under continuous query traffic (recall@10 vs p99 query latency).hanzoai/agents / hanzoai/index): Gate retrieval decisions with Kai before Zen generation, measuring avoided retrievals, factual accuracy, and total cost.hanzoai/index / hanzoai/agents): Detect weak evidence and invoke secondary retrieval or source expansion on corrupted or irrelevant top-k sets.hanzoai/index): Generate synthetic passages with Zen for query expansion and compare recall and dollar cost against direct query embeddings.hanzoai/index): Attribute errors across retrieval misses, irrelevant evidence, unsupported claims, and answer omissions.hanzoai/index): Benchmark page-image retrieval on scientific PDFs, charts, and tables against text-only extraction.hanzoai/ml / hanzoai/index): Fine-tune eligible Zen checkpoints with distractor rejection and compare citation accuracy and training cost.hanzoai/agents): Evaluate existing memory policies (LongMemEval updates, contradiction, temporal order, abstention, cross-session recall) without introducing a parallel memory store.hanzoai/agents): Measure answer accuracy and token budget across document positions in packed contexts.hanzoai/index / hanzoai/agents): Decompose generated answers into atomic testable claims linked to evidence spans and measure supported-claim precision and verifier calibration.Separating retrieval gating (Kai), synthesis (Zen), and immutable embedding metadata eliminates silent recall degradation from mismatched vector spaces while yielding reproducible diagnostic baselines across memory and search subsystems.
Mixing unpinned model revisions or unsalted task prefixes inside shared collections corrupts ranking and can suppress authorized results or surface wrong-tenant/out-of-scope candidates. Immutable collection metadata (§1) plus ingress ACL checks prior to retrieval enforce scope integrity.
hanzoai/index, hanzoai/agents, hanzoai/ml, hanzoai/brain, hanzoai/memoryReleased under CC0 1.0 Universal Public Domain Dedication.