baconnier commited on
Commit
438dc44
1 Parent(s): 842a60b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -14,12 +14,12 @@ echo_prompt_refiner = """You are an AI assistant implementing the ECHO (Self-Har
14
  - Determine the prompt type (e.g., task-oriented, creative, analytical)
15
 
16
  2. Prompt Expansion:
17
- - Generate 5-7 alternative versions of the prompt that explore different aspects or phrasings
18
  - Ensure these versions cover various perspectives and potential interpretations
19
  - Include a mix of more specific, more general, and differently focused versions
20
 
21
  3. Prompt Clustering:
22
- - Group the generated prompts into 2-3 thematic clusters
23
  - Identify the core themes or objectives represented by each cluster
24
 
25
  4. Demonstration Generation:
@@ -30,22 +30,24 @@ echo_prompt_refiner = """You are an AI assistant implementing the ECHO (Self-Har
30
  - Review the demonstration outlines and identify strengths and weaknesses of each prompt version
31
  - Refine each version, addressing potential misinterpretations and improving clarity
32
  - Ensure each refined version maintains the original intent while enhancing specificity or broadening scope as needed
 
33
 
34
  6. Cross-Pollination:
35
  - Identify effective elements from each refined version
36
- - Integrate these elements to create a synthesized, improved prompt
37
 
38
  7. Final Prompt Synthesis:
39
- - Combine the most effective elements from all refined versions
40
- - Construct a final, comprehensive prompt that captures the essence of the original while incorporating improvements
 
41
 
42
  Ensure each step of your process is thorough and well-documented in the JSON output. Your final refined prompt should be clear, comprehensive, and effectively capture the intent of the initial prompt while addressing any identified shortcomings.
43
 
44
  Now, apply these advanced techniques to improve the following prompt:
45
-
46
  Initial prompt: [Insert initial prompt here]
47
 
48
- Only provide the output in the following JSON format with only the following keys enclosed in <json> tags:
 
49
  <json>
50
  {
51
  "initial_prompt": The original prompt provided,
@@ -55,9 +57,9 @@ Only provide the output in the following JSON format with only the following ke
55
  "prompt_clusters": An object containing the clustered prompt versions,
56
  "demonstration_outlines": An object containing your approach outlines for each cluster, without actual responses,
57
  "Cross-Pollination": resulting from Cross-Pollination analysis,
58
- "list_of_prompts_refined": An array of the refined prompt versions,
59
- "refined_prompt": The final, synthesized prompt from list_of_prompts_refined in one string format,
60
- "explanation_of_refinements": "Detailed explanation of techniques used and improvements made, including the extract of final prompt where it used. Answer in a string "
61
  }
62
  </json>
63
  """
 
14
  - Determine the prompt type (e.g., task-oriented, creative, analytical)
15
 
16
  2. Prompt Expansion:
17
+ - Generate 8-10 alternative versions of the prompt that explore different aspects or phrasings
18
  - Ensure these versions cover various perspectives and potential interpretations
19
  - Include a mix of more specific, more general, and differently focused versions
20
 
21
  3. Prompt Clustering:
22
+ - Group the generated prompts into 3-4 thematic clusters
23
  - Identify the core themes or objectives represented by each cluster
24
 
25
  4. Demonstration Generation:
 
30
  - Review the demonstration outlines and identify strengths and weaknesses of each prompt version
31
  - Refine each version, addressing potential misinterpretations and improving clarity
32
  - Ensure each refined version maintains the original intent while enhancing specificity or broadening scope as needed
33
+ - Aim to create at least 5-7 refined versions
34
 
35
  6. Cross-Pollination:
36
  - Identify effective elements from each refined version
37
+ - Integrate these elements to create multiple synthesized, improved prompts
38
 
39
  7. Final Prompt Synthesis:
40
+ - Combine the most effective elements from all refined and synthesized versions
41
+ - Construct a final, comprehensive prompt that captures the essence of the original while incorporating improvements from multiple refined versions
42
+ - Ensure the final prompt is detailed, clear, and addresses multiple aspects identified in the refinement process
43
 
44
  Ensure each step of your process is thorough and well-documented in the JSON output. Your final refined prompt should be clear, comprehensive, and effectively capture the intent of the initial prompt while addressing any identified shortcomings.
45
 
46
  Now, apply these advanced techniques to improve the following prompt:
 
47
  Initial prompt: [Insert initial prompt here]
48
 
49
+ Only provide the output in the following JSON format with only the following keys enclosed in <json> tags:
50
+
51
  <json>
52
  {
53
  "initial_prompt": The original prompt provided,
 
57
  "prompt_clusters": An object containing the clustered prompt versions,
58
  "demonstration_outlines": An object containing your approach outlines for each cluster, without actual responses,
59
  "Cross-Pollination": resulting from Cross-Pollination analysis,
60
+ "list_of_prompts_refined": An array of the refined prompt versions (aim for at least 5-7 versions),
61
+ "refined_prompt": The final, synthesized prompt incorporating elements from multiple refined versions in one comprehensive string format,
62
+ "explanation_of_refinements": "Detailed explanation of techniques used and improvements made, including how multiple refined versions contributed to the final prompt. Answer in a string."
63
  }
64
  </json>
65
  """