Skip to content

Commit caeac8a

Browse files
author
Kavyansh Chourasia
committed
Shiksha API: Durable Functions Response Synthesizer prompt updated
1 parent d92bbf0 commit caeac8a

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

shiksha-api/durable-functions/core/query_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ def generate_synthesis_query(
9898
f"{json.dumps(output_format, indent=2)}"
9999
)
100100
else:
101-
synthesis_query += "\nThe output should be in plain string **Markdown** format for ease of readability. DO NOT annotate the output with any special characters."
101+
synthesis_query += "\nThe output should be in plain string **Markdown** format for ease of readability. DO NOT annotate the output with any special characters. Do NOT repeat or regurgitate descriptions of sections provided above. Only generate relevant material as indicated in the section description."
102102

103103
return dedent(self.replace_prompt_variables(synthesis_query))

shiksha-api/durable-functions/core/query_generator_telangana_english_resource_plan.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ def generate_synthesis_query(
5252
mode = self.section.mode
5353
output_format = self.section.output_format
5454

55-
synthesis_query = (
56-
f"You are creating the '{section_title}' section of a resource plan for english subject."
57-
)
55+
synthesis_query = f"You are creating the '{section_title}' section of a resource plan for english subject."
5856

5957
if dependencies:
6058
dependencies_str = "\n\n".join(
@@ -83,6 +81,6 @@ def generate_synthesis_query(
8381
f"{json.dumps(output_format, indent=2)}"
8482
)
8583
else:
86-
synthesis_query += "\nThe output should be in plain string **Markdown** format for ease of readability. DO NOT annotate the output with any special characters."
84+
synthesis_query += "\nThe output should be in plain string **Markdown** format for ease of readability. DO NOT annotate the output with any special characters. Do NOT repeat or regurgitate descriptions of sections provided above. Only generate relevant material as indicated in the section description."
8785

8886
return dedent(self.replace_prompt_variables(synthesis_query))

shiksha-api/durable-functions/core/regen_query_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,6 @@ def generate_synthesis_query(
135135
f"{json.dumps(output_format, indent=2)}"
136136
)
137137
else:
138-
synthesis_query += "\nThe output should be in plain string **Markdown** format for ease of readability. DO NOT annotate the output with any special characters."
138+
synthesis_query += "\nThe output should be in plain string **Markdown** format for ease of readability. DO NOT annotate the output with any special characters. Do NOT repeat or regurgitate descriptions of sections provided above. Only generate relevant material as indicated in the section description."
139139

140140
return dedent(self.replace_prompt_variables(synthesis_query))

0 commit comments

Comments
 (0)