Merge pull request #19 from tools4ds/Farid-Karimli-patch-1
Browse files
apps/ai_tutor/config/config_manager.py
CHANGED
@@ -44,7 +44,7 @@ class LocalLLMParams(BaseModel):
|
|
44 |
filename: str = (
|
45 |
"tinyllama-1.1b-chat-v1.0.Q5_0.gguf" # Specific name of gguf file in the repo
|
46 |
)
|
47 |
-
|
48 |
"storage/models/tinyllama-1.1b-chat-v1.0.Q5_0.gguf" # Path to the model file
|
49 |
)
|
50 |
|
|
|
44 |
filename: str = (
|
45 |
"tinyllama-1.1b-chat-v1.0.Q5_0.gguf" # Specific name of gguf file in the repo
|
46 |
)
|
47 |
+
path: str = (
|
48 |
"storage/models/tinyllama-1.1b-chat-v1.0.Q5_0.gguf" # Path to the model file
|
49 |
)
|
50 |
|
apps/ai_tutor/config/prompts.py
CHANGED
@@ -21,7 +21,8 @@ prompts = {
|
|
21 |
"Do not get influenced by the style of conversation in the chat history. Follow the instructions given here."
|
22 |
"Chat History:\n{chat_history}\n\n"
|
23 |
"Context:\n{context}\n\n"
|
24 |
-
"Answer the student's question below in a friendly, concise, and engaging manner. Use the context and history
|
|
|
25 |
"Student: {input}\n"
|
26 |
"AI Tutor:"
|
27 |
),
|
@@ -60,7 +61,7 @@ prompts = {
|
|
60 |
"Provide links from the source_file metadata. Use the source context that is most relevant. "
|
61 |
"Speak in a friendly and engaging manner, like talking to a friend. Avoid sounding repetitive or robotic.\n\n"
|
62 |
"Context:\n{context}\n\n"
|
63 |
-
"Answer the student's question below in a friendly, concise, and engaging manner. Use the context and history
|
64 |
"Student: {input}\n"
|
65 |
"AI Tutor:"
|
66 |
),
|
@@ -72,6 +73,7 @@ prompts = {
|
|
72 |
"If you don't know the answer, do your best without making things up. Keep the conversation flowing naturally.\n"
|
73 |
"Provide links from the source_file metadata. Use the source context that is most relevant.\n"
|
74 |
"Speak in a friendly and engaging manner, like talking to a friend. Avoid sounding repetitive or robotic.\n"
|
|
|
75 |
"\n\n"
|
76 |
"user\n"
|
77 |
"Context:\n{context}\n\n"
|
@@ -85,6 +87,7 @@ prompts = {
|
|
85 |
"If you don't know the answer, do your best without making things up. Keep the conversation flowing naturally. "
|
86 |
"Use chat history and context as guides but avoid repeating past responses. Provide links from the source_file metadata. Use the source context that is most relevant. "
|
87 |
"Speak in a friendly and engaging manner, like talking to a friend. Avoid sounding repetitive or robotic.\n"
|
|
|
88 |
"\n\n"
|
89 |
"user\n"
|
90 |
"Chat History:\n{chat_history}\n\n"
|
|
|
21 |
"Do not get influenced by the style of conversation in the chat history. Follow the instructions given here."
|
22 |
"Chat History:\n{chat_history}\n\n"
|
23 |
"Context:\n{context}\n\n"
|
24 |
+
"Answer the student's question below in a friendly, concise, and engaging manner. Give an actual answer, not just a link. Use the context and history if relevant, otherwise, engage in a free-flowing conversation.\n"
|
25 |
+
"If the student is asking about a question on an assignment, use the assignment notebook file for context. Also, lead them towards solving the problem themselves, NOT giving them the answer directly. Be very subtle about it."
|
26 |
"Student: {input}\n"
|
27 |
"AI Tutor:"
|
28 |
),
|
|
|
61 |
"Provide links from the source_file metadata. Use the source context that is most relevant. "
|
62 |
"Speak in a friendly and engaging manner, like talking to a friend. Avoid sounding repetitive or robotic.\n\n"
|
63 |
"Context:\n{context}\n\n"
|
64 |
+
"Answer the student's question below in a friendly, concise, and engaging manner. Give an actual answer, not just a link. Use the context and history if relevant, otherwise, engage in a free-flowing conversation.\n"
|
65 |
"Student: {input}\n"
|
66 |
"AI Tutor:"
|
67 |
),
|
|
|
73 |
"If you don't know the answer, do your best without making things up. Keep the conversation flowing naturally.\n"
|
74 |
"Provide links from the source_file metadata. Use the source context that is most relevant.\n"
|
75 |
"Speak in a friendly and engaging manner, like talking to a friend. Avoid sounding repetitive or robotic.\n"
|
76 |
+
"If the student is asking about a question on an assignment, lead them towards solving the problem themselves, NOT giving them the answer directly. Be very subtle about it."
|
77 |
"\n\n"
|
78 |
"user\n"
|
79 |
"Context:\n{context}\n\n"
|
|
|
87 |
"If you don't know the answer, do your best without making things up. Keep the conversation flowing naturally. "
|
88 |
"Use chat history and context as guides but avoid repeating past responses. Provide links from the source_file metadata. Use the source context that is most relevant. "
|
89 |
"Speak in a friendly and engaging manner, like talking to a friend. Avoid sounding repetitive or robotic.\n"
|
90 |
+
"If the student is asking about a question on an assignment, lead them towards solving the problem themselves, NOT giving them the answer directly. Be very subtle about it."
|
91 |
"\n\n"
|
92 |
"user\n"
|
93 |
"Chat History:\n{chat_history}\n\n"
|