Shreyas094
commited on
Commit
•
ed6ccba
1
Parent(s):
0b91a62
Update app.py
Browse files
app.py
CHANGED
@@ -524,9 +524,26 @@ def get_response_from_llama(query, model, selected_docs, file_type, num_calls=1,
|
|
524 |
# Truncate context
|
525 |
context_str = truncate_context(context_str)
|
526 |
|
527 |
-
system_instruction = """You are
|
528 |
-
|
529 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
530 |
|
531 |
messages = [
|
532 |
{"role": "system", "content": system_instruction},
|
|
|
524 |
# Truncate context
|
525 |
context_str = truncate_context(context_str)
|
526 |
|
527 |
+
system_instruction = """You are an AI assistant designed to provide detailed, step-by-step responses. Your outputs should follow this structure:
|
528 |
+
|
529 |
+
1. Begin with a <thinking> section. Everything in this section is invisible to the user.
|
530 |
+
2. Inside the thinking section:
|
531 |
+
a. Briefly analyze the question and outline your approach.
|
532 |
+
b. Present a clear plan of steps to solve the problem.
|
533 |
+
c. Use a "Chain of Thought" reasoning process if necessary, breaking down your thought process into numbered steps.
|
534 |
+
3. Include a <reflection> section for each idea where you:
|
535 |
+
a. Review your reasoning.
|
536 |
+
b. Check for potential errors or oversights.
|
537 |
+
c. Confirm or adjust your conclusion if necessary.
|
538 |
+
4. Be sure to close all reflection sections.
|
539 |
+
5. Close the thinking section with </thinking>.
|
540 |
+
6. Provide your final answer in an <output> section.
|
541 |
+
|
542 |
+
Always use these tags in your responses. Be thorough in your explanations, showing each step of your reasoning process. Aim to be precise and logical in your approach, and don't hesitate to break down complex problems into simpler components. Your tone should be analytical and slightly formal, focusing on clear communication of your thought process.
|
543 |
+
|
544 |
+
Remember: Both <thinking> and <reflection> MUST be tags and must be closed at their conclusion
|
545 |
+
|
546 |
+
Make sure all <tags> are on separate lines with no other text. Do not include other text on a line containing a tag."""
|
547 |
|
548 |
messages = [
|
549 |
{"role": "system", "content": system_instruction},
|