Skip to content

armgit / storm

Public Imported from GitHub
0

An LLM-powered knowledge curation system that researches a topic and generates a full-length report with citations.

update article polish dspy config to be more robust and compatible with more lm

Yucheng-Jiang6a6ae49ff962
diff --git a/knowledge_storm/storm_wiki/modules/article_polish.py b/knowledge_storm/storm_wiki/modules/article_polish.py
index fb85b0f..85c8daa 100644
--- a/knowledge_storm/storm_wiki/modules/article_polish.py
+++ b/knowledge_storm/storm_wiki/modules/article_polish.py
@@ -85,14 +85,14 @@ class PolishPageModule(dspy.Module):
self.polish_page = dspy.Predict(PolishPage)
def forward(self, topic: str, draft_page: str, polish_whole_page: bool = True):
- with dspy.settings.context(lm=self.write_lead_engine):
+ with dspy.settings.context(lm=self.write_lead_engine, show_guidelines=False):
lead_section = self.write_lead(
topic=topic, draft_page=draft_page
).lead_section
if "The lead section:" in lead_section:
lead_section = lead_section.split("The lead section:")[1].strip()
if polish_whole_page:
- with dspy.settings.context(lm=self.polish_engine):
+ with dspy.settings.context(lm=self.polish_engine, show_guidelines=False):
page = self.polish_page(draft_page=draft_page).page
else:
page = draft_page