Leo Fan commited on
Commit
1fe7895
1 Parent(s): 06fe720

Tuned prompt.

Browse files
app/__pycache__/__init__.cpython-311.pyc CHANGED
Binary files a/app/__pycache__/__init__.cpython-311.pyc and b/app/__pycache__/__init__.cpython-311.pyc differ
 
app/__pycache__/server.cpython-311.pyc CHANGED
Binary files a/app/__pycache__/server.cpython-311.pyc and b/app/__pycache__/server.cpython-311.pyc differ
 
app/server.py CHANGED
@@ -28,7 +28,7 @@ retriever = faiss_index.as_retriever()
28
  # retriever = faiss_index.as_retriever(search_kwargs={"k": 2})
29
 
30
  prompt_template = """\
31
- Use the provided context to answer the user's question. If the context is not relevant or the question is general, respond as you would in a normal conversation. If you don't know the answer, try to provide related information that might help the user understand the topic better. The answer you provided should be concise but comprehensive. Your goal is to help the user learn and understand how to perform the PCR-test for COVID-19 better.
32
 
33
  Context:
34
  {context}
@@ -36,10 +36,6 @@ Context:
36
  Question:
37
  {question}"""
38
 
39
- # prompt_template = """
40
- # Question:
41
- # {question}"""
42
-
43
  rag_prompt = ChatPromptTemplate.from_template(prompt_template)
44
 
45
  entry_point_chain = RunnableParallel(
 
28
  # retriever = faiss_index.as_retriever(search_kwargs={"k": 2})
29
 
30
  prompt_template = """\
31
+ Given the context, your task is to answer the users question. If the answer is unknown, admit it. If the context doesn’t apply or the question is general, respond as you would in a regular conversation. If the answer is uncertain, try to provide related information that could help the user better understand the topic. Your response should be concise yet comprehensive, limited to 3 sentences. Your primary goal is to assist the user in learning and understanding how to perform a PCR test for COVID-19 more effectively. If you’re unsure about the information, suggest that the user consult their instructor for further clarification.
32
 
33
  Context:
34
  {context}
 
36
  Question:
37
  {question}"""
38
 
 
 
 
 
39
  rag_prompt = ChatPromptTemplate.from_template(prompt_template)
40
 
41
  entry_point_chain = RunnableParallel(
langserve_index/index.faiss CHANGED
Binary files a/langserve_index/index.faiss and b/langserve_index/index.faiss differ
 
langserve_index/index.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:42189b8b84efa6e2e9112a77d63f85563c8b12d7955cc3ae5d26b17cff2ef4e8
3
- size 13230
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0826ba47ea16cbda0118e47dec8b114457c0a40cd6f73836e16840b111b7f77
3
+ size 13056