Types
GraftByRelevanceOptions
TypeScript contract for GraftByRelevanceOptions.
What it does
TypeScript contract for GraftByRelevanceOptions.
Use GraftByRelevanceOptions to keep application code aligned with the values MemoGrafter accepts or returns at this boundary. It is a TypeScript-only contract and adds no runtime behavior.
Definition
TypeScript
interface GraftByRelevanceOptions {
topK?: number;
minSimilarity?: number;
hopDepth?: number;
expansionStrategy?: "none" | "graph";
sessionIds?: string[];
}Fields and behavior
topK? (number) — Maximum number of semantic seed topics.minSimilarity? (number) — Minimum semantic similarity for a seed.hopDepth? (number) — Number of graph-neighbour expansion hops.expansionStrategy? ("none" | "graph", default "graph") — Keep only seeds or expand through topic edges.sessionIds? (string[]) — Restrict eligible source sessions where the calling API supports cross-session selection.Result
A compile-time-only TypeScript contract with no runtime value.
Example
example.ts
import type { GraftByRelevanceOptions } from "memo-grafter";
function useValue(value: GraftByRelevanceOptions) {
return value;
}Important behavior
Use
import type when the contract is not needed at runtime.