aarushi-211 commited on
Commit
c03f796
·
verified ·
1 Parent(s): be2ac31

Update src/RAG/rag_pipeline.py

Browse files
Files changed (1) hide show
  1. src/RAG/rag_pipeline.py +10 -6
src/RAG/rag_pipeline.py CHANGED
@@ -37,14 +37,18 @@ class TOSAssistant:
37
  print("Document ingested and Vector Store created.")
38
 
39
  def format_llama3_prompt(self, system_msg, user_msg):
 
 
 
 
 
 
 
40
  return (
41
- f"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n"
42
- f"{system_msg}<|eot_id|>"
43
- f"<|start_header_id|>user<|end_header_id|>\n"
44
- f"{user_msg}<|eot_id|>"
45
- f"<|start_header_id|>assistant<|end_header_id|>\n"
46
  )
47
-
48
  def generate_global_summary(self):
49
  if not self.full_text:
50
  return "No document loaded."
 
37
  print("Document ingested and Vector Store created.")
38
 
39
  def format_llama3_prompt(self, system_msg, user_msg):
40
+ # return (
41
+ # f"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n"
42
+ # f"{system_msg}<|eot_id|>"
43
+ # f"<|start_header_id|>user<|end_header_id|>\n"
44
+ # f"{user_msg}<|eot_id|>"
45
+ # f"<|start_header_id|>assistant<|end_header_id|>\n"
46
+ # )
47
  return (
48
+ f"<|im_start|>system\n{system_msg}<|im_end|>\n"
49
+ f"<|im_start|>user\n{user_msg}<|im_end|>\n"
50
+ f"<|im_start|>assistant\n"
 
 
51
  )
 
52
  def generate_global_summary(self):
53
  if not self.full_text:
54
  return "No document loaded."