Agentic Audiences RTD Module: initial release#14626
Conversation
|
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
Tread carefully! This PR adds 1 linter warning (possibly disabled through directives):
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01b523c7e3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ## References | ||
|
|
||
| - [IABTechLab Agentic Audiences](https://github.com/IABTechLab/agentic-audiences) | ||
| - [Agentic Audiences in OpenRTB](https://github.com/IABTechLab/agentic-audiences) (Segment extension proposal) |
There was a problem hiding this comment.
This does not appear to be the correct reference
There was a problem hiding this comment.
Looks like the correct place is actually
| "model": "sbert-mini-ctx-001", | ||
| "dimension": 3, | ||
| "type": [1, 2] | ||
| } |
There was a problem hiding this comment.
A bunch of required fields are missing
| const REAL_TIME_MODULE = 'realTimeData'; | ||
| const MODULE_NAME = 'agenticAudience'; | ||
|
|
||
| export const DEFAULT_PROVIDERS = { |
There was a problem hiding this comment.
Please remove references to specific vendors in the code and just move this into the documentation so the publisher chooses it with config
|
|
||
| This RTD module injects Agentic Audiences (vector-based) signals into the OpenRTB bid request. Agentic Audiences is an open standard by [IABTechLab](https://github.com/IABTechLab/agentic-audiences) for exchanging semantic embeddings—identity, contextual, and reinforcement signals—in a privacy-preserving, interoperable format. | ||
|
|
||
| The module reads agentic audience data from browser storage (localStorage or cookie) and adds it to `user.data` as segment extensions for downstream bidders. |
There was a problem hiding this comment.
This generally feels unnecessary, is this intended as an example? Liveramp and optable are both rather capable of maintaining their own modules. This would allow them to communicate with their endpoints rather than relying on data being in storage, which seems like a bad place for it given the alternatives
| user: { | ||
| data: [ | ||
| { | ||
| name: 'live_ramp', |
There was a problem hiding this comment.
Why are you breaking up liveramps name
| data: [ | ||
| { | ||
| name: 'live_ramp', | ||
| segment: [ |
There was a problem hiding this comment.
Again this looks rather incomplete and is not in the segment object spec
| gulp build --modules="rtdModule,agenticAudienceAdapter,..." | ||
| ``` | ||
|
|
||
| > Note that the global RTD module, `rtdModule`, is a prerequisite. |
There was a problem hiding this comment.
You need to commit to submodules.json in that case
| name: 'agenticAudience', | ||
| waitForIt: true, | ||
| params: { | ||
| providers: { |
There was a problem hiding this comment.
Please define types for this entire interface
There was a problem hiding this comment.
hi i added a proper type table below. let me know if that's what you meant
| | dimension | number | Vector dimension | | ||
| | type | number[] | Embedding type(s): identity, contextual, reinforcement | | ||
|
|
||
| These fields align with the [Agentic Audiences OpenRTB Segment extension](https://github.com/IABTechLab/agentic-audiences). |
There was a problem hiding this comment.
This extension does not appear to be at this link and youre not using extension fields
|
Generally what's your goal here? Optable and liveramp both already have modules they could pr to inject their embeddings. It's unclear what utility this has |
|
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
|
|
@patmmccann thanks for the review comments. just realized that i actually have to get this: InteractiveAdvertisingBureau/openrtb#210 merged before even tackling this. let me get that PR merged first before circling back to this PR. i will also ask liveramp and internally if we can just ask vendors to update their own prebid modules. |
Great! We're really looking forward to transacting on this, thanks for pushing it forward |
|
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
|
1 similar comment
|
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
|
fae6daf to
21ebd4d
Compare
|
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
|
1 similar comment
|
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
|
Coverage Report for CI Build 24425438433Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.001%) to 96.343%Details
Uncovered Changes
Coverage Regressions3 previously-covered lines in 2 files lost coverage.
Coverage Stats💛 - Coveralls |
|
@patmmccann we discussed with liveramp and internally and the main idea here is to have one universal module for agentic audiences. this is the same approach we took for PAIR btw. but basically providers don't have to go through the whole PR->merge process and simply document their configuration for this module. hope that explanation makes sense and let me know if i missed anything with the PR. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21ebd4dfc0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| function init(config, userConsent) { | ||
| const providers = config?.params?.providers; | ||
| if (!providers || typeof providers !== 'object' || Object.keys(providers).length === 0) { |
There was a problem hiding this comment.
Reject array-valued providers configs
The init guard treats any object as valid, but arrays also satisfy typeof providers === 'object'. A misconfigured providers array will pass initialization and later emit numeric provider names ("0", "1") in user.data[].name, producing unexpected OpenRTB payloads instead of failing fast. Restrict this check to plain objects (and not arrays).
Useful? React with 👍 / 👎.
| for (let i = 0; i < providerKeys.length; i++) { | ||
| const provider = providerKeys[i]; | ||
| const providerParams = providers[provider]; | ||
| const storageKey = providerParams && providerParams.storageKey; |
There was a problem hiding this comment.
please type your public interface
| * @param {Object} userConsent | ||
| */ | ||
| function getBidRequestData(reqBidsConfigObj, callback, config, userConsent) { | ||
| const providers = config?.params?.providers; |
There was a problem hiding this comment.
please type your public interface
|
Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!
|
|
@patmmccann moving to typescript proved to be a way bigger change. can we move forward with just JS? |
* adds agentic audiences * fixes typo and updates docs * fixes data object * adds example * uses multiple data entries * adds agentic audiences spec * uses snakecase * cleans up implementation * updates to latest extension * adds vendorless id * adds to submodules.json * remove gvlid and multiple providers --------- Co-authored-by: Miguel Morales <miguel@iabtechlab.com>
PR: Agentic Audiences RTD submodule (
agenticAudienceAdapter)Use this document as the pull request description (copy into GitHub). Adjust maintainer links and test results before opening the PR.
Summary
Adds
agenticAudienceAdapter, a Real-Time Data (RTD) submodule that reads Agentic Audiences embedding payloads from browser storage (localStorage, with cookie fallback) and merges them into the auction’s global ORTB2 fragment asuser.data, following the normative OpenRTB community extension: Agentic Audiences in OpenRTB (extensions/community_extensions/agentic-audiences.mdin InteractiveAdvertisingBureau/openrtb).Motivation
Publishers and data partners that store Agentic Audiences vectors on the page need a standard way to attach those signals to Prebid.js bid requests so adapters and Prebid Server receive
BidRequest.user.datain the interoperable shape defined by IAB.Specification
Wire format aligns with the community extension Agentic Audiences in OpenRTB:
extensions/community_extensions/agentic-audiences.mdRelated context:
Behavior
agenticAudience(registered onrealTimeData).reqBidsConfigObj.ortb2Fragments.global:user.data: a single-element array containing one OpenRTBDataobject:name: alwaysagenticAudience(submodule identifier).segment: array of segments built from the configured storage key.id/nameandext.aawith:ver,vector,dimension,model,typeparams.storageKeyif it is a non-empty string; otherwise uses the default key_agentic_audience_(exported asDEFAULT_STORAGE_KEYfrom the module).entriesarray.entriesis mapped to a segment.gvlidon the RTD spec. For TCF purpose and vendor checks, publishers can supply a Global Vendor List ID viagvlMapping, keyed by the RTD submodule nameagenticAudience(see below). Storage access uses the RTD module’s storage manager with module type RTD and nameagenticAudience.Build
Include the RTD host module and this submodule in the bundle:
Configuration
Minimal (default storage key):
Custom storage key:
Parameters
params.storageKey_agentic_audience_is used.initalways succeeds when the submodule is included in the build.TCF:
gvlMapping(optional)To associate this RTD submodule with a TCF vendor for consent / activity controls, set
gvlMapping.agenticAudienceto that vendor’s numeric GVL ID (replaceXXXwith the real ID from the GVL):Substitute a numeric literal for
XXX(for example1126); it must not be a string.You can combine this with
realTimeDataand other config in one or moresetConfigcalls. Example:The key
agenticAudiencemust match the RTD data provider / submodule name.Storage payload shape (producer responsibility)
The string at the storage key should be
btoa(JSON.stringify(payload))(or equivalent), wherepayloadincludes:{ "entries": [ { "id": "optional-segment-id", "name": "optional-segment-name", "ver": "1.0.0", "vector": "<Base64 Float32 little-endian payload per spec>", "dimension": 10, "model": "sbert-mini-ctx-001", "type": [1, 2] } ] }The submodule does not validate Base64 length vs
dimensionor normalizetypeto an array; it passes stored values through intoext.aaexcept for the structural mapping above.Example ORTB2 fragment (conceptual)
After merge:
{ "user": { "data": [ { "name": "agenticAudience", "segment": [ { "id": "seg-1", "name": "identity-contextual", "ext": { "aa": { "ver": "1.0.0", "vector": "…", "dimension": 10, "model": "sbert-mini-ctx-001", "type": [1, 2] } } } ] } ] } }Files
modules/agenticAudienceAdapter.jstest/spec/modules/agenticAudienceAdapter_spec.jsmodules/.submodules.jsonagenticAudienceAdapterin the build