~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
fix: Generate content for sections without subsections
LearningCircuitbb806dc0d647
diff --git a/src/local_deep_research/report_generator.py b/src/local_deep_research/report_generator.pyindex 85033b4d6d..5c83ff019e 100644--- a/src/local_deep_research/report_generator.py+++ b/src/local_deep_research/report_generator.py@@ -172,7 +172,77 @@ class IntegratedReportGenerator:for section in structure:logger.info(f"Processing section: {section['name']}")section_content = []- section_content.append(f"# {section['name']}\n")++ # Extract clean section name if it contains purpose after |+ section_display_name = section["name"]+ if "|" in section["name"] and not section["subsections"]:+ section_display_name = section["name"].split("|", 1)[0].strip()++ section_content.append(f"# {section_display_name}\n")++ # Check if section has subsections+ if not section["subsections"]:+ # Handle sections without subsections (like Conclusion)+ # The section name itself contains the purpose after the |+ section_name_for_display = section["name"]+ if "|" in section["name"]:+ section_title, section_purpose = section["name"].split(+ "|", 1+ )+ section_name_for_display = section_title.strip()+ section_purpose = section_purpose.strip()+ else:+ section_purpose = f"Provide content for {section['name']}"++ # Get all other sections for context+ other_sections = [+ f"- {s['name']}"+ for s in structure+ if s["name"] != section["name"]+ ]+ other_sections_text = (+ "\n".join(other_sections) if other_sections else "None"+ )++ # Generate query for this section+ section_query = (+ f"Research task: Create content for section '{section_name_for_display}' in a report about '{query}'. "+ f"This section's purpose: {section_purpose} "+ f"\n"+ f"Other sections in the report:\n{other_sections_text}\n"+ f"\n"+ f"Focus on providing comprehensive content for this section's specific purpose. "+ f"Include unique insights, specific examples, and concrete information. "+ f"Use tables to organize information where applicable. "+ f"IMPORTANT: Avoid repeating information covered in other sections - focus on what makes this section unique. "+ f"Build upon the previous research findings to provide a cohesive conclusion or exploration of the topic."+ )++ logger.info(+ f"Researching section without subsections: {section_name_for_display} with query: {section_query}"+ )++ # Configure search system for focused search+ original_max_iterations = self.search_system.max_iterations+ self.search_system.max_iterations = 1 # Keep search focused++ # Perform search for this section+ section_results = self.search_system.analyze_topic(+ section_query+ )++ # Restore original iterations setting+ self.search_system.max_iterations = original_max_iterations++ # Add the researched content+ if section_results.get("current_knowledge"):+ section_content.append(section_results["current_knowledge"])+ else:+ section_content.append(+ "*Limited information was found for this section.*\n"+ )++ section_content.append("\n\n")# Process each subsection by directly researching itfor subsection in section["subsections"]: