aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/prompts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/shared/prompts.ts')
-rw-r--r--packages/shared/prompts.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/shared/prompts.ts b/packages/shared/prompts.ts
index af2f07f1..bc130b2c 100644
--- a/packages/shared/prompts.ts
+++ b/packages/shared/prompts.ts
@@ -52,7 +52,7 @@ export function buildImagePrompt(
return `
You are an expert whose responsibility is to help with automatic text tagging for a read-it-later/bookmarking app.
-Please analyze the attached image and suggest relevant tags that describe its key themes, topics, and main ideas. The rules are:
+Analyze the attached image and suggest relevant tags that describe its key themes, topics, and main ideas. The rules are:
- Aim for a variety of tags, including broad categories, specific keywords, and potential sub-genres.
- The tags must be in ${lang}.
- If the tag is not generic enough, don't include it.
@@ -76,11 +76,14 @@ function constructTextTaggingPrompt(
return `
You are an expert whose responsibility is to help with automatic tagging for a read-it-later/bookmarking app.
-Please analyze the TEXT_CONTENT below and suggest relevant tags that describe its key themes, topics, and main ideas. The rules are:
+Analyze the TEXT_CONTENT below and suggest relevant tags that describe its key themes, topics, and main ideas. The rules are:
- Aim for a variety of tags, including broad categories, specific keywords, and potential sub-genres.
- The tags must be in ${lang}.
- If the tag is not generic enough, don't include it.
-- The content can include text for cookie consent and privacy policy, ignore those while tagging.
+- Return empty tags if the content is:
+ - An error page (404, 403, blocked, not found)
+ - Mostly boilerplate (cookie consent, login walls, GDPR notices)
+ - Garbled, truncated, or nonsensical
- Aim for 3-5 tags.
- If there are no good tags, leave the array empty.
${tagStyleInstruction}