luanpoppe commited on
Commit
237192a
·
1 Parent(s): 57fd1ba

fix: prompt do modelo

Browse files
_utils/gerar_relatorio_modelo_usuario/EnhancedDocumentSummarizer.py CHANGED
@@ -256,7 +256,7 @@ class EnhancedDocumentSummarizer(DocumentSummarizer):
256
 
257
  modelo_gerado = llm.predict(
258
  prompt_gerar_modelo.format(
259
- context=relatorio_gerado, modelo_usuario=modelo_buscado
260
  )
261
  )
262
 
 
256
 
257
  modelo_gerado = llm.predict(
258
  prompt_gerar_modelo.format(
259
+ context=relatorio_gerado, modelo_usuario=serializer.data["modelo"]
260
  )
261
  )
262
 
_utils/gerar_relatorio_modelo_usuario/prompts.py CHANGED
@@ -35,7 +35,7 @@ You are a large language model that must produce a single final sentence in **Po
35
  **Contextual Information (provided separately):**
36
  {context}
37
  **User Model (provided separately):**
38
- {modelo_usuario}
39
  **Instructions:**
40
  1. **Goal:** Produce one single final sentence in Portuguese that matches the structure, format, and style given by `user's template`.
41
  2. **Chain of Thought (private to the assistant and not to be shown in the final answer):**
@@ -82,11 +82,11 @@ You are a language model specialized in producing concise and well-structured le
82
  3. **Prescriptive Details**: If no other interruptive or suspensive causes of prescription are mentioned, confirm that there are none.
83
  4. **Formatting**: Your final answer must strictly follow the format below, in Portuguese, and replace the placeholders with the appropriate information:
84
  ```
85
- <formato>
86
  Trata-se de Ação Penal em que o Ministério Público denunciou [nome_do_reu], pela prática do [nome_do_crime] [artigo_e_inciso_do_crime], do Código Penal.
87
  A denúncia foi recebida em [data_do_recebimento], conforme Decisão [id_do_documento].
88
  Não há outras causas interruptivas ou suspensivas da prescrição.
89
- </formato>
90
  ```
91
  5. **Completeness**: If any piece of required information is missing in the `context`, note that explicitly in the final answer within the format.
92
  **Reminder**:
 
35
  **Contextual Information (provided separately):**
36
  {context}
37
  **User Model (provided separately):**
38
+ <user's_template>{modelo_usuario}</user's_template>
39
  **Instructions:**
40
  1. **Goal:** Produce one single final sentence in Portuguese that matches the structure, format, and style given by `user's template`.
41
  2. **Chain of Thought (private to the assistant and not to be shown in the final answer):**
 
82
  3. **Prescriptive Details**: If no other interruptive or suspensive causes of prescription are mentioned, confirm that there are none.
83
  4. **Formatting**: Your final answer must strictly follow the format below, in Portuguese, and replace the placeholders with the appropriate information:
84
  ```
85
+ <relatorio>
86
  Trata-se de Ação Penal em que o Ministério Público denunciou [nome_do_reu], pela prática do [nome_do_crime] [artigo_e_inciso_do_crime], do Código Penal.
87
  A denúncia foi recebida em [data_do_recebimento], conforme Decisão [id_do_documento].
88
  Não há outras causas interruptivas ou suspensivas da prescrição.
89
+ </relatorio>
90
  ```
91
  5. **Completeness**: If any piece of required information is missing in the `context`, note that explicitly in the final answer within the format.
92
  **Reminder**: