Skip to content

Commit 0b84709

Browse files
TPLin22WinstonLiyt
andauthored
feat: update prompt to improve json respond format of some LLM models (#928)
* update prompt to improve json respond format of some LLM models * fix * fix --------- Co-authored-by: WinstonLiyte <[email protected]>
1 parent fd39a94 commit 0b84709

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

rdagent/components/coder/factor_coder/prompts.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ evolving_strategy_factor_implementation_v1_system: |-
4949
5050
Your must write your code based on your former latest attempt below which consists of your former code and code feedback, you should read the former attempt carefully and must not modify the right part of your former code.
5151
52+
Notice that you should not add any other text before or after the json format.
53+
5254
{% if queried_former_failed_knowledge|length != 0 %}
5355
--------------Your former latest attempt:---------------
5456
=====Code to the former implementation=====
@@ -188,7 +190,7 @@ evaluator_final_decision_v1_system: |-
188190
The implementation final decision is considered in the following logic:
189191
1. If the value and the ground truth value are exactly the same under a small tolerance, the implementation is considered correct.
190192
2. If the value and the ground truth value have a high correlation on ic or rank ic, the implementation is considered correct.
191-
3. If no ground truth value is provided, the implementation is considered correct if the code executes successfully (assuming the data provided is correct). Any exceptions, including those actively raised, are considered faults of the code. Additionally, the code feedback must align with the scenario and factor description.
193+
3. If no ground truth value is provided, the implementation is considered correct if the code executes successfully (assuming the data provided is correct). Any exceptions, including those actively raised, are considered faults of the code. Additionally, the code feedback must align with the scenario and factor description. The implementation cannot be considered correct if the code execution failed, no matter what the reason is.
192194
193195
Please response the critic in the json format. Here is an example structure for the JSON output, please strictly follow the format:
194196
{

rdagent/scenarios/qlib/prompts.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ factor_hypothesis_specification: |-
109109
- If optimizing a specific type of factor, proceed from simple to complex.
110110
5. Note
111111
- Highlight that factors surpassing SOTA are included in the library to avoid re-implementation.
112+
- No matter how many factors you plan to generate, only reply with one set of hypothesis and reason. The hypothesis can include the proposal of multiple factors at the same time.
112113
113114
factor_experiment_output_format: |-
114115
The output should follow JSON format. The schema is as follows:

0 commit comments

Comments
 (0)