
Using the graph as a ranking signal
Instead of filtering by the graph, you can use it to boost items that are graph-neighbours of the seed. Items that are both semantically similar AND closely connected rank higher.
Pattern: boost tickets that share tags with the seed
var sharedTags = Q().StartAt(seedUID)
.Out("HasTag")
.AsUIDEnumerable()
.ToArray();
var results = await Graph.Query()
.StartAt(seedUID)
.ToSimilarity()
.AddSignal("embedding", s => s.StartAtSimilarTextAsync(bodyText, 20, ["Ticket"]))
.AddSignal("shared-tags", s => s.StartAt(sharedTags).In("HasTag").Distinct())
.Fuse(f => f.UsingMeanReciprocalRank(
("embedding", weight: 0.7),
("shared-tags", weight: 0.3)))
.ExecuteAsync(ct);
Interpreting results:
foreach (var r in results.Scores)
{
var embScore = results.Signals["embedding"][r.UID];
var graphScore = results.Signals["shared-tags"][r.UID];
}
The Signals breakdown shows each signal's contribution — useful for explaining recommendations to users and for debugging.