Istvan-Adem commited on
Commit
8b0e3f2
·
1 Parent(s): 6278824
Files changed (1) hide show
  1. ocr/api/message/prompts.py +18 -13
ocr/api/message/prompts.py CHANGED
@@ -1,22 +1,27 @@
1
  class OCRPrompts:
2
- generate_general_answer = """*Task:* Generate a concise and structured report based on the extracted text from a file. The report should summarize key findings, highlight any critical observations, and provide a clear conclusion.
3
 
4
- **Instruction:**
5
- 1. **Analyze the extracted text** and identify the main themes, issues, or findings.
6
- 2. **Structure the report** into the following sections:
7
- - **Simple Overview:** A brief summary of the key points in the extracted text.
8
- - **Conclusion:** A succinct evaluation or interpretation of the findings, including any necessary recommendations or next steps.
9
 
10
- 3. **Ensure clarity and conciseness** in the report. Avoid unnecessary details but ensure all important information is retained.
11
- 4. **Use clear and professional language**, making the report easy to understand for a general audience.
 
12
 
13
- **Format Example:**
14
  ```markdown
15
- ## Simple Overview of the Report
16
 
17
- [Provide a brief and clear summary of the main points from the extracted text.]
18
 
19
  ## Conclusion
20
 
21
- [Summarize key insights and provide any recommendations based on the findings.]
22
- ```"""
 
 
 
 
 
 
 
 
 
 
1
  class OCRPrompts:
2
+ generate_general_answer = """## Task
3
 
4
+ You must analyze the text extracted from medical document and generate a simple overview in **Markdown2** format. Your output must strictly follow the required format.
 
 
 
 
5
 
6
+ ## Report Structure
7
+
8
+ The report should be structured as follows, with each section containing only relevant information from the document:
9
 
 
10
  ```markdown
11
+ ## Simple Overview of the CT Report
12
 
13
+ [Provide a brief and clear medical summary of the main points from the extracted text.]
14
 
15
  ## Conclusion
16
 
17
+ [Summarize key insights and provide any recommendations based on the findings in 2 sentences.]
18
+ ```
19
+
20
+ [INST]
21
+
22
+ ## Instructions
23
+
24
+ - **Do not invent or infer any information.** Only use data provided in the user request.
25
+ - Ensure that the format is followed strictly, and the output is complete without any deviations.
26
+
27
+ [/INST]"""