Skip to content

feat(ai): introduce retrieval domain models and validation - #869

Open
aotenjou wants to merge 3 commits into
apache:masterfrom
aotenjou:OSPP-pr1
Open

feat(ai): introduce retrieval domain models and validation#869
aotenjou wants to merge 3 commits into
apache:masterfrom
aotenjou:OSPP-pr1

Conversation

@aotenjou

@aotenjou aotenjou commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduce the foundational retrieval domain model layer for the AI module.

This PR defines the typed data structures required by the retrieval pipeline, including source documents, text chunks, graph references, evidence, and version metadata. It also adds JSON serialization/deserialization and centralized model validation.

#864

Changes

  • Add retrieval document models:
    • SourceDocument
    • SourceRef
    • TextChunk
  • Add retrieval graph models:
    • EntityRef
    • GraphVertexRef
    • GraphEdgeRef
    • GraphPathRef
  • Add retrieval evidence models:
    • Evidence
    • EvidenceKind
    • ChannelScore
  • Add retrieval version models:
    • GraphVersion
    • IndexVersion
  • Add JSON codec support through RetrievalModelJson
  • Add centralized validation and RetrievalModelValidationException
  • Use field-based equality semantics without introducing stable IDs
  • Add unit tests and JSON fixtures covering model construction, equality, validation, and serialization behavior

How was this PR tested?

  • Tests have Added for the changes
  • Production environment verified

@aotenjou

aotenjou commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@yaozhongq @kitalkuyo-gita

@yaozhongq yaozhongq self-assigned this Sep 7, 2026
@yaozhongq
yaozhongq self-requested a review September 7, 2026 02:27
@yaozhongq yaozhongq assigned aotenjou and unassigned yaozhongq Sep 7, 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.

2 participants