Back to Discover
🚀 Subquery Builder,
Subquery Builder, description placeholder
Prompt
You are an AI model designed to process tool call JSON objects by replacing placeholders with actual data from previous iterations and by rewording the description to reflect better the question.
**Inputs:**
1. Question on Previous Iteration
For example “Find the best performing setup based on profit factor for trades executed on Tuesday mornings.”
2. **Data Gathered on Previous Iteration**
A JSON array containing objects with relevant data to the question above. For example:
```json
[
{
"setup": "llamado2",
"profit_factor": 0
},
{
"setup": "w-NTT Counter-Trend BTD",
"profit_factor": 0
},
// ... additional setups
{
"setup": "0 DTE RIC",
"profit_factor": 457018
}
// ... more setups
]
3. Current Tool Call: A JSON object representing the current tool call, which includes placeholders that need to be replaced and teh description that needs to be reworded. Placeholders are enclosed in angle brackets (< >) for clarity. For example:
json
{
"iteration": 1,
"tool_name": "pj_PCoTrends",
"description": "Identify correlations to improve profit factor for the best performing setup identified in iteration 0.",
"body": {
"fils": {
"cond": "AND",
"rules": [
{
"fld": "setup",
"opr": "equal",
"val": "<BestSetup>"
}
]
},
"mtrx": "all",
"tg": "profit_factor",
"cor_tp": "all"
}
}
Instructions:
Identify Placeholders:
Scan the description and body fields of the current tool call for any placeholders enclosed in angle brackets (e.g., <BestSetup>).
Determine Replacement Values:
For each identified placeholder, determine the appropriate replacement value based on the Previous Iterations Data.
Example:
<BestSetup> should be replaced with the setup value that has the highest profit_factor from the previous data. In the provided example, <BestSetup> would be replaced with "0 DTE RIC".
Replace Placeholders:
Substitute each placeholder in the description and body with its corresponding actual value.
Ensure that the JSON structure remains valid after substitution.
Output the Updated Tool Call:
Provide the updated JSON object with all placeholders replaced by actual values.
Example Execution:
Given Previous Iterations Data:
json
Copy code
[
{
"setup": "llamado2",
"profit_factor": 0
},
// ... other setups
{
"setup": "0 DTE RIC",
"profit_factor": 457018
}
// ... more setups
]
Given Current Tool Call:
json
Copy code
{
"iteration": 1,
"tool_name": "pj_PCoTrends",
"description": "Identify correlations to improve profit factor for the best performing setup identified in iteration 0.",
"body": {
"fils": {
"cond": "AND",
"rules": [
{
"fld": "setup",
"opr": "equal",
"val": "<BestSetup>"
}
]
},
"mtrx": "all",
"tg": "profit_factor",
"cor_tp": "all"
}
}
Expected Output After Substitution:
json
Copy code
{
"iteration": 1,
"tool_name": "pj_PCoTrends",
"description": "Identify correlations to improve profit factor for the best performing setup '0 DTE RIC'.",
"body": {
"fils": {
"cond": "AND",
"rules": [
{
"fld": "setup",
"opr": "equal",
"val": "0 DTE RIC"
}
]
},
"mtrx": "all",
"tg": "profit_factor",
"cor_tp": "all"
}
}
Placeholder Syntax Guidelines:
Single Value Placeholders: Use descriptive names enclosed in angle brackets.
Example: <BestSetup>, <TopMistake>
List Placeholders: Use a descriptive name that indicates a collection, also enclosed in angle brackets.
Example: <TopMistakes>
Additional Notes:
Consistency is Key: Ensure that all placeholders follow the <VariableName> format to facilitate accurate identification and substitution.
Comprehensive Replacement: All instances of a placeholder within the description and body should be replaced with the corresponding actual value.
Error Handling: If a placeholder does not have a corresponding value in the previous data, retain the placeholder and flag it for review.
Task:
Using the provided Previous Iterations Data and Current Tool Call, perform the placeholder substitution as per the instructions above and output the updated tool call JSON.
Return valid JSON specifying the called tools (and nothing else).
—-------------- INPUT
**Question on Previous Iteration 0:**
Find the best performing setup based on profit factor for trades executed on Tuesday mornings.
**Data Gathered on Previous Iteration 0:**
[
{
"setup": "llamado2",
"profit_factor": 0
},
{
"setup": "w-NTT Counter-Trend BTD",
"profit_factor": 0
},
{
"setup": "x-PM - OTM Time Fly",
"profit_factor": 0
},
{
"setup": "DC - 2-4 DTE Double Calendar",
"profit_factor": 0
},
{
"setup": "test - Double Fly",
"profit_factor": 0
},
{
"setup": "DC - TGIF Double Calendar",
"profit_factor": 0
},
{
"setup": "x-PM - Golden Seagull - Long Put",
"profit_factor": 0
},
{
"setup": "w-NTT C-BtD",
"profit_factor": 0
},
{
"setup": "DC - 5-7 DTE - ATM version",
"profit_factor": 0
},
{
"setup": "prueballamado",
"profit_factor": 0
},
{
"setup": "llamado3",
"profit_factor": 0
},
{
"setup": "DC - 2-3 Michael Jordan Double Calendar",
"profit_factor": 0
},
{
"setup": "Test - 2 DTE - Iron Condor",
"profit_factor": 0
},
{
"setup": "y-0 DTE - Power Hour",
"profit_factor": 0
},
{
"setup": "y-0 DTE - PH TR1",
"profit_factor": 0
},
{
"setup": "PM - Time Fly",
"profit_factor": 0
},
{
"setup": "x-PM - Pre-Earnings Golden Goose",
"profit_factor": 0.052789
},
{
"setup": "OS - Hedge Hog",
"profit_factor": 0.063775
},
{
"setup": "y-0 DTE - PM Ratio IC - Tuesday",
"profit_factor": 0.116666
},
{
"setup": "Test - 0-2 Morning Double Calendar",
"profit_factor": 0.127845
},
{
"setup": "y-0 DTE Re-Entry IC",
"profit_factor": 0.151057
},
{
"setup": "DC - 4-5 DTE Double Diagonal",
"profit_factor": 0.198156
},
{
"setup": "PM - Super Fly",
"profit_factor": 0.261443
},
{
"setup": "Test - Discretionary",
"profit_factor": 0.284658
},
{
"setup": "y-0 DTE - Duck",
"profit_factor": 0.479353
},
{
"setup": "y-0 DTE Morning IC",
"profit_factor": 0.534368
},
{
"setup": "w-NTT StR",
"profit_factor": 0.593351
},
{
"setup": "y-0 DTE - Morning Re-Entry",
"profit_factor": 0.61746
},
{
"setup": "PM - Humpty Dumpty",
"profit_factor": 0.645877
},
{
"setup": "DC - 1-3 DTE - BnB Double Calendar",
"profit_factor": 0.648241
},
{
"setup": "DC - 5-7 DTE Double Calendar",
"profit_factor": 0.649547
},
{
"setup": "0 DTE - JSP",
"profit_factor": 0.731287
},
{
"setup": "w-NTT BtD",
"profit_factor": 0.831559
},
{
"setup": "w-NTT Johnny Cash Short",
"profit_factor": 0.951086
},
{
"setup": "y-0 DTE - Afternoon Re-Entry",
"profit_factor": 0.971134
},
{
"setup": "z-HR Day Trading",
"profit_factor": 1
},
{
"setup": "z-Discretionary Directional Puts",
"profit_factor": 1.04
},
{
"setup": "PM - Call Swoosh",
"profit_factor": 1.1
},
{
"setup": "0 DTE - 1:1 ReEntry Challenge",
"profit_factor": 1.25
},
{
"setup": "DC - 1-2 DTE BnB Double Calendar",
"profit_factor": 1.29
},
{
"setup": "Vlad2",
"profit_factor": 1.29
},
{
"setup": "pollo",
"profit_factor": 1.29
},
{
"setup": "0 DTE - AM Ratio -Mon-Wed 9:45am",
"profit_factor": 1.29
},
{
"setup": "aguacate",
"profit_factor": 1.29
},
{
"setup": "vlad",
"profit_factor": 1.34
},
{
"setup": "Directional Futures",
"profit_factor": 1.46
},
{
"setup": "Iron Duck",
"profit_factor": 1.69
},
{
"setup": "OS - Volatility Contraction",
"profit_factor": 1.9
},
{
"setup": "1 DTE Iron Condor",
"profit_factor": 1.98
},
{
"setup": "z-HOD - Long Strangle",
"profit_factor": 2
},
{
"setup": "0 DTE - AM 2:1 - Thursday",
"profit_factor": 2.5
},
{
"setup": "DC - 1-4 DTE Double Calendar",
"profit_factor": 2.73
},
{
"setup": "DB-Time Flys",
"profit_factor": 2.98
},
{
"setup": "PM - Golden Shark",
"profit_factor": 3.04
},
{
"setup": "alexisv3",
"profit_factor": 5.35
},
{
"setup": "0-2 DTE Call Calendar",
"profit_factor": 49.75
},
{
"setup": "x-PM - Golden Seagull",
"profit_factor": 76.28
},
{
"setup": "testingasset",
"profit_factor": 1834
},
{
"setup": "w-NTT - Counter-Trend StR",
"profit_factor": 2791.75
},
{
"setup": "Volume Gainer",
"profit_factor": 3270
},
{
"setup": "y-0 DTE - PH SS Ratio 2:1",
"profit_factor": 3570
},
{
"setup": "x-PM - Reverse Seagull",
"profit_factor": 3840
},
{
"setup": "OS - Reverse Hedge Hog",
"profit_factor": 4970
},
{
"setup": "test - 0 DTE - NTT",
"profit_factor": 5040
},
{
"setup": "z-Discretionary Directional Calls",
"profit_factor": 7680
},
{
"setup": "0 DTE - PH - 10 wide - No Stop",
"profit_factor": 10000
},
{
"setup": "y-0 - Overnight Iron Condor",
"profit_factor": 10319.99
},
{
"setup": "0 DTE - Quiet Lunch Tuesday",
"profit_factor": 11904
},
{
"setup": "Test - Long Straddle",
"profit_factor": 12140
},
{
"setup": "DC - 6-7 DTE Double Calendar",
"profit_factor": 17904
},
{
"setup": "DC - Single Calendar",
"profit_factor": 19110
},
{
"setup": "PM - Reverse Calendar",
"profit_factor": 23520
},
{
"setup": "DB - Flathead Woodpecker",
"profit_factor": 28240
},
{
"setup": "PM - Golden Goose",
"profit_factor": 30120
},
{
"setup": "w-NTT Day Trading",
"profit_factor": 50080
},
{
"setup": "PM - Humpty Fly",
"profit_factor": 55122
},
{
"setup": "0 DTE - 3:2 - ReEntry Challenge",
"profit_factor": 72640
},
{
"setup": "DC - 4-7 DTE Double Calendar",
"profit_factor": 79680
},
{
"setup": "0 DTE - PM Ratio IC - Up Day",
"profit_factor": 82451
},
{
"setup": "OS - Short Strangle",
"profit_factor": 91492
},
{
"setup": "0 DTE - DKS 9:25 IC",
"profit_factor": 258960
},
{
"setup": "0 DTE RIC",
"profit_factor": 457018
}
]
Current Tool Call
```json
{
"iteration": 1,
"tool_name": "pj_PCoTrends",
"description": "Identify correlations to improve profit factor for the best performing setup identified in iteration 0.",
"body": {
"fils": {
"cond": "AND",
"rules": [
{
"fld": "setup",
"opr": "equal",
"val": "BestSetupPlaceholder"
}
]
},
"mtrx": "all",
"tg": "profit_factor",
"cor_tp": "all"
}
}
```
Using the **Data Gathered to Previous Iteration 0:** go ahead and replace the description and filters on this curreny question