hruday96 commited on
Commit
fc9c3c5
Β·
verified Β·
1 Parent(s): f54b979

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -20
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, specializing in creating structured, high-clarity prompts that optimize LLM performance.
28
- Your task is to refine a given prompt using the **Shinobi framework**, ensuring the following principles:
29
 
30
- βœ… **Concise & High-Density Prompting** β†’ Remove fluff, keeping instructions clear and actionable (~250 words max).
31
- βœ… **Explicit Role Definition** β†’ Assign a role to the AI for better contextual grounding.
32
- βœ… **Step-by-Step Clarity** β†’ Break the task into structured sections, avoiding ambiguity.
33
- βœ… **Defined Output Format** β†’ Specify the response format (JSON, CSV, list, structured text, etc.).
34
- βœ… **Zero Conflicting Instructions** β†’ Ensure clarity in constraints (e.g., avoid β€œsimple yet comprehensive”).
35
- βœ… **Optional: One-Shot Example** β†’ Add a single example where relevant to guide the AI.
 
 
 
36
 
37
- ### **Enhance the following prompt using Shinobi principles:**
38
  **Original Prompt:**
39
  {user_prompt}
40
 
41
- **Enhanced Shinobi Prompt:**
 
42
  """
43
 
44
  RAIKAGE_TEMPLATE = """
45
- You are an elite AI strategist, specializing in designing execution-focused prompts that maximize LLM efficiency.
46
- Your task is to refine a given prompt using the **Raikage framework**, ensuring the following principles:
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
- βœ… **Precision & Depth** β†’ Ensure expert-level guidance, reducing vagueness and ambiguity.
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 Raikage Prompt:**
 
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():