Skip to content

Optimize review summaries for consistency - #24854

Merged
NickM-27 merged 1 commit into
devfrom
review-summary-tweaks
Nov 2, 2026
Merged

NickM-27 merged 1 commit into
devfrom
review-summary-tweaks

Conversation

@NickM-27

@NickM-27 NickM-27 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Please read the contributing guidelines and the AI policy before submitting a PR. Every PR must be read and submitted by a person, and PRs that appear to be unreviewed AI output will be closed without review.

Proposed change

Ran through on all of the recommended models with a handful of clips with variations and found they were inconsistent. The annotated frames used different formatting and this caused issues.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code
  • Documentation Update

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to discussion with maintainers (required for any large or "planned" features):

For new features

  • There is an existing feature request or discussion with community interest for this change.
    • Link:

AI disclosure

  • No AI tools were used in this PR.
  • AI tools were used in this PR. Details below:

AI tool(s) used (e.g., Claude, Copilot, ChatGPT, Cursor):

How AI was used (e.g., code generation, code review, debugging, documentation):

Extent of AI involvement (e.g., generated entire implementation, assisted with specific functions, suggested fixes):

Human oversight: Describe what manual review, testing, and validation you performed on the AI-generated portions.

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I can explain every line of code in this PR if asked.
  • UI changes including text have used i18n keys and have been added to the en locale.
  • The code has been formatted using Ruff (ruff format frigate)

@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect Frigate's AI review-summary workflow and its local testing tool.

This PR appears safe to merge, with a non-blocking improvement to the new length guidance.

Findings

  1. P2 Sentence limits miss character caps ▶

Summary

This PR makes review descriptions more consistent:

  • Tracker notes start with what is happening in the sampled clip.
  • Review prompts ask for named subjects and concise descriptions.
  • The local review tester sends saved captions with their frames.

One non-blocking improvement remains: give models the actual character budgets, not only sentence limits.

Reviews (1) · Last reviewed commit: "Optimize review summaries for consistenc..." · Reviewed by Greptile

Comment thread frigate/genai/prompts.py
Comment on lines +29 to +31
"scene": 'Describe how the sequence begins, then the progression of events: all significant movements and actions in order. For named subjects (those with a `←` separator in "Objects in Scene"), always use their name; do not replace them with generic terms. For unnamed objects (e.g., "person", "car"), refer to them naturally with articles (e.g., "a person", "the car"). Your description should align with and support the threat level you assign. Use no more than five sentences.',
"title": "Name the primary activity across the observations, together with the location. An activity is what is being done with objects, tools, or surfaces; locomotion through the scene qualifies as the activity only when no other interaction is observed. For named subjects, always use their name. For unnamed objects, refer to them naturally with articles.",
"shortSummary": "Briefly summarize the primary activity across the observations.",
"shortSummary": "Briefly summarize the primary activity across the observations in one sentence. For named subjects, always use their name.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Sentence limits miss character caps

The new guidance limits sentences, but scene allows only 600 characters and shortSummary allows 140. Five sentences, or even one detailed sentence, can exceed those limits. Providers that enforce character limits can therefore still cut descriptions off mid-sentence. Include the character budgets in each style’s guidance and check them in the new test.

Knowledge Base Used: Classification and generative AI

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is entirely expected, sentences is an easier metric for a model to target instead of characters. A cut off sentence is non-fatal for the fields.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Sentence count is a more practical target for the models, and a cutoff in these fields is non-fatal. I’ll withdraw the character-budget suggestion.

@NickM-27
NickM-27 merged commit 47ea942 into dev Nov 2, 2026
20 checks passed
@NickM-27
NickM-27 deleted the review-summary-tweaks branch November 2, 2026 14:43
jtn0123 added a commit to jtn0123/frigate that referenced this pull request Nov 3, 2026
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.

2 participants