Skip to main content

Module link

Module link 

Source
Expand description

Stage 4: LINK — infer typed relationships between findings.

Two passes:

  1. Deterministic (deterministic_links): O(n^2) entity-overlap scan, no API calls.
  2. LLM (infer_links): existing LLM-based inference on top, with dedup/merge.

§Integration

Add to the compile pipeline in main.rs, BEFORE infer_links:

let det_count = link::deterministic_links(&mut all_bundles);
println!("  -> {det_count} deterministic links (entity overlap)");
let llm_count = link::infer_links(&client, &config, &mut all_bundles).await.unwrap_or(0);
println!("  -> {llm_count} LLM links inferred");

Functions§

deterministic_links
Run a fast, deterministic linking pass based on shared entities between findings. Returns the number of links created.