Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Lower judge credit cost and skip judgments in raw mode

Developers Digest2079301e5263
diff --git a/apps/api/src/services/monitoring/search/billing.ts b/apps/api/src/services/monitoring/search/billing.ts
index 2d014916b..a8dfbb933 100644
--- a/apps/api/src/services/monitoring/search/billing.ts
+++ b/apps/api/src/services/monitoring/search/billing.ts
@@ -1,6 +1,6 @@
const SEARCH_CREDITS_PER_TEN_RESULTS = 2;
const SEARCH_CREDITS_PER_TEN_RESULTS_ZDR = 10;
-const SEARCH_JUDGE_CREDITS_PER_RESULT = 5;
+const SEARCH_JUDGE_CREDITS_PER_RESULT = 1;
export function searchCreditsForResultCount(
rawResultCount: number,
diff --git a/apps/api/src/services/monitoring/search/run.ts b/apps/api/src/services/monitoring/search/run.ts
index 0e8789ba7..c9b238fe6 100644
--- a/apps/api/src/services/monitoring/search/run.ts
+++ b/apps/api/src/services/monitoring/search/run.ts
@@ -543,12 +543,8 @@ export async function runSearchTarget(params: {
eventAlertCount,
eventLastAlertAt: nowIso,
},
- judgment: {
- meaningful: true,
- confidence: "low",
- reason: `New search result for "${c.query}"`,
- meaningfulChanges: [],
- },
+ // Raw mode does not run the judge, so it carries no judgment — these are
+ // surfaced as new results, not evaluated as "meaningful".
});
continue;
}
@@ -573,7 +569,11 @@ export async function runSearchTarget(params: {
try {
doc = await params.scrapePage({
url: c.url,
- judgePrompt: buildJudgePrompt(judgeGoal, subject, target.searchWindow),
+ judgePrompt: buildJudgePrompt(
+ judgeGoal,
+ subject,
+ target.searchWindow,
+ ),
});
} catch (error) {
logger.warn("search monitor scrape threw", { url: c.url, error });
@@ -599,7 +599,8 @@ export async function runSearchTarget(params: {
continue;
}
pageText = doc.markdown ?? "";
- realDate = doc.metadata?.publishedTime ?? doc.metadata?.modifiedTime ?? null;
+ realDate =
+ doc.metadata?.publishedTime ?? doc.metadata?.modifiedTime ?? null;
}
resultsJudged += 1;