arjunanand13 commited on
Commit
e4fc58e
·
verified ·
1 Parent(s): 687a1fd

Update rag.py

Browse files
Files changed (1) hide show
  1. rag.py +1 -1
rag.py CHANGED
@@ -35,7 +35,7 @@ class TicketResolver:
35
  return issue_resolution_pairs, resolutions
36
 
37
  def generate_resolution(self,query, retrieved_resolutions):
38
- combined_resolutions = " ".join([str(resolution) for resolution in retrieved_resolutions if pd.notna(resolution)])
39
  # prompt = f"Based on these resolutions: {combined_resolutions}. Check if the query {query} has any related queries in combined_resolutions ,if found relatable queries Generate a generic resolution combining all matched ones : . If no matches or relatable issues are found in combing resolutions return a generic solution combining all :"
40
  # prompt = f"The query {query} might have resolution in combined_resolutions : {combined_resolutions}. Return final resolution if similar issue is present in combined_resolutions or return a generic one . The returned final resolution should be advice POV."
41
  prompt=f"Here is the current user query{query}, need a resolution for same. These are some example query and resolution {example_resolutions}, you may use them if relevant."
 
35
  return issue_resolution_pairs, resolutions
36
 
37
  def generate_resolution(self,query, retrieved_resolutions):
38
+ example_resolutions = " ".join([str(resolution) for resolution in retrieved_resolutions if pd.notna(resolution)])
39
  # prompt = f"Based on these resolutions: {combined_resolutions}. Check if the query {query} has any related queries in combined_resolutions ,if found relatable queries Generate a generic resolution combining all matched ones : . If no matches or relatable issues are found in combing resolutions return a generic solution combining all :"
40
  # prompt = f"The query {query} might have resolution in combined_resolutions : {combined_resolutions}. Return final resolution if similar issue is present in combined_resolutions or return a generic one . The returned final resolution should be advice POV."
41
  prompt=f"Here is the current user query{query}, need a resolution for same. These are some example query and resolution {example_resolutions}, you may use them if relevant."