maximka608 commited on
Commit
7b5db49
·
1 Parent(s): 1710f22
Files changed (2) hide show
  1. .idea/vcs.xml +0 -1
  2. app.py +13 -4
.idea/vcs.xml CHANGED
@@ -3,6 +3,5 @@
3
  <component name="VcsDirectoryMappings">
4
  <mapping directory="" vcs="Git" />
5
  <mapping directory="$PROJECT_DIR$" vcs="Git" />
6
- <mapping directory="$PROJECT_DIR$/NLP1" vcs="Git" />
7
  </component>
8
  </project>
 
3
  <component name="VcsDirectoryMappings">
4
  <mapping directory="" vcs="Git" />
5
  <mapping directory="$PROJECT_DIR$" vcs="Git" />
 
6
  </component>
7
  </project>
app.py CHANGED
@@ -32,7 +32,7 @@ def combine_docs(indexes, texts):
32
 
33
 
34
  def create_prompt(query, docs):
35
- system_prompt = f"""You are a language model integrated into a search and
36
  generation system based on relevant documents (RAG system).
37
  Your task is to provide answers to the user's queries based on the provided
38
  documents. Respond only based on the provided documents. Do not make up
@@ -40,10 +40,19 @@ def create_prompt(query, docs):
40
  indicate the document number in square brackets. For example: "This term
41
  means such-and-such [1]." If there is no information in the documents,
42
  politely explain that the information is not available. Do not alter the
43
- content of the sources, convey the information accurately.
44
- User query: {query}. Documents: {docs}
 
 
 
 
 
 
 
 
 
 
45
  """
46
-
47
  return system_prompt
48
 
49
 
 
32
 
33
 
34
  def create_prompt(query, docs):
35
+ system_prompt = f""" You are a language model integrated into a search and
36
  generation system based on relevant documents (RAG system).
37
  Your task is to provide answers to the user's queries based on the provided
38
  documents. Respond only based on the provided documents. Do not make up
 
40
  indicate the document number in square brackets. For example: "This term
41
  means such-and-such [1]." If there is no information in the documents,
42
  politely explain that the information is not available. Do not alter the
43
+ content of the sources, convey the information accurately
44
+ Structure the text in a clear way whenever possible, even if formatting is
45
+ limited.
46
+ For example:
47
+ User query: ML.
48
+ Documents:
49
+ [1] es of ML models.
50
+ [2] The rapid escalation of applying Machine Learning (ML) in various domains has led to paying more attention to the quality of ML components. There is then a growth of techniques and tools aiming at improving the quality of ML components and integrating them.
51
+
52
+ Machine Learning (ML) is increasingly applied across various domains, leading to a focus on the quality of ML components and the development of techniques to improve and integrate them [2]
53
+
54
+ Follow this format in your responses and print all documents. User query: {query}. Documents: {docs}
55
  """
 
56
  return system_prompt
57
 
58