Spaces:
Runtime error
Runtime error
sanjeevbora
commited on
Commit
•
8b8fdbe
1
Parent(s):
511c811
Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,7 @@ books_db_client_retriever = RetrievalQA.from_chain_type(
|
|
92 |
# Function to retrieve answer using the RAG system
|
93 |
@spaces.GPU(duration=60)
|
94 |
def test_rag(query):
|
95 |
-
rag_query = f"You are an AI assistant with access to books
|
96 |
books_retriever = books_db_client_retriever.run(rag_query)
|
97 |
corrected_text_match = re.search(r"Helpful Answer:(.*)", books_retriever, re.DOTALL)
|
98 |
if corrected_text_match:
|
|
|
92 |
# Function to retrieve answer using the RAG system
|
93 |
@spaces.GPU(duration=60)
|
94 |
def test_rag(query):
|
95 |
+
rag_query = f"You are an AI assistant with access to a knowledge base containing books and other materials. {query} Summarize the retrieved answer for this query. Retrieve information only from the provided knowledge base. If no relevant information is found in the knowledge base, do not provide placeholder answers. Respond only with clear and concise answers based on the available knowledge."
|
96 |
books_retriever = books_db_client_retriever.run(rag_query)
|
97 |
corrected_text_match = re.search(r"Helpful Answer:(.*)", books_retriever, re.DOTALL)
|
98 |
if corrected_text_match:
|