Skip to content

perf(insights): rank investigation candidates with Jev - #849

Draft
izadoesdev wants to merge 3 commits into
stagingfrom
codex/insights-jev-selection
Draft

izadoesdev wants to merge 3 commits into
stagingfrom
codex/insights-jev-selection

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Sep 19, 2026

Copy link
Copy Markdown
Member

Insights candidate selection uses one bounded Jev evaluation to rank or exclude optional work, then hands ordered signal keys to the native planner. Investigation questions and measurement constraints pass through unchanged. Due rechecks, critical reliability, correlation grouping and run limits remain code-owned. Strict response validation, probability-rounding bounds, request limits, deadline handling and usage accounting preserve the existing fallback.

This remains a research draft. The acceptance bar is better useful findings and faster completed investigations. Lower selector cost alone does not meet it.

Fresh quality and latency comparison

Three matched synthetic cases ran the original Luna selector plus investigator against Jev plus the investigator with the original question unchanged. Both selectors retained the same target in these cases. All six investigations and both failures are retained; tools used static synthetic data. Times below include selection and the target investigation, but exclude other selected targets and real tool/network I/O.

Case Luna selection + target Jev selection + target Quality result
Goal repair 14.58 s 14.68 s Same executable repair; no quality improvement
Activation 12.55 s 9.42 s Both completed aggregate finding, but missed the available source-level comparison
Revenue 19.60 s to failure 28.76 s to failure Neither produced an accepted result

These results do not demonstrate a better-and-faster investigation system. The earlier fixed-objective comparison is historical: the generic appendix is now removed, along with its effect on subject-context recall. The original native agent and its evidence/publication checks are unchanged.

Earlier frozen selection holdout checks passed 12/12 for both models, with median selection latency 549 ms versus 3,481.5 ms. Those checks were too coarse to prove equivalent business findings: one calibration case counted both portfolios as useful while Luna selected delivery and Jev selected generic traffic alongside the protected error. Jev also retained one extra explained investigation. Do not use selector pass counts or token savings as a product-quality claim.

The real-data native-agent comparison remains unrun pending explicit approval for the external model payload. Nothing has been deployed or published to customer Insights.

Validation

  • bun run lint
  • bun run check-types — all 33 tasks passed
  • bun run test --filter=@databuddy/insights — 687 passed, 6 optional live cases skipped
  • Required pre-push bun run test — all 29 tasks passed
  • Changed test types checked separately, including opt-in live tests
  • Independent review; exact original-objective and absent-objective preservation through the native planner and frozen-plan JSON round trip
  • Existing coverage for protected work, correlation grouping, invalid/missing responses, rounding, deadlines, accounting and complete request bounds

Scope: candidate selection, its existing evaluation harness, and usage pricing. No schema, UI, credentials or second agent loop. No unmerged dependencies. Known overlaps: #842 also pins Gateway 4.0.85 and touches bun.lock; #751 touches generation/business-context documentation. AI-assisted, maintainer-directed implementation.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9164a35d-2176-424c-ba67-a91b62446162

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dashboard Ready Ready Preview Sep 20, 2026 8:14am UTC
databuddy-status Ready Ready Preview Sep 20, 2026 8:14am UTC
documentation Ready Ready Preview Sep 20, 2026 8:14am UTC

@unkey-deploy

unkey-deploy Bot commented Sep 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Sep 20, 2026 8:13am

@socket-security

socket-security Bot commented Sep 19, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​ai-sdk/​gateway@​4.0.85711008798100

View full report

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant