Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,39 +24,50 @@ st.write(f"You selected: {mode}")
|
|
24 |
|
25 |
# Shinobi and Raikage templates
|
26 |
SHINOBI_TEMPLATE = """
|
27 |
-
You are an advanced prompt enhancer
|
28 |
-
Your task is to
|
29 |
|
30 |
-
β
**
|
31 |
-
β
**
|
32 |
-
β
**
|
33 |
-
β
**
|
34 |
-
β
**
|
35 |
-
β
**
|
|
|
|
|
|
|
36 |
|
37 |
-
### **Enhance the following prompt using Shinobi principles:**
|
38 |
**Original Prompt:**
|
39 |
{user_prompt}
|
40 |
|
41 |
-
**Enhanced
|
|
|
42 |
"""
|
43 |
|
44 |
RAIKAGE_TEMPLATE = """
|
45 |
-
You are an elite
|
46 |
-
Your task is to
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
49 |
-
β
**Context & Execution Approach** β Include a structured methodology to solve the problem.
|
50 |
-
β
**Defined Output Format** β Specify exact structure (JSON, formatted text, markdown, tables, or code blocks).
|
51 |
-
β
**Edge Case Handling & Constraints** β Account for potential failures and model limitations.
|
52 |
-
β
**Optional: Few-Shot Prompting** β If beneficial, provide 1-2 high-quality examples for refinement.
|
53 |
-
β
**Complies with External Factors** β Adhere to best practices (e.g., ethical scraping, security policies).
|
54 |
|
55 |
-
### **Enhance the following prompt using Raikage principles:**
|
56 |
**Original Prompt:**
|
57 |
{user_prompt}
|
58 |
|
59 |
-
**Enhanced
|
|
|
60 |
"""
|
61 |
if st.button("Generate Enhanced Prompt"):
|
62 |
if topic.strip():
|
|
|
24 |
|
25 |
# Shinobi and Raikage templates
|
26 |
SHINOBI_TEMPLATE = """
|
27 |
+
You are an advanced prompt enhancer designed to refine and expand prompts for clarity, structure, and engagement.
|
28 |
+
Your task is to take a given prompt and improve it using the **Enhanced Primer framework**, ensuring the following:
|
29 |
|
30 |
+
β
**Assign a Role** β Clearly define the user's role to set context.
|
31 |
+
β
**Define a Clear Objective** β Clarify the task and expected outcome.
|
32 |
+
β
**Break Down Content** β Structure the response into key sections with subtopics.
|
33 |
+
β
**Enhance Style & Clarity** β Ensure the response is actionable, practical, and easy to follow.
|
34 |
+
β
**Adapt to Audience Level** β Adjust depth and complexity for different users.
|
35 |
+
β
**Suggest Examples (If Needed)** β Add relevant real-world examples for better understanding.
|
36 |
+
β
**Control Output Format** β Ensure the response aligns with the expected format (list, guide, paragraph, etc.).
|
37 |
+
|
38 |
+
**Enhance the following prompt using this structured approach:**
|
39 |
|
|
|
40 |
**Original Prompt:**
|
41 |
{user_prompt}
|
42 |
|
43 |
+
**Enhanced Prompt:**
|
44 |
+
(Apply the Enhanced Primer framework to generate the improved version)
|
45 |
"""
|
46 |
|
47 |
RAIKAGE_TEMPLATE = """
|
48 |
+
You are an elite-level [role] with deep expertise in [subject].
|
49 |
+
Your task is to develop a structured, high-quality response following these key elements:
|
50 |
+
|
51 |
+
## **Context**
|
52 |
+
[Provide background information related to the task to frame the problem.]
|
53 |
+
|
54 |
+
## **Approach**
|
55 |
+
[Define a **step-by-step** breakdown of how to achieve the goal, focusing on methodology and best practices.]
|
56 |
+
|
57 |
+
## **Response Format**
|
58 |
+
[Specify the expected output structure, ensuring clarity and completeness.]
|
59 |
+
|
60 |
+
## **Instructions**
|
61 |
+
- [Ensure high-quality standards, best practices, and possible constraints.]
|
62 |
+
- [Emphasize documentation, flexibility, and potential edge cases.]
|
63 |
|
64 |
+
Enhance the following prompt using this **structured, expert-level framework:**
|
|
|
|
|
|
|
|
|
|
|
65 |
|
|
|
66 |
**Original Prompt:**
|
67 |
{user_prompt}
|
68 |
|
69 |
+
**Enhanced Prompt:**
|
70 |
+
(Apply the Mastermind framework to generate the improved version)
|
71 |
"""
|
72 |
if st.button("Generate Enhanced Prompt"):
|
73 |
if topic.strip():
|