fix: improve summarization prompt to preserve names and context
This commit is contained in:
@@ -194,8 +194,19 @@
|
|||||||
// Trim text to keep API costs low; ~4000 chars ≈ ~1000 tokens
|
// Trim text to keep API costs low; ~4000 chars ≈ ~1000 tokens
|
||||||
const text = rawText.trim().slice(0, 4500);
|
const text = rawText.trim().slice(0, 4500);
|
||||||
|
|
||||||
const systemPrompt = 'You are a concise summarizer. Write a 2-4 sentence TL;DR paragraph. Always mention who or what the content is about, the key events or arguments, and why it matters. Preserve names, dates, and context. Do not use bullet points. Do not add preamble like "This article is about" — just start summarizing.';
|
const prompt = `Summarize the following text in 2-3 sentences in English.
|
||||||
const prompt = `<|system|>${systemPrompt}<|user|>Summarize this:\n\n${text}<|assistant|>`;
|
|
||||||
|
Rules:
|
||||||
|
- You MUST use the full name of every person mentioned — never say "the subject", "he", "she", or "an unnamed figure" without first stating their name.
|
||||||
|
- Include what they did, when, and why it matters historically or contextually.
|
||||||
|
- If the source text is in another language, still write the summary in English.
|
||||||
|
- Do not use bullet points. Write a single flowing paragraph.
|
||||||
|
- Start directly with the person's name or the topic — no preamble.
|
||||||
|
|
||||||
|
Text:
|
||||||
|
${text}
|
||||||
|
|
||||||
|
Summary:`;
|
||||||
|
|
||||||
GM_xmlhttpRequest({
|
GM_xmlhttpRequest({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
Reference in New Issue
Block a user