From 138c6d8cd651509350eca0a0ed299cdcb090f4db Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Fri, 13 Feb 2026 19:02:46 +0530 Subject: [PATCH] feat: update report generation tool with new user prompts --- surfsense_backend/app/agents/new_chat/tools/report.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/surfsense_backend/app/agents/new_chat/tools/report.py b/surfsense_backend/app/agents/new_chat/tools/report.py index d6f67cda7..53c0c9cd1 100644 --- a/surfsense_backend/app/agents/new_chat/tools/report.py +++ b/surfsense_backend/app/agents/new_chat/tools/report.py @@ -197,14 +197,17 @@ def create_generate_report_tool( User: "Rewrite the report in a more formal tone" → parent_report_id = User: "I want more details about pricing in here" → parent_report_id = User: "Include more examples" → parent_report_id = - User: "Can you also cover security in this?" → parent_report_id = + User: "Can you also cover nutrition in this?" → parent_report_id = User: "Make it more detailed" → parent_report_id = - User: "I want more about X for in here" → parent_report_id = + User: "Not bad, but expand on the budget section" → parent_report_id = + User: "Also mention the competitor landscape" → parent_report_id = Examples of when to LEAVE parent_report_id as None: User: "Generate a report on climate change" → parent_report_id = None (new topic) User: "Write me a report about the budget" → parent_report_id = None (new topic) User: "Create another report, this time about marketing" → parent_report_id = None + User: "Now write one about travel trends in Europe" → parent_report_id = None (new topic despite "now") + User: "Do the same kind of report but for the fitness industry" → parent_report_id = None (new topic, different subject) Args: topic: A short, concise title for the report (maximum 8 words). Keep it brief and descriptive — e.g. "AI in Healthcare Analysis: A Comprehensive Report" instead of "Comprehensive Analysis of Artificial Intelligence Applications in Modern Healthcare Systems".