Skip to content

Ground Oghma retrieval in catalog entities - #695

Closed
RANGROO wants to merge 2 commits into
unstablefrom
codex/oghma-grounded-retrieval
Closed

Ground Oghma retrieval in catalog entities#695
RANGROO wants to merge 2 commits into
unstablefrom
codex/oghma-grounded-retrieval

Conversation

@RANGROO

@RANGROO RANGROO commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • extract Oghma topics locally from canonical names and aliases before lore retrieval
  • tolerate guarded STT spelling/phonetic errors while rejecting ambiguous neighbors, speaker labels, and wrong-sense homonyms
  • keep repeated central topics and multi-topic mention order, including ordinary creature and object mentions
  • fetch the selected canonical article exactly; use MiniMe/custom extraction only as a constrained fallback when no local topic is grounded
  • add related-concept tags as a last-resort, exact-only contextual fallback after canonical/alias extraction abstains
  • allow a unique multiword tag to select its sole article; require two shared tags plus explicit knowledge intent when a tag belongs to two or three articles
  • reject one-word tags, phrases owned by more than three articles, fuzzy/corrupted tags, and tag-only speaker labels
  • prefer longer overlapping tag phrases so common nested phrases can block unsafe matches without becoming candidates
  • expose a test-only fallback toggle through the existing extractor function's optional argument; production calls keep tag fallback enabled

Validation

  • unchanged frozen conversational/STT suite: 500/500
    • 100% required recall, relevant precision, and primary ordering
    • zero forbidden retrievals and zero over-retrieval
    • p50 13.97 ms, p95 26.14 ms, p99 33.46 ms end-to-end
    • retrieval-only p50 0.25 ms, p95 0.40 ms, p99 0.53 ms
  • catalog-derived tag-policy A/B on identical 500 fixtures:
    • previous product library: 260/500; all 240 safe tag-positive cases absent
    • tag-aware product library: 500/500
    • p50 10.26 ms, p95 16.95 ms, p99 19.07 ms (previous p95 16.91 ms)
    • 160 unique multiword positives, 80 corroborated shared-tag positives, and 260 ambiguity/corruption/speaker-label/canonical-precedence guards
  • 7/7 standalone tag-policy probes
  • temporary candidate catalog focused retrieval: 41/41; p95 13.96 ms
  • php -l lib/oghma_retrieval.php
  • git diff --check
  • final deployed runtime library SHA-256 matched the committed worktree and passed the tag-policy suite 500/500 (p95 16.88 ms)

Limits

  • transcript-level validation only; microphone/upstream STT was intentionally not tested
  • no live MiniMe calls were needed by these deterministic suites
  • not tested in Skyrim
  • the external harness and generated tag-review tooling remain outside this repository

@RANGROO

RANGROO commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by consolidated draft #701, which contains this work plus the completed Oghma catalog, retrieval, knowledge-class, biography, parity, and UI changes. Please review the combined draft there.

@RANGROO RANGROO closed this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant