Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

feat: Prevent source/reference sections in report generation

LearningCircuitb63f8dfcc254
diff --git a/src/local_deep_research/report_generator.py b/src/local_deep_research/report_generator.py
index 698ead7e72..f45fea1b41 100644
--- a/src/local_deep_research/report_generator.py
+++ b/src/local_deep_research/report_generator.py
@@ -87,6 +87,7 @@ class IntegratedReportGenerator:
Make the structure specific to the content, not generic.
Each subsection must include its purpose after the | symbol.
+ DO NOT include sections about sources, citations, references, or methodology.
"""
response = search_utilities.remove_think_tags(
@@ -114,6 +115,28 @@ class IntegratedReportGenerator:
{"name": parts[0].strip(), "purpose": parts[1].strip()}
)
+ # Check if the last section is source-related and remove it
+ if structure:
+ last_section = structure[-1]
+ section_name_lower = last_section["name"].lower()
+ source_keywords = [
+ "source",
+ "citation",
+ "reference",
+ "bibliography",
+ "methodology",
+ "timeline",
+ ]
+
+ # Only check the last section for source-related content
+ if any(
+ keyword in section_name_lower for keyword in source_keywords
+ ):
+ logger.info(
+ f"Removed source-related last section: {last_section['name']}"
+ )
+ structure = structure[:-1]
+
return structure
def _research_and_generate_sections(