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.

fix: consistent section and subsection numbering (#3579)

Ishitta001be1049520
diff --git a/src/local_deep_research/report_generator.py b/src/local_deep_research/report_generator.py
index 2a89cc3e25..dea3cb3280 100644
--- a/src/local_deep_research/report_generator.py
+++ b/src/local_deep_research/report_generator.py
@@ -356,11 +356,11 @@ class IntegratedReportGenerator:
f"Initialized strategy with {len(existing_questions)} iterations of previous questions"
)
- for section in structure:
+ for i, section in enumerate(structure, 1):
logger.info(f"Processing section: {section['name']}")
section_content = []
- section_content.append(f"# {section['name']}\n")
+ section_content.append(f"# {i}. {section['name']}\n")
# If section has no subsections, create one from the section itself
if not section["subsections"]:
@@ -380,10 +380,10 @@ class IntegratedReportGenerator:
]
# Process each subsection by directly researching it
- for subsection in section["subsections"]:
+ for j, subsection in enumerate(section["subsections"], 1):
# Only add subsection header if there are multiple subsections
if len(section["subsections"]) > 1:
- section_content.append(f"## {subsection['name']}\n")
+ section_content.append(f"## {i}.{j} {subsection['name']}\n")
section_content.append(f"_{subsection['purpose']}_\n\n")
# Get other subsections in this section for context