Soham Waghmare commited on
Commit
d81dcf8
·
1 Parent(s): b636e8f

fix: updates outline-generation, outline-filling prompt; reduces complexity

Browse files
Files changed (1) hide show
  1. backend/knet.py +12 -10
backend/knet.py CHANGED
@@ -23,7 +23,7 @@ DATE = datetime.now().strftime("%d %b, %Y")
23
 
24
  class Prompt:
25
  def __init__(self) -> None:
26
- self.research_plan = dedent("""You are an expert AI Deep Research agent, part of a Multiagent system.
27
 
28
  User query:
29
  "{topic}".
@@ -72,39 +72,41 @@ class Prompt:
72
  - Goes deeper into important details
73
 
74
  - Do not do quote searches
75
- - Keep the queries short and to the point
76
  Return as JSON array of objects with properties:
77
  - query (string)""")
78
 
79
- self.report_outline = dedent("""Generate a comprehensive outline for a report on the user query based on the findings:
80
- User query:
81
  {topic}
82
 
83
  Findings:
84
  {ctx_manager}
85
 
 
86
  The outline should include:
87
  - Title
88
  - List of h2 headings
89
  Do not include hashtags""")
90
 
91
- self.report_fillin = dedent("""Fill in the content for the following report outline on the user query based on the following research findings:
92
- User query:
93
  {topic}
94
 
95
  Findings:
96
  {ctx_manager}
97
 
98
- Report generated os far:
99
- {report_progress}
100
-
101
  The outline:
102
  {report_outline}
103
 
 
 
 
104
  Current heading to fill in:
105
  ## {slot}
106
 
107
- The content should be comprehensive, detailed and well-structured, providing detailed information on the topic. Use tables, lists, and other formatting as needed to enhance readability.
 
108
  Do not include the heading in the content.
109
  """)
110
 
 
23
 
24
  class Prompt:
25
  def __init__(self) -> None:
26
+ self.research_plan = dedent("""You are an expert Deep Research agent, part of a Multiagent system.
27
 
28
  User query:
29
  "{topic}".
 
72
  - Goes deeper into important details
73
 
74
  - Do not do quote searches
75
+ - Queries should be generic and short.
76
  Return as JSON array of objects with properties:
77
  - query (string)""")
78
 
79
+ self.report_outline = dedent("""Generate a comprehensive outline for a report based on the findings:
80
+ Original user query for your context:
81
  {topic}
82
 
83
  Findings:
84
  {ctx_manager}
85
 
86
+ If there are multiple comparisons, only create one heading for all.
87
  The outline should include:
88
  - Title
89
  - List of h2 headings
90
  Do not include hashtags""")
91
 
92
+ self.report_fillin = dedent("""Fill in the content for the following report outline based on the following research findings:
93
+ Original user query for your context:
94
  {topic}
95
 
96
  Findings:
97
  {ctx_manager}
98
 
 
 
 
99
  The outline:
100
  {report_outline}
101
 
102
+ Report generated so far:
103
+ {report_progress}
104
+
105
  Current heading to fill in:
106
  ## {slot}
107
 
108
+ The content should be comprehensive, detailed and well-structured, providing detailed information on the topic.
109
+ If needed use tables, lists. Do not include subheadings.
110
  Do not include the heading in the content.
111
  """)
112