Calendar / Specifications / QP-SYS-001
TECHNICAL-NOTE PAPER · QP-SYS-001 · VERSION 0.1.1

NLP/NLG in I-Ching Vir: Vector Representation, History-Based Adaptation and Answer Gating

NLP/NLG của I-Ching Vir: biểu diễn vector, học từ lịch sử và kiểm soát trả lời
Quizzman Research & Engineering Team (Quizzman Research Lab) · 23 October 2026 · Version 0.1.1 · ● Experimental

Abstract

Background: Casting questions are often short, underspecified or phrased in varied ways. Method: This note describes the deployed I-Ching Vir pipeline: 64-dimensional integer vectors, corpus-derived weights, prototype matching and rule-based language generation. Deidentified Python-backend history was reviewed and grouped to add 93 domain prototypes and 55 rejection prototypes. Results: In fixed-context replay, domain matches on 59 validation questions increased from 23 to 27; direct answers on 143 reviewed-rejected questions decreased from 23 to 4. Conclusion: These observations support data-based adaptation and answer gating within the measured scope. They do not establish broad generalization or the predictive validity of divination.

1 Scope

This technical note records the deployment and evaluation snapshot of 23 October 2026, Asia/Saigon. Its status is experimental; independent peer review has not been completed. The scope covers NLP, scoring integration, NLG eligibility and corpus updates. It neither introduces new divination rules nor tests whether predicted events occur. [1] [2]

2 References and evidence

The primary evidence consists of inspected source symbols and checksums, aggregate replay results and deployment verification records. Public supplements contain neither historical user questions nor identifying information. The operational predicates in division 10 describe the inspected implementation; they do not establish a language standard for Vir. [1] [2] [3]

3 Terms and definitions

NLP maps a question to its domain, question type and slots such as target, event and time. A prototype is the vector of a labelled example. A rejection bank holds prototypes of questions unsuitable for direct conclusions. NLG turns structured information into text. A direct answer is an enabled response branch, not a statement whose truth has been established.

4 Symbols

TT denotes token count; D=64D=64 denotes dimensionality; NN is the number of prototype documents used for weighting; dfbdf_b is document frequency for bucket bb; and s=10s=10 is the current IDF scale. PP denotes the maximum positive score and RR the maximum rejection score. Similarity scores range from 0 to 100 and are not event probabilities.

5 Conventions and assumptions

Vietnamese is the canonical edition; English and zht are corresponding translations. Epistemic roles remain separate: code observations are source statements; thresholds are implementation conventions; replay counts are computed results; improved performance on future data is an unconfirmed hypothesis. Replay fixes the Qian hexagram and associated context to isolate language changes; it does not sample the full casting distribution.

6 Architectural background

I-Ching Engine is the enclosing engine; Liuyao and Yingqi are component engines, while shared NLP, scoring and NLG belong to the I-Ching level.

The pipeline maps a question through NLP into QueryContext, while the engine supplies structured casting facts. Scoring combines those inputs; NLG eligibility then routes to headline, body, caveat and evidence identifiers. Separating responsibilities distinguishes a domain-routing error from an incorrect casting fact or an unsuitable explanation. Language analysis does not supply the entropy used for casting. [1]

7 Sources and materials

The Python-source snapshot contained 466 history rows, including 13 hidden rows, and 753 snapshots. Visibility, nonempty-question and hidden-history-link exclusions yielded 443 history rows and 724 eligible snapshots: 1,167 source rows. These rows contain duplicates and do not equal training-example count.

After deidentification and exclusion of previously available material, authorized AI review covered 361 new questions: 218 accepted and 143 rejected. These labels combine AI review with earlier weak supervision; they are not independently adjudicated expert gold labels. Historical divination conclusions were not treated as observed outcome labels. [2]

8 Preparation and evaluation methodology

Near-duplicate questions were grouped before partitioning. Of 218 newly accepted questions, 163 entered training and 55 remained separate; earlier partitions were preserved. New training groups yielded 144 representatives. Removing deidentification markers and requiring an explicit domain anchor retained 93 new domain prototypes.

Of 143 rejected questions, 64 were too short or retained redaction markers and were excluded from rejection learning. The remaining partition contained 61 training and 18 separate validation items; 55 training-group representatives formed the rejection bank. Examples near accepted questions were excluded. Only the domain head was activated; new history-derived question-type seeds were not enabled.

Replay contained 75 public cases, 180 accepted training items including prior data, 59 accepted validation items and 143 rejected items: 457 cases. Because candidate configurations and thresholds were compared on these partitions, they constitute development validation rather than an untouched blind test. [2]

9 Vector representation

9.1 Tokens and deterministic vectors

The entry point lowercases and trims text. Tokenization applies cleaning, whitespace splitting and a byte heuristic for CJK; it is not a complete grammatical parser. Token hashing processes UTF-8 bytes:

h0=5381,hi+1=(131hi+ui)&2147483647.(1)h_0=5381,\qquad h_{i+1}=(131h_i+u_i)\mathbin{&}2147483647.\tag{1}

The && symbol in (1) denotes mathematical bitwise AND. Token IDs map to 8,000 positions. The active encoder creates an empty weight table and therefore uses deterministic integer vectors with components from −10 to 10. Despite the module name subword, this path hashes tokens and does not learn BPE merge operations. [1]

9.2 Weighting and pooling

Document-frequency statistics use 4,096 hash buckets. For N>0N>0 and dfb>0df_b>0:

wb=1+⌊(s−1)(N−dfb)N⌋.(2)w_b=1+\left\lfloor\frac{(s-1)(N-df_b)}{N}\right\rfloor.\tag{2}

Unobserved buckets retain weight 1. This is an integer linear variant rather than conventional logarithmic IDF. The sentence representation is a weighted sum:

q=∑t=1Twtet∈Z64.(3)q=\sum_{t=1}^{T}w_t e_t\in\mathbb{Z}^{64}.\tag{3}

Pooling does not divide by total weight. Cosine scoring uses integer square roots, maps negative scores to zero and caps scores at 100; zero-norm vectors score zero. [1]

10 Routing and rejection algorithm

Each label receives the maximum similarity across its prototypes. Domain selection additionally checks a minimum threshold and the gap to the second candidate. Rejection prototypes share the positive bank's IDF weights so their scores can be compared. The deployed configuration applies:

reject⁡(q)=(R≥45)∧(R+5≥P).(4)\operatorname{reject}(q)=(R\ge45)\land(R+5\ge P).\tag{4}

When (4) holds, the domain becomes ID 99, representing ambiguity. A configured rejection corpus that is missing or empty, or an invalid threshold, invalidates the model. With no rejection corpus configured, previous behavior is preserved. This predicate supplements the existing completeness checks.

The direct NLG gate evaluates:

direct⁡=(is_complete⁡=1)∧(confidence_overall⁡≥60).(5)\operatorname{direct}=(\operatorname{is_complete}=1)\land(\operatorname{confidence_overall}\ge60).\tag{5}

NLP derives completeness from schema requirements, domain/question-type status and target or event presence. Confidence is an internal score, not a calibrated probability. [1]

11 Vir implementation and language generation

The native backend implements NLP, scoring and NLG in .vri and is compiled for Linux ARM64 with virc 2026.2.19. Vectors are held in Vec. Projection helpers and experimental ML scaffolding exist in the repository, but the active encoder returns pooled vectors directly. This update did not run tensor autodifferentiation, SGD, contrastive learning or LLM fine-tuning.

NLG uses rules, templates and slot/timing composition, with vi/en/zh/zht/ja/ko outputs. It selects phrasing from casting facts, domain, question type, score band and language, and attaches evidence identifiers such as hex_1_judgment. Identifiers support traceability; they do not establish that the inference is correct. Python scripts orchestrate data preparation and evaluation, so a native Vir runtime does not imply that every system component is written in Vir. [1]

12 Verification and reproducibility

Supplements provide aggregate measurements, binary/configuration hashes, source provenance and synthetic test vectors without user data. verify-artifacts.py rechecks arithmetic, rejection boundaries and count consistency; it does not substitute for engine replay.

Full replay requires authorized access to the deidentified private corpora and the binary/configuration identified by hashes. Those corpora are not published, limiting independent external replication. Deployment backed up both binary and configuration, performed HTTP checks and reloaded the native service. Post-deployment multilingual NLG canaries passed 8/8. [3]

13 Results

  • Accepted validation domain matches: 23/59 → 27/59, approximately 39.0% → 45.8%, an increase of about 6.8 percentage points.
  • Question-type matches on that partition: 35/59 → 35/59.
  • Training domain matches: 80/180 → 136/180; training performance is not evidence of generalization.
  • Direct answers among 143 reviewed-rejected items: 23 → 4, with no newly enabled direct answer relative to baseline.
  • Negative training: 19/61 → 0/61 direct answers; negative validation: 4/18 → 4/18.
  • All 457 candidate responses contained the required text fields and checked canonical citation. This measures output integrity.

Public regression retained domain 69/70 labelled cases, question type 70/70 and completeness 74/75 across 75 cases. Non-regression is not correctness on every case. Transport passed 98 cases, localization 18 and NLG canaries 8; these suites measure different properties and cannot be added into an AI accuracy rate. [2] [3]

14 Discussion

Additional prototypes improved routing within the measured set, while rejection reduced unwanted direct answers primarily on training items. Four negative validation cases remain; that partition showed no reduction in the count. The domain gain is modest and absolute correctness remains low. Independent labels, a fresh evaluation set excluded from threshold selection, and separate assessments of domain, intent, slots and reasoning quality are subsequent research priorities, not completed results.

15 Limitations

AI labels may be wrong; the history is topic-concentrated and predominantly Vietnamese. Public regression favors yes/no questions; zht has only two NLP cases. Fixed-context replay does not cover every hexagram, time or interpretive school. Deterministic hashed vectors do not themselves learn synonym relationships as trained embeddings would, and buckets can collide. Citation checks do not fully assess source use. This note supplies no latency, memory or Vir/Python speed benchmark. NLP measurements establish neither casting CSPRNG certification, correctness of divination rules nor predictive validity.

16 Conclusion

I-Ching Vir combines 64-dimensional vector routing with rule-based NLG and structured evidence. The Python-history update adds domain prototypes, recomputed IDF and rejection examples, producing bounded validation-domain gains and fewer unwanted direct answers on reviewed cases. NLG has not been trained as a language model. Results should be reported together with their remaining errors and evaluation limits.

Bibliography

  • [1] Inspected implementation source manifest and symbols, 23 October 2026.
  • [2] Aggregate replay and corpus-preparation report, 23 October 2026.
  • [3] Native deployment verification and checksum record, 23 October 2026.

Bibliography (ISO 690 Profile)

  1. [1] Quizzman Research & Engineering Team. I-Ching Vir inspected source manifest, 2026-10-23. 2026. [URL] (Primary project evidence prepared with AI assistance. Private user questions and corpora are excluded.)
  2. [2] Quizzman Research & Engineering Team. I-Ching Vir Python-history corpus and replay aggregate evaluation, 2026-10-23. 2026. [URL] (Primary project evidence prepared with AI assistance. Private user questions and corpora are excluded.)
  3. [3] Quizzman Research & Engineering Team. I-Ching Vir native deployment verification and binary checksums, 2026-10-23. 2026. [URL] (Primary project evidence prepared with AI assistance. Private user questions and corpora are excluded.)