mext commited on
Commit
1e9fddd
·
verified ·
1 Parent(s): 8715a35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -259,7 +259,7 @@ def rag_response(query):
259
  retrieved_docs = search_knowledge_base(query)
260
  context = "\n".join(doc.page_content for doc in retrieved_docs)
261
  prompt = f"Context:\n{context}\n\nQuestion: {query}\nAnswer:"
262
- llm = ChatOpenAI(model="gpt-4o", temperature=0.5, api_key=openai_api_key)
263
  response = llm.invoke(prompt)
264
  return response.content
265
  except Exception as e:
@@ -305,10 +305,10 @@ prompt_message = f"""
305
 
306
  If query is related to trust builders or proof points , refer to knowledge base :[knowledge_base] and follow the instructions :
307
  * Generate a compelling copy based upon guidlines & objective of specific trust bucket mentioned in [{input}].
308
- * Return around 5-6 points but do not explain them much just return short facts as dot points.
309
  * Strictly Do not mention "Trust" , "Stability" , "Development" , "Relationship" , "Competence" , "benefit" , "vision" words in your response .
310
  * If {input} contains more than one trust bucket then Do not make seperate sections/headings for both the buckets .
311
- * Proof Points: Use guiding principles or objectives from the knowledge base to support your points . Add sub-points everytime
312
  * Strictly be specific with names, dates, locations, numbers, Dollars , currency , figures etc. in proof points .Proof points should contain as much amount figures,dollars as possible .
313
  * With every proof point , always return source link of that information in bracket with every point.
314
  * Trust Statements/TrustBuilders: Use these terms interchangeably in place of "proof points" throughout your response. Do not overuse one term.
 
259
  retrieved_docs = search_knowledge_base(query)
260
  context = "\n".join(doc.page_content for doc in retrieved_docs)
261
  prompt = f"Context:\n{context}\n\nQuestion: {query}\nAnswer:"
262
+ llm = ChatOpenAI(model="gpt-4o", temperature=0.4, api_key=openai_api_key)
263
  response = llm.invoke(prompt)
264
  return response.content
265
  except Exception as e:
 
305
 
306
  If query is related to trust builders or proof points , refer to knowledge base :[knowledge_base] and follow the instructions :
307
  * Generate a compelling copy based upon guidlines & objective of specific trust bucket mentioned in [{input}].
308
+ * Return around 5-6 points but do not explain ,just return short facts as dot points.
309
  * Strictly Do not mention "Trust" , "Stability" , "Development" , "Relationship" , "Competence" , "benefit" , "vision" words in your response .
310
  * If {input} contains more than one trust bucket then Do not make seperate sections/headings for both the buckets .
311
+ * Proof Points: Use guiding principles or objectives from the knowledge base to support short facts and dot points. Add sub-points everytime .
312
  * Strictly be specific with names, dates, locations, numbers, Dollars , currency , figures etc. in proof points .Proof points should contain as much amount figures,dollars as possible .
313
  * With every proof point , always return source link of that information in bracket with every point.
314
  * Trust Statements/TrustBuilders: Use these terms interchangeably in place of "proof points" throughout your response. Do not overuse one term.