-
Notifications
You must be signed in to change notification settings - Fork 13
feat(LLMO-3074): add offsite-brand-presence audit #2002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rarescheseli
wants to merge
19
commits into
main
Choose a base branch
from
rcheseli/offsite-brand-presence
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,960
−0
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
0669b7f
add offsite-brand-presence audit
f41265c
refactor to parse query-index.json file
5dfe212
fix coverage
329734f
refactor to fetch files with pagination and send to DRS top 20 most c…
59bfb56
remove AuditUrl.findBySiteIdAndUrl check before AuditUrl.create
e866dc7
update comments and send to URL store what we send to DRS
16040fa
fix unit test
92c3491
increase DRS_TOP_URLS_LIMIT
169ef68
add wikipedia to OFFSITE_DOMAINS
d4f90d6
refactor and send top cited URLs to url store
ae739e5
Merge branch 'main' into rcheseli/offsite-brand-presence
c189096
refactor to use DrsClient
7ed04cc
fetch brand presence files sequentially
2b94f86
remove Mentions-related check
1cb3eb7
Merge branch 'main' into rcheseli/offsite-brand-presence
AndreiAlexandruParaschiv 47fef51
Merge branch 'main' into rcheseli/offsite-brand-presence
AndreiAlexandruParaschiv 82531a0
address PR feedback and refactor to send to DRS only URLs that were a…
78261da
Merge branch 'main' into rcheseli/offsite-brand-presence
b81bc2b
send to DRS top cited URLs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /* | ||
| * Copyright 2026 Adobe. All rights reserved. | ||
| * This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. You may obtain a copy | ||
| * of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software distributed under | ||
| * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
| * OF ANY KIND, either express or implied. See the License for the specific language | ||
| * governing permissions and limitations under the License. | ||
| */ | ||
|
|
||
| import { SCRAPE_DATASET_IDS } from '@adobe/spacecat-shared-drs-client'; | ||
|
|
||
| export const PROVIDERS = Object.freeze([ | ||
| 'ai-mode', | ||
| 'all', | ||
| 'chatgpt', | ||
| 'copilot', | ||
| 'gemini', | ||
| 'google-ai-overview', | ||
| 'perplexity', | ||
| ]); | ||
|
|
||
| export const PROVIDERS_SET = new Set(PROVIDERS); | ||
| export const BRAND_PRESENCE_REGEX = /brandpresence-(.+?)-w(\d{1,2})-(\d{4})-.*\.json$/; | ||
|
|
||
| export const URL_STORE_STATUS = Object.freeze({ | ||
| CREATED: 'created', | ||
| FAILED: 'failed', | ||
| }); | ||
|
|
||
| export const OFFSITE_DOMAINS = Object.freeze({ | ||
| 'youtube.com': { | ||
| auditType: 'youtube-analysis', | ||
| datasetIds: [SCRAPE_DATASET_IDS.YOUTUBE_VIDEOS, SCRAPE_DATASET_IDS.YOUTUBE_COMMENTS], | ||
| }, | ||
| 'reddit.com': { | ||
| auditType: 'reddit-analysis', | ||
| datasetIds: [SCRAPE_DATASET_IDS.REDDIT_POSTS, SCRAPE_DATASET_IDS.REDDIT_COMMENTS], | ||
| }, | ||
| 'wikipedia.org': { | ||
| auditType: 'wikipedia-analysis', | ||
| datasetIds: [SCRAPE_DATASET_IDS.WIKIPEDIA], | ||
| }, | ||
| }); | ||
|
|
||
| export const DRS_TOP_URLS_LIMIT = 100; | ||
| export const FETCH_PAGE_SIZE = 80000; | ||
| export const FETCH_TIMEOUT_MS = 60000; | ||
| export const INCLUDE_COLUMNS = ['Sources', 'Region', 'answer_contains_brandname', 'Mentions', 'Citations', 'Prompt'].join(','); | ||
| export const REDDIT_COMMENTS_DAYS_BACK = 30; | ||
| export const TOP_CITED_URLS_LIMIT = 100; | ||
| export const TOP_CITED_DRS_CONFIG = Object.freeze({ | ||
| auditType: 'top-cited-analysis', | ||
| datasetIds: [SCRAPE_DATASET_IDS.TOP_CITED], | ||
| }); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBD if we should increase/decrease this.