Skip to content

LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources。

TypeScript

fix: constrain Review OPTIONS to predefined actions only

nash_suf70ccec6e3a8
diff --git a/src/lib/ingest.ts b/src/lib/ingest.ts
index 2f08ee8c..9905796d 100644
--- a/src/lib/ingest.ts
+++ b/src/lib/ingest.ts
@@ -375,7 +375,7 @@ function buildGenerationPrompt(schema: string, purpose: string, index: string, s
"",
"---REVIEW: type | Title---",
"Description of what needs the user's attention.",
- "OPTIONS: Option A | Option B | Option C",
+ "OPTIONS: (see allowed options below)",
"PAGES: wiki/page1.md, wiki/page2.md",
"SEARCH: search query 1 | search query 2 | search query 3",
"---END REVIEW---",
@@ -386,6 +386,18 @@ function buildGenerationPrompt(schema: string, purpose: string, index: string, s
"- missing-page: an important concept is referenced but has no dedicated page",
"- suggestion: ideas for further research, related sources to look for, or connections worth exploring",
"",
+ "## OPTIONS Rules (CRITICAL — only use these predefined options):",
+ "",
+ "For each review type, use ONLY these allowed OPTIONS:",
+ "",
+ "- contradiction: OPTIONS: Create Page | Skip",
+ "- duplicate: OPTIONS: Create Page | Skip",
+ "- missing-page: OPTIONS: Create Page | Skip",
+ "- suggestion: OPTIONS: Create Page | Skip",
+ "",
+ "The user also has a 'Deep Research' button (auto-added by the system) that triggers web search.",
+ "Do NOT invent custom option labels. Only use 'Create Page' and 'Skip'.",
+ "",
"IMPORTANT for suggestion and missing-page types:",
"- The SEARCH field must contain 2-3 web search queries optimized for finding relevant papers, articles, or documentation.",
"- These should be specific, keyword-rich queries suitable for a search engine — NOT titles or sentences.",