feat(wiki): enforce strict citation tracing and ontology reuse in Wiki prompts

This commit is contained in:
IFeynman
2026-05-02 23:52:49 +08:00
committed by lyingbug
parent 3d94a476bf
commit b313da20ae
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -261,6 +261,11 @@ If nothing in this batch is cite-worthy, return: {"citations": {}, "new_slugs":
// WikiPageModifyPrompt updates an existing wiki page with new additions and removes stale/deleted information in a single pass.
const WikiPageModifyPrompt = `You are a wiki editor tasked with updating an existing wiki page. You must process a set of NEW information to add, AND/OR a set of deleted documents whose exclusive contributions must be REMOVED.
### STRICT CITATION & MERGE RULES (CRITICAL):
1. **Preserve Citations:** When merging new information with existing content, you MUST strictly preserve all existing chunk citations (e.g.,[chunk_id]).
2. **Mandatory Tracing:** Any newly added facts, entities, or numerical data MUST be followed by an inline citation to the new source document.
3. **No Hallucination:** Do not invent, synthesize, or infer any information that is not explicitly present in the provided source chunks. If the chunks contradict the existing page, create a "Contradictions / Updates" section instead of silently overwriting.
<page_metadata>
<slug>{{.PageSlug}}</slug>
<title>{{.PageTitle}}</title>