bupa1018 commited on
Commit
99633b4
·
1 Parent(s): e75a82f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -9
app.py CHANGED
@@ -177,15 +177,6 @@ def query_chroma(vectorstore, query, k):
177
  print("-" * 50)
178
  return chunks_with_references
179
 
180
- def rag_workflow(query):
181
- docs = query_chroma(vectorstore, query, k=10)
182
- context = "\n\n".join([doc for doc, _ in docs])
183
- references = "\n".join([f"[{i+1}] {ref}" for i, (_, ref) in enumerate(docs)])
184
- print(f"Context for the query:\n{context}\n")
185
- print(f"References for the query:\n{references}\n")
186
- prompt = f"You are an intelligent AI assistant who is very good in giving answers for anything asked or instructed by the user. Provide a clear and concise answer based only on the pieces of retrieved context. You must follow this very strictly, do not use anything else other than the retrieved context. If no related Information is found from the context, reply that you do not know. \n\nContext:\n{context}\n\nQuery: {query}"
187
-
188
-
189
  def rag_workflow(query):
190
  docs = query_chroma(vectorstore, query, k=10)
191
  context = "\n\n".join([doc for doc, _ in docs])
 
177
  print("-" * 50)
178
  return chunks_with_references
179
 
 
 
 
 
 
 
 
 
 
180
  def rag_workflow(query):
181
  docs = query_chroma(vectorstore, query, k=10)
182
  context = "\n\n".join([doc for doc, _ in docs])