- Ya
- 15 Julai 2026, 18:07 UTC
- Mwandishi
- Kamo
- Ahadi ya
- 45e5a00
The trainer now refines a loan over multiple passes instead of one-and-done: - TrainingDocStore is a PERSISTENT, deterministically-keyed cache (key = hash of org|loan|docId). A document is downloaded from MeridianLink ONCE and reused from MinIO on every later pass — the expensive, rate-limited, vendor-dependent download never repeats. - trainLoan runs one pass: cached-once fetch → extract → diff each mapped field vs the SoR value, UPSERTing one label per loan-field. - A loan is retired when SOLVED (a pass matched every mapped field) or EXHAUSTED (hit training.max-passes-per-loan, default 5); on retire its cached docs are purged so closed-loan PII is cached only while we're still working the loan, never archived.