Function: scoreAndRecallLessons()
ts
function scoreAndRecallLessons(
candidates,
scoring,
context?
): readonly LessonRecord[];Defined in: runtime/lessons/lesson-scoring.ts:144
Scores, filters, and ranks candidate lessons for Turn-0 recall (SPEC.md §3.4.3).
Evaluates computeLessonScore for each candidate, retains lessons with score >= recall.minScore, sorts descending by score (tie-breaking by id), and slices to recall.maxItems.
Parameters
| Parameter | Type | Description |
|---|---|---|
candidates | readonly LessonRecord[] | Candidate lessons returned by LessonStore.queryCandidates(). |
scoring | LessonScoringConfig | Lesson scoring and recall thresholds. |
context? | | readonly string[] | LessonScoreContextParams | Active partitions and partition epoch map. |
Returns
readonly LessonRecord[]
Frozen top-$N$ recalled lessons ordered by descending score.