leandrocarneiro commited on
Commit
7e729ae
·
verified ·
1 Parent(s): 41f1164

Upload rag.py

Browse files
Files changed (1) hide show
  1. rag.py +6 -2
rag.py CHANGED
@@ -95,12 +95,16 @@ class Rag:
95
  If the pieces of text don't enough information about the question to create the news, just say that you need more sources of information, nothing more.
96
  The news should have a title.
97
  The news should be written in a formal language.
98
- The source of the news should not be in the news, just the text.
99
  The news should have between {min_words} and {max_words} words.
 
100
  After write the news, confirm if it is written in Portuguese language.
 
101
  The news should be about the following context: <{context}>
102
  Question: <{question}>
103
- Answer here:"""
 
 
104
  self.prompt = PromptTemplate(template=prompt_template,
105
  input_variables=["context", "question"],
106
  partial_variables={"min_words": min_words, "max_words": max_words})
 
95
  If the pieces of text don't enough information about the question to create the news, just say that you need more sources of information, nothing more.
96
  The news should have a title.
97
  The news should be written in a formal language.
98
+ The source written in the pieces of text should not be shown in the news.
99
  The news should have between {min_words} and {max_words} words.
100
+ The total of words should no be shown in the news.
101
  After write the news, confirm if it is written in Portuguese language.
102
+ Answer the title and the news, nothing more.
103
  The news should be about the following context: <{context}>
104
  Question: <{question}>
105
+ Answer here:
106
+ Title:
107
+ News:"""
108
  self.prompt = PromptTemplate(template=prompt_template,
109
  input_variables=["context", "question"],
110
  partial_variables={"min_words": min_words, "max_words": max_words})