Extend CueTarget interface for parallel multi-source evaluation. [chromium/src : main]

1 view
Skip to first unread message

Benedict Wong (Gerrit)

unread,
Jun 9, 2026, 3:30:51 PM (5 days ago) Jun 9
to Mirko Bonadei, Jerome Jiang, (Julie)Jeongeun Kim, Ian Wells, Sophie Chang, Chromium LUCI CQ, Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, cblume...@chromium.org, storage...@chromium.org, mar...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, devtools...@chromium.org, penghuan...@chromium.org, net-r...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, anastas...@google.com, josiah...@chromium.org, abigailbk...@google.com, ios-r...@chromium.org, dtseng...@chromium.org, yuzo+...@chromium.org, feature-v...@chromium.org, kyungjunle...@google.com, katie...@chromium.org, dtseng+c...@chromium.org, francisjp...@google.com, nektar...@chromium.org, chrome-intelligence-te...@google.com, asvitkine...@chromium.org, chrome-intell...@chromium.org
Attention needed from Ian Wells and Sophie Chang

Benedict Wong added 14 comments

Patchset-level comments
File-level comment, Patchset 24 (Latest):
Benedict Wong . resolved

Ok, i think i finally worked through all the butchering my bad workflow did. Should be cleaned up now.

File chrome/browser/contextual_cueing/cue_target.h
Line 73, Patchset 23:// A feature that can show contextual cues to the user. Register one CueTarget
// per distinct trigger mechanism (e.g., kGlicSearch vs kGlicDigest) to enable
// independent UCB scoring and backoff tracking per trigger type.
Benedict Wong . unresolved

@sophiechang For discussion - After going through this and the subsequent CLs to fix the workflow, I'm inclined to say we split each trigger mechanism into it's own cue target (so education, shopping, etc), so they get ranked by UCB independently. Thoughts?

Line 85, Patchset 13: virtual void GenerateContent(content::WebContents* web_contents,
Sophie Chang . resolved

it might make sense here to also provide the intrusiveness of what they want to show and a feature can either deny if its not loud enough or call their callback? thoughts?

Benedict Wong

Yeah, got flipped; intrusiveness is passed in.

Line 85, Patchset 13: virtual void GenerateContent(content::WebContents* web_contents,
Sophie Chang . resolved

it might make sense here to also provide the intrusiveness of what they want to show and a feature can either deny if its not loud enough or call their callback? thoughts?

Benedict Wong

Rolled into the eligibility check; was previously inverted/flipped - that's the gating call on whether a cue target should trigger a cue or not.

Line 82, Patchset 13: // Generates the actual cue content.
Sophie Chang . resolved

should be specific about when this is called. ie. this is only called if we decided to show this target's cue right?

Benedict Wong

Done, added documentation on lifecycle.

Line 82, Patchset 13: // Generates the actual cue content.
Sophie Chang . resolved

should be specific about when this is called. ie. this is only called if we decided to show this target's cue right?

Benedict Wong

Done

Line 80, Patchset 13: EligibilityCallback callback);
Sophie Chang . resolved

just "= 0;" so the teams actually implement - same with below

Benedict Wong

Done

Line 80, Patchset 13: EligibilityCallback callback);
Sophie Chang . resolved

just "= 0;" so the teams actually implement - same with below

Benedict Wong

Done

Line 76, Patchset 13: // Checks page eligibility. This must be a cheap, local check.
Sophie Chang . resolved

we should probably be specific for when this gets called - is it at page load time? other?

Benedict Wong

Done.

Line 39, Patchset 13: float confidence = 0.0f; // Source-specific confidence score [0, 1]
Sophie Chang . resolved

hmm i think this is probably just going to end up as a bool most of the time? should we just do that?

Benedict Wong

Done

Line 39, Patchset 13: float confidence = 0.0f; // Source-specific confidence score [0, 1]
Sophie Chang . resolved

hmm i think this is probably just going to end up as a bool most of the time? should we just do that?

Benedict Wong

Done

Line 37, Patchset 13: CueTargetType source = CueTargetType::kGlic;
Sophie Chang . resolved

can we remove source from here? we can probably just keep track of it internally

im largely thinking of this as the consumer public interface

Benedict Wong

Done

Line 37, Patchset 13: CueTargetType source = CueTargetType::kGlic;
Sophie Chang . resolved

can we remove source from here? we can probably just keep track of it internally

im largely thinking of this as the consumer public interface

Benedict Wong

Done

Line 30, Patchset 13:enum class CueIntrusiveness {
Sophie Chang . unresolved

do we want each team to specify this themselves? i feel like as triggering framework - we should help them prioritize

Benedict Wong

Logic was flipped previously; had a rogue agent workflow that managed to flip my workflow.

But this is framework defined, and passed into the eligibility checks, so that each cue target has the ability to decide whether it wants to support quiet cues independently (static cues or locally generated cues might allow us to do quiet cues, whereas server generated ones might be too costly).

Is this what you were thinking?

Open in Gerrit

Related details

Attention is currently required from:
  • Ian Wells
  • Sophie Chang
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I299bbab69a3649b70e6a41fc0f649751ef1a8e53
Gerrit-Change-Number: 7904128
Gerrit-PatchSet: 24
Gerrit-Owner: Benedict Wong <benedi...@google.com>
Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Ian Wells <iwe...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jun 2026 19:30:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sophie Chang <sophi...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sophie Chang (Gerrit)

unread,
Jun 10, 2026, 11:10:07 PM (3 days ago) Jun 10
to Benedict Wong, Ian Wells, devtools...@chromium.org, dewitt...@chromium.org
Attention needed from Benedict Wong and Ian Wells

Sophie Chang added 9 comments

File chrome/browser/contextual_cueing/cue_target.h
Line 127, Patchset 32 (Latest): // TODO(benedictwong): Remove from the public interface once
Sophie Chang . unresolved

same here with bug

Line 121, Patchset 32 (Latest): virtual void GenerateContent(content::WebContents* web_contents,
Sophie Chang . unresolved

ok so plan here is that we always do ranking client side with no server side ranking? i think thats fine but just wanted to make sure you didnt want to consider that alt at all (and may make it annoying to consolidate llm calls)

to be less vague: i think we should leave that option open and so this might not necessarily be the right method signature to do so.

Line 81, Patchset 32 (Latest): // RunLegacySingleSourcePath() is fully migrated. Targets should perform
Sophie Chang . unresolved

though this method does not exist

Line 80, Patchset 32 (Latest): // TODO(benedictwong): Remove from the public interface once
Sophie Chang . unresolved

bug please

Line 23, Patchset 32 (Latest):}
Sophie Chang . unresolved

`// namespace page_content_annotations`

Line 73, Patchset 23:// A feature that can show contextual cues to the user. Register one CueTarget
// per distinct trigger mechanism (e.g., kGlicSearch vs kGlicDigest) to enable
// independent UCB scoring and backoff tracking per trigger type.
Benedict Wong . unresolved

@sophiechang For discussion - After going through this and the subsequent CLs to fix the workflow, I'm inclined to say we split each trigger mechanism into it's own cue target (so education, shopping, etc), so they get ranked by UCB independently. Thoughts?

Sophie Chang

I don't love it as mentioned on chat. can we do it later if we see that there is actually a need

Line 30, Patchset 13:enum class CueIntrusiveness {
Sophie Chang . resolved

do we want each team to specify this themselves? i feel like as triggering framework - we should help them prioritize

Benedict Wong

Logic was flipped previously; had a rogue agent workflow that managed to flip my workflow.

But this is framework defined, and passed into the eligibility checks, so that each cue target has the ability to decide whether it wants to support quiet cues independently (static cues or locally generated cues might allow us to do quiet cues, whereas server generated ones might be too costly).

Is this what you were thinking?

Sophie Chang

i see - hmm fine for now.

File chrome/browser/glic/suggestions/glic_cue_target.h
Line 21, Patchset 32 (Latest):}
Sophie Chang . unresolved

`// namespace page_content_annotations`

Line 17, Patchset 32 (Latest):}
Sophie Chang . unresolved

`// namespace content`

Open in Gerrit

Related details

Attention is currently required from:
  • Benedict Wong
  • Ian Wells
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I299bbab69a3649b70e6a41fc0f649751ef1a8e53
Gerrit-Change-Number: 7904128
Gerrit-PatchSet: 32
Gerrit-Owner: Benedict Wong <benedi...@google.com>
Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Benedict Wong <benedi...@google.com>
Gerrit-Attention: Ian Wells <iwe...@chromium.org>
Gerrit-Comment-Date: Thu, 11 Jun 2026 03:09:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Benedict Wong <benedi...@google.com>
Comment-In-Reply-To: Sophie Chang <sophi...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Benedict Wong (Gerrit)

unread,
Jun 12, 2026, 4:00:27 PM (2 days ago) Jun 12
to Chromium Metrics Reviews, chromium...@chromium.org, Ian Wells, Sophie Chang, asvitkine...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, dewitt...@chromium.org
Attention needed from Ian Wells and Sophie Chang

Benedict Wong added 8 comments

File chrome/browser/contextual_cueing/cue_target.h
Line 127, Patchset 32: // TODO(benedictwong): Remove from the public interface once
Sophie Chang . resolved

same here with bug

Benedict Wong

Done

Line 121, Patchset 32: virtual void GenerateContent(content::WebContents* web_contents,
Sophie Chang . resolved

ok so plan here is that we always do ranking client side with no server side ranking? i think thats fine but just wanted to make sure you didnt want to consider that alt at all (and may make it annoying to consolidate llm calls)

to be less vague: i think we should leave that option open and so this might not necessarily be the right method signature to do so.

Benedict Wong

Ok, discussed offline - shifting to returning a optional generateCallback in the eligibility check. If present, the framework will preferentially use that. If absent, the framework will fallback to using MES, with the list of prioritized cue targets sent to MES.

This gives us enough flexibility and granularity to support separate cue targets / UCB scoring targets for individual verticals, OR to keep them combined if necessary.

For the MES request, we'll send ALL eligible, server-generated cue targets.

Line 81, Patchset 32: // RunLegacySingleSourcePath() is fully migrated. Targets should perform
Sophie Chang . resolved

though this method does not exist

Benedict Wong

Done

Line 80, Patchset 32: // TODO(benedictwong): Remove from the public interface once
Sophie Chang . resolved

bug please

Benedict Wong

Done

Line 23, Patchset 32:}
Sophie Chang . resolved

`// namespace page_content_annotations`

Benedict Wong

Done

Line 73, Patchset 23:// A feature that can show contextual cues to the user. Register one CueTarget
// per distinct trigger mechanism (e.g., kGlicSearch vs kGlicDigest) to enable
// independent UCB scoring and backoff tracking per trigger type.
Benedict Wong . resolved

@sophiechang For discussion - After going through this and the subsequent CLs to fix the workflow, I'm inclined to say we split each trigger mechanism into it's own cue target (so education, shopping, etc), so they get ranked by UCB independently. Thoughts?

Sophie Chang

I don't love it as mentioned on chat. can we do it later if we see that there is actually a need

Benedict Wong

Acknowledged

File chrome/browser/glic/suggestions/glic_cue_target.h
Line 21, Patchset 32:}
Sophie Chang . resolved

`// namespace page_content_annotations`

Benedict Wong

Done

Line 17, Patchset 32:}
Sophie Chang . resolved

`// namespace content`

Benedict Wong

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Ian Wells
  • Sophie Chang
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I299bbab69a3649b70e6a41fc0f649751ef1a8e53
    Gerrit-Change-Number: 7904128
    Gerrit-PatchSet: 38
    Gerrit-Owner: Benedict Wong <benedi...@google.com>
    Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
    Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
    Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Ian Wells <iwe...@chromium.org>
    Gerrit-Comment-Date: Fri, 12 Jun 2026 20:00:12 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Sophie Chang (Gerrit)

    unread,
    Jun 12, 2026, 7:54:51 PM (2 days ago) Jun 12
    to Benedict Wong, Chromium Metrics Reviews, chromium...@chromium.org, Ian Wells, asvitkine...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, dewitt...@chromium.org
    Attention needed from Benedict Wong and Ian Wells

    Sophie Chang added 5 comments

    File chrome/browser/contextual_cueing/cue_target.h
    Line 113, Patchset 38 (Latest): virtual void CheckEligibility(content::WebContents* web_contents,
    Sophie Chang . unresolved

    should we just pass the weak ptr here then? instead of raw ptr

    Line 105, Patchset 38 (Latest): // will request content from MES.
    Sophie Chang . unresolved

    instead of MES -> lets just say that it will be generated centrally.

    Line 103, Patchset 38 (Latest): // will invoke it to produce content if this target wins UCB
    // ranking. If null (and eligible is true), the controller
    Sophie Chang . unresolved

    instead of "wins UCB ranking" lets call this, framework decided to show the cue for this target

    File chrome/browser/contextual_cueing/test_cue_target.h
    Line 15, Patchset 38 (Latest): std::optional<CueIntrusiveness> eligible_intrusiveness = std::nullopt;
    Sophie Chang . unresolved

    dont need to define the `std::nullopt` here and next one

    File chrome/browser/glic/suggestions/glic_cue_target.cc
    Line 74, Patchset 38 (Latest):void GlicCueTarget::CheckEligibility(
    Sophie Chang . unresolved

    im a little worried about reentrantness here but you dont have the calling code yet so cant judge how error prone it is.

    can we add to the todo that we might want to post this onto the task runner for the main thread

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benedict Wong
    • Ian Wells
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I299bbab69a3649b70e6a41fc0f649751ef1a8e53
      Gerrit-Change-Number: 7904128
      Gerrit-PatchSet: 38
      Gerrit-Owner: Benedict Wong <benedi...@google.com>
      Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
      Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
      Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Benedict Wong <benedi...@google.com>
      Gerrit-Attention: Ian Wells <iwe...@chromium.org>
      Gerrit-Comment-Date: Fri, 12 Jun 2026 23:54:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Benedict Wong (Gerrit)

      unread,
      Jun 12, 2026, 9:52:36 PM (2 days ago) Jun 12
      to Chromium Metrics Reviews, chromium...@chromium.org, Ian Wells, Sophie Chang, asvitkine...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, dewitt...@chromium.org
      Attention needed from Ian Wells and Sophie Chang

      Benedict Wong added 5 comments

      File chrome/browser/contextual_cueing/cue_target.h
      Line 113, Patchset 38: virtual void CheckEligibility(content::WebContents* web_contents,
      Sophie Chang . resolved

      should we just pass the weak ptr here then? instead of raw ptr

      Benedict Wong

      One day i'll understand the difference between C and C++

      Line 105, Patchset 38: // will request content from MES.
      Sophie Chang . resolved

      instead of MES -> lets just say that it will be generated centrally.

      Benedict Wong

      Done

      Line 103, Patchset 38: // will invoke it to produce content if this target wins UCB

      // ranking. If null (and eligible is true), the controller
      Sophie Chang . resolved

      instead of "wins UCB ranking" lets call this, framework decided to show the cue for this target

      Benedict Wong

      Done

      File chrome/browser/contextual_cueing/test_cue_target.h
      Line 15, Patchset 38: std::optional<CueIntrusiveness> eligible_intrusiveness = std::nullopt;
      Sophie Chang . resolved

      dont need to define the `std::nullopt` here and next one

      Benedict Wong

      Done

      File chrome/browser/glic/suggestions/glic_cue_target.cc
      Line 74, Patchset 38:void GlicCueTarget::CheckEligibility(
      Sophie Chang . resolved

      im a little worried about reentrantness here but you dont have the calling code yet so cant judge how error prone it is.

      can we add to the todo that we might want to post this onto the task runner for the main thread

      Benedict Wong

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Wells
      • Sophie Chang
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I299bbab69a3649b70e6a41fc0f649751ef1a8e53
        Gerrit-Change-Number: 7904128
        Gerrit-PatchSet: 39
        Gerrit-Owner: Benedict Wong <benedi...@google.com>
        Gerrit-Reviewer: Benedict Wong <benedi...@google.com>
        Gerrit-Reviewer: Ian Wells <iwe...@chromium.org>
        Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Sophie Chang <sophi...@chromium.org>
        Gerrit-Attention: Ian Wells <iwe...@chromium.org>
        Gerrit-Comment-Date: Sat, 13 Jun 2026 01:52:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Sophie Chang <sophi...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages