VectorCandidatePairSource

class VectorCandidatePairSource(repository: PropositionRepository, similarityThreshold: Double = 0.7, topK: Int = 10) : CandidatePairSource

Proposes candidate pairs from the repository's own vector clustering, the same recall path com.embabel.dice.projection.memory.DuplicateCollectorStrategy uses today.

Runs PropositionRepository.findClusters and turns every anchor/member edge into a CandidatePair carrying the cluster's cosine as CandidatePair.proposalScore, so a VectorSignalScorer downstream can reuse it instead of re-embedding. Only pairs where both sides are in the runner's candidate snapshot are proposed — a cluster member outside that snapshot is silently dropped, mirroring the byId filter in DuplicateCollectorStrategy.

Constructors

Link copied to clipboard
constructor(repository: PropositionRepository, similarityThreshold: Double = 0.7, topK: Int = 10)

Functions

Link copied to clipboard
open override fun propose(candidates: List<Proposition>, contextId: <Error class: unknown class>): List<CandidatePair>