Skip to content

Pathfinder: synthetic snippet scores make the heuristic-confidence fallback near-constant HIGH #122

Description

@jerelvelarde

Spun out of the #112 review (non-blocking).

parseSnippets synthesizes score: Math.max(0.5, 1 - i * 0.05), so results[0].score is always 1.0. ConfidenceScorer.heuristicScore derives from topScore * 0.4 + avgScore * 0.4 + min(count*0.03, 0.2); with the default 8 server-filtered results this lands ~0.93 → HIGH essentially whenever any results return, regardless of real match quality.

Impact is bounded — the primary Claude scorer (reads generated text + snippet content) is unaffected; this only drives the degraded/fallback heuristic path and any pre-filter. But it's a behavior change from the old JSON path, where genuine similarity (0.3–0.92) produced graduated heuristics. The tradeoff was made consciously (results are already server-filtered by min_score), so this is a "revisit if it matters" item, not a bug.

Options: (a) if copilotkit-docs-mcp exposes a numeric relevance anywhere in the payload, thread it through instead of the synthetic rank; (b) otherwise, damp the heuristic's reliance on topScore when scores are synthetic, or flag synthetic-scored results so heuristicScore can treat them differently.

Files: packages/outpost/ai/src/pathfinder.ts (parseSnippets), packages/outpost/ai/src/confidence.ts (heuristicScore).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: integrationsSlack, Teams, Linear, GitHub App, Postmark, Pathfinder, HubSpotenhancementNew feature or requestpriority: lowNon-blocking; nice-to-have / slow-burn follow-uproadmapTracked on the Outpost roadmaproadmap: laterRoadmap horizon: backlog / cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions