Spaces:
Runtime error
Runtime error
MikeCraBash
commited on
Commit
•
51c1690
1
Parent(s):
a3a4963
Update app.py
Browse files
app.py
CHANGED
@@ -70,50 +70,19 @@ from langchain_core.prompts import ChatPromptTemplate
|
|
70 |
|
71 |
RAG_PROMPT = """
|
72 |
SYSTEM:
|
73 |
-
You are a professional personal assistant
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
Here is an example of a transactional conversation:
|
81 |
-
User: When is the conference?
|
82 |
-
You: The conference is on June 1st, 2024. What else would you like to know?
|
83 |
-
|
84 |
-
It can also be a chain of questions and answers where you and the user continues the chain until they say "Got it".
|
85 |
-
Here is an example of a transactional conversation:
|
86 |
-
User: What sessions should I attend?
|
87 |
-
You: You should attend the keynote session by Bono. Would you like to know more?
|
88 |
-
User: Yes
|
89 |
-
You: The keynote session by Bono is on June 1st, 2024. What else would you like?
|
90 |
-
|
91 |
-
If asked a question about a sessions, you can provide detailed information about the session.
|
92 |
-
If there are multiple sessions, you can provide information about each session.
|
93 |
-
|
94 |
-
The format of session related replies is:
|
95 |
-
Title:
|
96 |
-
Description:
|
97 |
-
Speaker:
|
98 |
-
Background:
|
99 |
-
Date:
|
100 |
-
Topics to Be Covered:
|
101 |
-
Questions to Ask:
|
102 |
|
103 |
CONTEXT:
|
104 |
{context}
|
105 |
|
106 |
QUERY:
|
107 |
{question}
|
108 |
-
ALL ANWSERS
|
109 |
-
Most questions are about the date, location, and purpose of the conference.
|
110 |
-
You may be asked for fine details about the conference regarding the speakers, sponsors, and attendees.
|
111 |
-
You are capable of looking up information and providing detailed responses.
|
112 |
-
When asked a question about a conference, you should provide a detailed response.
|
113 |
-
After completing your response, you should ask the user if they would like to know more about the conference by asking "Hope that helps".
|
114 |
-
If the user says "yes", you should provide more information about the conference. If the user says "no", you should say "Goodbye! or ask if they would like to provide feedback.
|
115 |
-
If you are asked a question about Cher, you should respond with "Rock on With Your Bad Self!".
|
116 |
-
You guess if you do not have a answer, but you must preface the repsonse with: "I might be guessing, but ..."
|
117 |
"""
|
118 |
rag_prompt = ChatPromptTemplate.from_template(RAG_PROMPT)
|
119 |
|
|
|
70 |
|
71 |
RAG_PROMPT = """
|
72 |
SYSTEM:
|
73 |
+
You are a professional personal assistant who can answer only 4 questions:
|
74 |
+
1) What is email, you respond: Email Answer.
|
75 |
+
2) What is research, you respond: Research Answer.
|
76 |
+
3) What is lecture, you rspond: Lecture Answer.
|
77 |
+
4) What is grading, you respond: Grading Answer.
|
78 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
CONTEXT:
|
81 |
{context}
|
82 |
|
83 |
QUERY:
|
84 |
{question}
|
85 |
+
ALL ANWSERS ARE Email Answer, Research Answer, Lecture Answer, or Grading Answer. If you can not answer the question, you respond: Insufficent Data for Further Analysis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
"""
|
87 |
rag_prompt = ChatPromptTemplate.from_template(RAG_PROMPT)
|
88 |
|