mirror of
https://github.com/csd4ni3l/debt-by-ai.git
synced 2026-01-01 12:33:44 +01:00
Add defensive mode, and a leaderboard
This commit is contained in:
49
constants.py
49
constants.py
@@ -2,8 +2,25 @@ import re
|
||||
|
||||
AI_NAME = "Adam"
|
||||
|
||||
DEFENSIVE_SCENARIO_PROMPT = """Make a single-sentence situation, where the user got into a high-debt which they need to get out of.
|
||||
YOU, as the assistant, will have to be convinced that they got out of debt, and write a story based on their solution.
|
||||
The action should be something that has happened or started, eg you owe the maffia xy dollars
|
||||
|
||||
REPLY FORMAT:
|
||||
'''
|
||||
Scenario: the situation
|
||||
Debt amount: the debt amount
|
||||
'''
|
||||
|
||||
STRICTLY ONLY REPLY IN THE REPLY FORMAT MENTIONED ABOVE. NO EXCEPTIONS.
|
||||
For Debt amount, the reply MUST be an integer followed immediately by the dollar sign (e.g., 120000$). No commas, spaces, or leading dollar signs are allowed. The final debt must be a credible value based on the story's outcome.
|
||||
Dont think, just reply with the one sentence scenario and the debt amount it would give.
|
||||
"""
|
||||
|
||||
OFFENSIVE_SCENARIO_PROMPT = """
|
||||
Make a single-sentence offer that, if accepted, would immediately put a person into a high-debt situation that is the result of a loan, advance, or immediate liability, which might also involve significant risk (e.g., legal trouble, physical danger, or reputational ruin) that justifies the "Maffia type stuff" implication.
|
||||
IT HAS TO PUT THEM INTO DEBT INSTANTLY, AND IT CAN'T BE SOMETHING THAT IS CIRCUMSTANTIAL OR HAS A CHANCE TO NOT PUT THEM INTO DEBT.
|
||||
IT CAN'T BE THREATENING, SINCE THAT WOULD MEAN AN INSTANT ACCEPTION.
|
||||
|
||||
YOU, as the assistant, will have to be convinced to still do that action, so it MUST be a clear, single-sentence decision that someone can accept or deny.
|
||||
The action can't be something that has already happened or started; it must be an immediate offer or choice.
|
||||
@@ -53,5 +70,37 @@ For Convinced, reply only as **Yes** or **No**.
|
||||
For Final Debt Amount, reply only as an integer followed by `$`.
|
||||
"""
|
||||
|
||||
DEFENSIVE_ANSWER_PROMPT = """
|
||||
You have been presented with a debt-inducing scenario that the user has and the user is attempting to fix that scenario with their input.
|
||||
|
||||
**Your only task is to generate the final response in the specified format.**
|
||||
|
||||
### Story Instructions:
|
||||
1. **Perspective:** Write the story in the **third person**, focusing on the actions, thoughts, and dialogue of the user. The user's input should be the driving force of the conversation/persuasion attempt.
|
||||
2. **No Pre-Story Text:** **DO NOT** write any introductory text, internal monologue about the rules, or discussion of the prompt before the story. Start the reply directly with the story narrative under the `'''` delimiter.
|
||||
|
||||
### Evaluation and Debt Rules:
|
||||
1. **Skepticism:** Be harsh and skeptical about the fix, but don't overdo it. A person should be able to fix their debt with their answer.
|
||||
2. **Final Debt Amount:** The value must be an integer followed immediately by `$`.
|
||||
* If **Convinced: Yes**, the Final Debt Amount should be **atleast** the initial scenario debt, but it can be more, if included in the story.
|
||||
* If **Convinced: No**, the Final Debt Amount must be **0$**, as the user walked away from the deal and incurred no debt.
|
||||
|
||||
Scenario: {scenario}
|
||||
User Input: {user_input}
|
||||
|
||||
Reply Format:
|
||||
'''
|
||||
The story (A detailed narrative of the user's internal struggle and the final decision, written in the third person.)
|
||||
|
||||
EVALUATION:
|
||||
Convinced: Yes/No
|
||||
Final Debt Amount: 0$ or [Higher Amount]$
|
||||
'''
|
||||
|
||||
**STRICTLY ONLY REPLY IN THE REPLY FORMAT MENTIONED ABOVE. NO EXCEPTIONS.**
|
||||
For Convinced, reply only as **Yes** or **No**.
|
||||
For Final Debt Amount, reply only as an integer followed by `$`.
|
||||
"""
|
||||
|
||||
debt_amount_regex = re.compile(r"Debt amount: \d+\$")
|
||||
evaluation_regex = re.compile(r"EVALUATION:\s*\nConvinced: (Yes|No)\s*\nFinal Debt Amount: (\d+\$)")
|
||||
Reference in New Issue
Block a user