Wajahat698 commited on
Commit
b17a3f5
·
verified ·
1 Parent(s): 78d406f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -1119,18 +1119,15 @@ def rag_response(query):
1119
  # Generate AI response with the retrieved context
1120
  prompt = f"""
1121
  Context:
1122
- You are an food for the hungry expert tasked with giving exact content from the source file. Do not add or interpret content. Match headings and details exactly as they appear.
1123
-
1124
- 1. Use only the provided context to generate your answer.
1125
- 2. Match headings and content exactly as they appear in the knowledge base. Do not add, modify, or generalize content.
1126
-
1127
- 3. Maintain clarity and accuracy.
1128
-
1129
  Question:
1130
  {query}
1131
-
1132
  Answer:
 
1133
  """
 
1134
  llm = ChatOpenAI(model="gpt-4", temperature=0.2, api_key=openai_api_key)
1135
  response = llm.invoke(prompt)
1136
 
 
1119
  # Generate AI response with the retrieved context
1120
  prompt = f"""
1121
  Context:
1122
+ {context}
1123
+
 
 
 
 
 
1124
  Question:
1125
  {query}
1126
+
1127
  Answer:
1128
+ Please provide an exact and concise response based only on the context above.
1129
  """
1130
+
1131
  llm = ChatOpenAI(model="gpt-4", temperature=0.2, api_key=openai_api_key)
1132
  response = llm.invoke(prompt)
1133