Rahaf2001 commited on
Commit
288b8b4
·
verified ·
1 Parent(s): b559639

Update rag_core.py

Browse files
Files changed (1) hide show
  1. 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", "you are a technical assistant that help the user to retrieve the correct information for them and help them to find the exact information",
46
- "Answer the user's questions the accurate answer! ",
47
- "If you don't know the answer, just say that you don't know, don't make up an answer.\n\n{context}"),
 
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)