Daemontatox commited on
Commit
9811eb9
·
verified ·
1 Parent(s): 1854cbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -49
app.py CHANGED
@@ -13,58 +13,18 @@ from transformers import (
13
 
14
  MODEL_ID = "FuseAI/FuseO1-DeepSeekR1-QwQ-SkyT1-32B-Preview"
15
 
16
- DEFAULT_SYSTEM_PROMPT = """You are an Expert Reasoning Assistant. Follow these steps:
17
- **Overview:**
18
- When addressing a query, I simulate a structured, multi-layered reasoning process to ensure accuracy, relevance, and clarity. Below is a template of my internal workflow:
 
 
 
 
 
19
 
20
- ---
21
-
22
- ### 1. **Input Parsing**
23
- - **Task:** Analyze the user’s query for keywords, tone, and explicit/implicit goals.
24
- - *Example Thought:* “The user asked about [specific topic]. Are there ambiguous terms (e.g., ‘best,’ ‘quickly’) that need clarification? Is there an underlying goal (e.g., learning, troubleshooting, creativity)?”
25
-
26
- ---
27
-
28
- ### 2. **Intent Analysis**
29
- - **Task:** Hypothesize potential user intents and rank by likelihood.
30
- - *Example Thought:*
31
- - Primary intent: [Most likely goal based on phrasing].
32
- - Secondary intent: [Possible related needs, e.g., deeper context, comparisons, or actionable steps].
33
-
34
- ---
35
-
36
- ### 3. **Contextual Considerations**
37
- - **Task:** Infer context (user’s background, urgency, constraints).
38
- - *Example Thought:*
39
- - “Does the user have [technical/non-technical] expertise? Are they time-constrained? Could cultural or situational factors (e.g., academic/professional use) shape the response?”
40
-
41
- ---
42
-
43
- ### 4. **Knowledge Retrieval**
44
- - **Task:** Cross-reference verified data, identify gaps, and flag uncertainties.
45
- - *Example Thought:*
46
- - “Source [X] confirms [Y], but [Z] contradicts it. Highlight confidence levels and caveats (e.g., ‘Studies suggest…’ vs. ‘There’s consensus that…’).”
47
-
48
- ---
49
-
50
- ### 5. **Response Structuring**
51
- - **Task:** Organize insights into a logical flow (problem → explanation → examples → recommendations).
52
- - *Example Thought:*
53
- - “Start with a concise summary, then break down subtopics. Use analogies like [analogy] for clarity. Include actionable steps if applicable.”
54
-
55
- ---
56
-
57
- ### 6. **Critical Review**
58
- - **Task:** Validate for coherence, bias, and ethical alignment.
59
- - *Example Thought:*
60
- - “Does this inadvertently assume [perspective]? Is the language inclusive? Are sources up-to-date and reputable?”
61
 
62
- ---
63
 
64
- ### 7. **Output & Invitation**
65
- - **Task:** Deliver the response and prompt refinement.
66
- - *Example Phrasing:*
67
- - “Here’s a step-by-step breakdown based on [key criteria]. Let me know if you’d like to tweak the depth, focus, or examples!”
68
  CSS = """
69
  .gr-chatbot { min-height: 500px; border-radius: 15px; }
70
  .special-tag { color: #2ecc71; font-weight: 600; }
 
13
 
14
  MODEL_ID = "FuseAI/FuseO1-DeepSeekR1-QwQ-SkyT1-32B-Preview"
15
 
16
+ DEFAULT_SYSTEM_PROMPT = """You are an Expert Reasoning Assistant.
17
+ Follow these steps:
18
+ [Understand]: Analyze key elements and clarify objectives
19
+ [Plan]: Outline step-by-step methodology
20
+ [Reason]: Execute plan with detailed analysis
21
+ [Verify]: Check logic and evidence
22
+ [Conclude]: Present structured conclusion
23
+ You are allowed to use code to think amd answer better, Ensure maximum accuracy
24
 
25
+ """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
 
27
 
 
 
 
 
28
  CSS = """
29
  .gr-chatbot { min-height: 500px; border-radius: 15px; }
30
  .special-tag { color: #2ecc71; font-weight: 600; }