Part of the WebMEM Protocol
Location: /specification/sdt/yaml-in-html/related-fragments/
Last Updated: 2025-07-31
What is Cross-Fragment Indexing?
Cross-fragment indexing allows any Semantic Data Template (SDT) to declare its semantic relationships to other fragments using the related_fragments field in its YAML header. This mechanism enables agents, validators, and AI retrievers to traverse, cite, and cluster knowledge fragments across datasets and digest scopes with precision.
It transforms fragments from standalone memory tiles into a graph-aware retrieval layer—reinforcing co-occurrence, exposing multi-view representations, and enabling memory stitching at the entity level.
related_fragments Field Structure
related_fragments:
- fragment: fragment-h5521-290-0-performance
digest: 2025-cms-part-c-and-d-performance
entity: plan:H5521-290-0
relationship: sibling
Field Definitions
| Key | Required? | Description |
|---|---|---|
fragment |
✅ | ID or anchor of the related fragment |
digest |
Optional | Digest the related fragment belongs to |
entity |
Optional | Entity if different from current fragment |
relationship |
Optional | Semantic relationship (see below) |
Accepted relationship Values
| Value | Description |
|---|---|
sibling |
Describes a parallel fragment for the same entity (e.g. landscape + pbp) |
derived |
Fragment is downstream from this one (e.g. DerivedStats from DataFragment) |
extension |
Fragment adds supplementary data (e.g. FAQ extends glossary) |
correction |
Fragment corrects or overrides a prior claim |
reflection |
Fragment logs retrieval or model behavior (e.g. ReflectionRecord) |
Use Cases by Fragment Class
- DataFragment → Links to PBP, Performance, FAQs
- DerivedStatsFragment → Links to source DataFragments
- FAQFragment → Links to term and plan fragments
- CorrectionFragment → Targets corrected field/fragment
- IndexFragment → Aggregates multiple child fragments
Validation + Export
- Validators will accept
related_fragmentson any fragment class - Schemas will require at least
fragment, and optionally validaterelationship - SDP export engines may use this to:
- Build TrustGraphs
- Resolve co-citation clusters
- Generate memory bundles by entity or topic
Best Practices
- Always use
fragment-hxxxxx-yyyy-zor similar canonical IDs - Use
digestif the linked fragment exists in a different memory set - Use
relationshipto reinforce agent retrievability logic - Group related fragments in export bundles for entity-level memory conditioning
Example
data-sdt-class: DataFragment
entity: plan:H5521-290-0
digest: 2025-cms-ma-mapd-plan
related_fragments:
- fragment: fragment-h5521-290-0-pbp
digest: 2025-cms-ma-mapd-plan
relationship: sibling
- fragment: fragment-h5521-290-0-performance
digest: 2025-cms-part-c-and-d-performance
relationship: sibling
- fragment: fragment-h5521-290-0-star-summary
digest: 2025-star-ratings-derived
relationship: derived