darthPanda commited on
Commit
46e5b5f
β€’
1 Parent(s): c72269c

updated stage 7

Browse files
Files changed (2) hide show
  1. judge.py +1 -1
  2. prompts/judgement_stage_prompts.py +19 -9
judge.py CHANGED
@@ -524,7 +524,7 @@ class Judge():
524
  # prompt = self.lawsuit_facts + self.response_facts + \
525
  # self.claimant_response_to_defendant_facts + self.defendant_response_to_claimant_clarification_facts + \
526
  # self.case_fable + self.stage_6_ideal_model + gpt_prompt
527
- prompt = self.claimant_facts_and_evidence + self.case_fable + self.stage_6_ideal_model + "\n\nPrompt:" + gpt_prompt
528
 
529
  response = self.llm_function_call(prompt, "gpt-4-0125-preview")
530
  # response = self.llm_function_call(prompt, "mistral-large-azure")
 
524
  # prompt = self.lawsuit_facts + self.response_facts + \
525
  # self.claimant_response_to_defendant_facts + self.defendant_response_to_claimant_clarification_facts + \
526
  # self.case_fable + self.stage_6_ideal_model + gpt_prompt
527
+ prompt = self.claimant_facts_and_evidence + self.claim_extracted_text + self.defendant_extracted_text + self.claimant_response_extracted_text + self.defendant_response_extracted_text + self.case_fable + self.stage_6_ideal_model + "\n\nPrompt:" + gpt_prompt
528
 
529
  response = self.llm_function_call(prompt, "gpt-4-0125-preview")
530
  # response = self.llm_function_call(prompt, "mistral-large-azure")
prompts/judgement_stage_prompts.py CHANGED
@@ -387,9 +387,9 @@ chronology...
387
  """
388
 
389
  stage_7_prompt = """
390
- Above is facts extracted from lawsuit claim filed by claimant, case fable of the case and ideal model behaviour.
391
 
392
- case fable and ideal model behaviour were construdted at earlier stages and are written above.
393
  You are a legal assistant assigned to give judgement on the above matter.
394
  Proceed with the following steps
395
  Read it carefully
@@ -450,14 +450,25 @@ At the same time, it should be established what amount of expenses the Defendant
450
  2.2.2.2.3.2.2 Then compare X1 and X2
451
  If X1 β‰₯ X2, then the violation is recognized as significant and the claim is fully satisfied.
452
  If X1 ≀ X2, then the violation is recognized as insignificant and it is considered according to item 1.4.1.
453
- 3.1 Based on the analysis of all deviations, considering their impact on the contract (the legal relationship between the parties) and the actual ability to calculate the amount of damage from such deviations by the Defendant, a reasoned decision must be made:
454
- If the amount of damage from the deviations can be calculated in a fixed monetary equivalent (based on evidence), then the total amount of money awarded to the Claimant will be equal to the sum of damages from all the Defendant's deviations (as determined in earlier stages), but not exceeding the claim amount.
455
- If the Defendant's deviation affects the purpose of the contract (or the legal relationship) and the damage from it cannot be quantitatively calculated in a fixed monetary equivalent, then the claim should be fully satisfied.
456
- If the Defendant's deviations do not affect the purpose of the contract (or the legal relationships) and the damage from them cannot be quantitatively calculated in a fixed monetary equivalent, then the claim should be denied.
457
- The final decision must contain the exact monetary amount of satisfied claims (or specific indication of a prohibition on actions, if such a claim was made by the Claimant), and under no circumstances should a decision be issued indicating a percentage of the claim requirements.
 
 
 
 
 
 
 
 
 
 
 
458
  3.2. When determining the issue of penalty sanctions (penalties, fines, or other penalties) (only in the part of penalty sanctions, not any other claims), it is necessary to establish the good faith or bad faith of the Plaintiff according to the following algorithm.
459
  3.2.1. Identify all deviations and analyze causal relationships:
460
- β€’ Let 𝐷=(𝑑1,𝑑2,…,𝑑𝑛)D=(d1​,d2​,…,dn) be the set of all deviations from the ideal behavior.
461
  β€’ Define the causality matrix 𝐢C, where element 𝐢𝑖𝑗=1Cij​=1 if deviation 𝑑𝑖di​ caused deviation 𝑑𝑗dj​, and 𝐢𝑖𝑗=0Cij​=0 otherwise.
462
  3.2.2. Determine the initial deviation:
463
  β€’ Define the initial deviation indicator 𝐼(𝑑)I(d), where 𝐼(𝑑𝑖)=1I(di​)=1 if 𝑑𝑖di​ is an initial deviation, and 𝐼(𝑑𝑖)=0I(di​)=0 otherwise.
@@ -483,7 +494,6 @@ Please note that if there are grounds for partial doubling of the claim, but it
483
  Any partial satisfaction, or must specify a specific amount that is clearly indicated in one of the parties' evidence (e.g. expert report, payment order), if it is objectively impossible to determine the exact amount from the available evidence (then the Claimant's monetary claim cannot be doubled).
484
  3.6 Prepare the final full decision according to the following structure.
485
 
486
-
487
  Output should not have any starting greeting or ending goodbyes.
488
  Prepare the final full decision according to the following structure.
489
  # Judgement
 
387
  """
388
 
389
  stage_7_prompt = """
390
+ Above is facts extracted from lawsuit claim filed by claimant, text extracted from lawsuit claim by claimant, text extracted from defendant response, text extracted from clarifications from claimant, text extracted from clarification from defendant, case fable of the case and ideal model behaviour.
391
 
392
+ case fable and ideal model behaviour were constructed at earlier stages and are written above.
393
  You are a legal assistant assigned to give judgement on the above matter.
394
  Proceed with the following steps
395
  Read it carefully
 
450
  2.2.2.2.3.2.2 Then compare X1 and X2
451
  If X1 β‰₯ X2, then the violation is recognized as significant and the claim is fully satisfied.
452
  If X1 ≀ X2, then the violation is recognized as insignificant and it is considered according to item 1.4.1.
453
+ 3.1 Based on the analysis of all deviations, considering their impact on the contract (the legal relations between parties) and the actual possibility to calculate the damage from these deviations by the Defendant, a reasoned decision must be made:
454
+ 3.1.1 If the extent of the damage from the deviations can be calculated in a fixed monetary equivalent (based on evidence), the total amount of monetary compensation awarded to the Claimant will equal the sum of the damages from all of the Defendant's deviations (as determined in facts extracted from defendant response to lawsuit), but not exceeding the claim amount.
455
+ 3.1.1.1 Determining the damage is Above is facts extracted from lawsuit claim filed by claimant, case fable of the case and ideal model behaviour.
456
+
457
+ case fable and ideal model behaviour were construdted at earlier stages and are written above.
458
+ You are a legal assistant assigned to give judgement on the above matter.
459
+ Proceed with the following steps
460
+ Read it carefullya crucial point: the damage must be precisely verified by the existing case materials: a specific amount must be indicated, which is clearly stated in one of the party's evidence (e.g., expert opinion, payment order). If it is objectively impossible to determine the exact amount from the existing evidence, and it does not affect the goal of the contract/legal relations, such deviation should not be considered.
461
+ 3.1.2 If the Defendant’s evasion impacts the goal of the contract (or legal relations) and the damage from it cannot be quantitatively calculated in a fixed monetary equivalent, then the claim should be fully satisfied.
462
+ 3.1.2.1 The term "goal of the contract" (or "goal of legal relations") refers to the main task or outcome that the parties aim to achieve as a result of signing the contract. This term denotes the ultimate goal toward which the actions and obligations of the parties are directed within the contract.
463
+ The goal of the contract is determined through the analysis of the contract text and key terms that distinguish this type of contract from others. This helps the parties understand the expectations and obligations they undertake by signing the contract, and the characteristics inherent to this type of legal relations.
464
+ For example, in the case of a contract for the sale of used goods, the goal of the contract is the acquisition of goods with signs of natural wear. The main condition of such a contract is to ensure the possibility for the buyer to inspect the goods before purchasing, which is a key element in forming the expectations and obligations of the parties. This condition distinguishes the contract for the sale of used goods from a contract for the sale of new goods, where it is assumed that there are no defects and it is not necessary for the buyer to inspect the goods before purchase.
465
+ 3.1.2.2. When determining the extent of a deviation's impact on the goal of the contract, it is important to consider the facts established in the actual storyline of the case; thus, the influence of the deviation on the goal of the contract should or should not take place under the existing factual conditions. For instance, in a deviation, the defendant did not refuse to accept the claimant's work with motivation, but the existing storyline of the case does not confirm that the claimant performed the work. Therefore, such a deviation does not affect the goal of the contract.
466
+ In this aspect, it is important to identify the entire chain of rights that lead to affecting the goal of the contract. For example, the absence of a motivated refusal by the defendant to accept the claimant's work affects the goal of the contract if it is confirmed that the claimant performed the work, completed it in the stated volume and quality. For this, connect all previously established facts into chains that form the goal of the contract.
467
+ 3.1.3. If the defendant's deviations do not impact the goal of the contract (or legal relations) and the damage from them cannot be quantitatively calculated in a fixed monetary equivalent, the claim should be denied.
468
+ The final decision must contain the precise monetary amount of the satisfied claims (or a specific indication of the prohibition of actions if such a request was made by the Claimant), and under no circumstances should a decision be issued indicating the percentage ratio of the claim requirements.
469
  3.2. When determining the issue of penalty sanctions (penalties, fines, or other penalties) (only in the part of penalty sanctions, not any other claims), it is necessary to establish the good faith or bad faith of the Plaintiff according to the following algorithm.
470
  3.2.1. Identify all deviations and analyze causal relationships:
471
+ β€’ Let 𝐷={𝑑1,𝑑2,…,𝑑𝑛}D={d1​,d2​,…,dn​} be the set of all deviations from the ideal behavior.
472
  β€’ Define the causality matrix 𝐢C, where element 𝐢𝑖𝑗=1Cij​=1 if deviation 𝑑𝑖di​ caused deviation 𝑑𝑗dj​, and 𝐢𝑖𝑗=0Cij​=0 otherwise.
473
  3.2.2. Determine the initial deviation:
474
  β€’ Define the initial deviation indicator 𝐼(𝑑)I(d), where 𝐼(𝑑𝑖)=1I(di​)=1 if 𝑑𝑖di​ is an initial deviation, and 𝐼(𝑑𝑖)=0I(di​)=0 otherwise.
 
494
  Any partial satisfaction, or must specify a specific amount that is clearly indicated in one of the parties' evidence (e.g. expert report, payment order), if it is objectively impossible to determine the exact amount from the available evidence (then the Claimant's monetary claim cannot be doubled).
495
  3.6 Prepare the final full decision according to the following structure.
496
 
 
497
  Output should not have any starting greeting or ending goodbyes.
498
  Prepare the final full decision according to the following structure.
499
  # Judgement