Spaces:
Sleeping
Sleeping
Update rag_core.py
Browse files- rag_core.py +4 -3
rag_core.py
CHANGED
|
@@ -42,9 +42,10 @@ def scrape_and_process_url(url: str) -> str:
|
|
| 42 |
|
| 43 |
# Create RAG chain
|
| 44 |
prompt = ChatPromptTemplate.from_messages([
|
| 45 |
-
("system", "
|
| 46 |
-
|
| 47 |
-
"
|
|
|
|
| 48 |
("user", "{input}")
|
| 49 |
])
|
| 50 |
document_chain = create_stuff_documents_chain(llm, prompt)
|
|
|
|
| 42 |
|
| 43 |
# Create RAG chain
|
| 44 |
prompt = ChatPromptTemplate.from_messages([
|
| 45 |
+
("system", "Use the following context to answer the user's question. "
|
| 46 |
+
"If the answer is not in the context, say 'I cannot find that information in the provided documentation.' "
|
| 47 |
+
"Do not add any information not found in the context. "
|
| 48 |
+
"Context:\n{context}"),
|
| 49 |
("user", "{input}")
|
| 50 |
])
|
| 51 |
document_chain = create_stuff_documents_chain(llm, prompt)
|