Adds Tech Lab Agentic Audiences#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".
| getBidRequestData | ||
| }; | ||
|
|
||
| submodule(REAL_TIME_MODULE, agenticAudienceAdapterSubmodule); |
There was a problem hiding this comment.
Register the new RTD submodule in
.submodules.json
If a publisher builds with --modules=agenticAudienceAdapter and relies on the normal parent-module auto-inclusion, this submodule will never run because gulpHelpers.getArgModules() only prepends rtdModule for names listed in modules/.submodules.json (gulpHelpers.js:61-68), and agenticAudienceAdapter is not added there. The bundle will compile, but the RTD hook is missing at runtime, so the adapter silently does nothing.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
i added the module to modules/.submodules.json
| export const agenticAudienceAdapterSubmodule = { | ||
| name: MODULE_NAME, | ||
| init, | ||
| getBidRequestData |
There was a problem hiding this comment.
Declare a GVL ID for GDPR-enforced deployments
On sites that enable consentManagementTcf with tcfControl, this submodule is treated as an unknown vendor because the registration object never sets gvlid. attachRealTimeDataProvider() only records submodule.gvlid (modules/rtdModule/index.js:198-200), and tcfControl resolves that ID before allowing storage access and UFPD enrichment (modules/tcfControl.js:110-138, 245-257). In that setup, the localStorage/cookie read and the user.data update are both blocked unless the publisher adds a manual gvlMapping, so the module effectively does nothing on GDPR traffic.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I have added VENDORLESS_GVLID
modules/agenticAudienceAdapter.md
Outdated
| ## 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
modules/agenticAudienceAdapter.md
Outdated
| "model": "sbert-mini-ctx-001", | ||
| "dimension": 3, | ||
| "type": [1, 2] | ||
| } |
There was a problem hiding this comment.
A bunch of required fields are missing
modules/agenticAudienceAdapter.js
Outdated
| 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
modules/agenticAudienceAdapter.md
Outdated
|
|
||
| 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
modules/agenticAudienceAdapter.md
Outdated
| 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
modules/agenticAudienceAdapter.md
Outdated
| 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
modules/agenticAudienceAdapter.md
Outdated
| | 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 PR #14626Coverage increased (+0.002%) to 96.344%Diff Coverage: 219 of 222 changed lines covered (98.65%)Uncovered Changes
Coverage Regressions3 previously-covered lines in 2 files lost coverage.
💛 - 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. |
Add Agentic Audience Adapter RTD Module
Description
This PR adds a new RTD (Real-Time Data) provider module that injects Agentic Audiences (vector-based) signals into the OpenRTB bid request. Output follows the OpenRTB community extension Agentic Audiences in OpenRTB. Background: IABTechLab Agentic Audiences.
The module reads agentic audience data from browser storage (localStorage or cookie) and injects it into
user.datawith standardSegmentobjects (id,name,ext).Features
params.providers. Each key (e.g.liveramp,raptive, or a label for a partner not represented by its own Prebid module) becomesuser.data[].namefor that provider’s segments. No extra Prebid.js modules per provider—only this RTD submodule, plus astorageKeyper entry. Future or custom providers work whenever their script stores the Storage Format blob at that key.params.providersis missing, empty, or not an object,initreturns false and no data is injected.Segmentwith Agentic Audiences fields inext(ver,vector,dimension,model,type); the module does not validate or normalize those valuesatob+JSON.parseas in Storage FormatConfiguration
Module
params(this submodule)These are the fields under
realTimeData.dataProviders[].paramswhennameisagenticAudience. OtherdataProvideroptions (e.g.waitForIt) are generic RTD behavior, not read by this module.providersObjectuser.data[].name. Ifprovidersis missing, not an object, or has no own keys,initreturnsfalseand no segments are injected.Each value in
providersis an object. Only the following property is read:storageKeystringlocalStorageand, if unset there, the cookie API. If missing or falsy, that provider entry is skipped (nouser.datarow for it).Provider keys are arbitrary strings chosen by the publisher (or convention with a data partner). There is no whitelist in the module: a key for a future vendor is valid as long as you point
storageKeyat where that partner’s script stores data, using the same JSON shape as in Storage Format.Storage Format
The outer stored value is base64-encoded JSON with an
entriesarray. Each entry maps to one OpenRTBSegment. Description column text is from the OpenRTB community extension Agentic Audiences in OpenRTB (Data.segmentandSegment.ext)."1.0.0").(Base64-decoded byte length) / 4. The decoded byte length must be divisible by 4. This field allows a DSP (or other consumer) to perform rapid validation—for example, by comparingdimensionto an expected length for a givenmodelbefore or without fully decoding the vector."sbert-mini-ctx-001").1= identity,2= contextual,3= reinforcement. An entry may encode multiple signal types.OpenRTB Output
Per Agentic Audiences in OpenRTB, the module appends one
Dataobject underuser.datafor each configured provider that has at least one mappable segment after reading storage.Single provider
Each
Dataobject’snameis the provider key fromparams.providers(e.g.liveramp).segmentis built from that provider’s storedentriesarray.{ "user": { "data": [ { "name": "liveramp", "segment": [ { "id": "agentic-audiences", "ext": { "ver": "1.0.0", "vector": "<Base64 Float32 little-endian per spec>", "dimension": 3, "model": "sbert-mini-ctx-001", "type": [1, 2] } } ] } ] } }Multiple providers
With several providers (e.g.
liverampandraptive), each reads its ownstorageKey;user.datacontains one element per provider that returned segments, in iteration order ofObject.keys(params.providers)(insertion order for ordinary objects).{ "user": { "data": [ { "name": "liveramp", "segment": [ { "id": "agentic-audiences", "ext": { "ver": "1.0.0", "vector": "<Base64 from liveramp storage>", "dimension": 384, "model": "sbert-mini-ctx-001", "type": [1] } } ] }, { "name": "raptive", "segment": [ { "id": "agentic-audiences", "ext": { "ver": "1.0.0", "vector": "<Base64 from raptive storage>", "dimension": 256, "model": "raptive-embed-v1", "type": [2] } } ] } ] } }The sample
idvalues above mirror a typical stored entry; segmentidandnameare copied from storage as provided (the examples omitnameon the segment only for brevity).The
vectorin eachextis whatever string was stored per entry (OpenRTB Base64 Float32 LE per spec); this module does not encode or decode it.Files Changed
modules/agenticAudienceAdapter.js- RTD submodule implementationtest/spec/modules/agenticAudienceAdapter_spec.js- Unit testsBuild
gulp build --modules="rtdModule,agenticAudienceAdapter,..."Testing
References