Cross-domain linking
A connector declares the relations inside its own source. Cross-domain linking is what connects those islands into one graph: you expose an entity so other sources can reference it, and Virgo recognizes those references during ingestion.
Exposure policies
An exposure policy is a class decorated with @expose_domain, extending
ExposurePolicy. It returns discovery hints: patterns that recognize references
to the entity in other sources' text.
Private preview
The Python SDK is in private preview, so APIs may still change. Email sales@virgo.fyi for early access.
@expose_domain(entity="pull_request")
class ExposePullRequest(ExposurePolicy):
def get_discovery_hints(self):
return {
"number": [
DiscoveryHint(
strategy=RegexDiscoveryStrategy(r"(?i)(?:pr)?#(\d+)"),
hint_text="pr#123, pull request #123",
),
]
}When a Slack message mentions pr#123, Virgo matches the hint and links it to
the GitHub pull_request, so a discussion in one source connects to the work in
another. Register exposure policies on your connector's exposure_policies list.
Why it matters
Cross-domain links are what make retrieval reasoned rather than siloed. A context query about a feature can gather the pull request, the ticket, the discussion, and the doc, because ingestion already connected them.
Related
- Entity relationships: edges within a source.
- Entities: the nodes being linked.