From 0bc1feaef01e63118402c5a8cb3c4fff35f56e74 Mon Sep 17 00:00:00 2001 From: Kehang Zhu Date: Tue, 22 Jul 2025 11:22:15 -0400 Subject: [PATCH 1/3] update instrcution and term of service --- .../src/shared/templates/chip_negotiation.ts | 23 +++++++++++-------- functions/src/stages/chip.utils.ts | 4 ++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/frontend/src/shared/templates/chip_negotiation.ts b/frontend/src/shared/templates/chip_negotiation.ts index d40c57628..b230b2311 100644 --- a/frontend/src/shared/templates/chip_negotiation.ts +++ b/frontend/src/shared/templates/chip_negotiation.ts @@ -150,7 +150,7 @@ const CHIP_TOS_STAGE = createTOSStage({ 'Your participation is voluntary, which means you can choose whether or not to participate. You may choose not to participate by exiting the survey at any point. There are no known costs to you for participating in this research study except for your time.', '\n**Contact**', 'Please feel free to contact us through Prolific or your game administrator if you have any questions, concerns, or complaints about this study.', - '\nBy checking the box below and proceeding, you are acknowledging that you are over the age of 18 and that you consent to participate. Clicking the arrow will bring you to the beginning of the task.', + '\nBy checking the box below and proceeding, you are acknowledging that you are over the age of 18 and that you consent to participate. "NEXT STEP" will bring you to the beginning of the task.', ], progress: createStageProgressConfig({ showParticipantProgress: false, @@ -226,7 +226,7 @@ function createChipInfoStage1(numChips: number) { function createChipInfoStage2(numChips: number) { const infoLines = [ - 'You will play this trading game three times against different groups of participants. In each game, you and the other participants will start with:', + 'You will play this trading game three times. In each game, you and the other participants will start with:', ]; // Adjust the chips included based on numChips @@ -287,10 +287,6 @@ function createChipInfoStage2(numChips: number) { ); } - infoLines.push( - "You know your own chip valuation and that everyone values 🟢 green chips the same, at $0.50 per chip. However, you do not know the other players' valuations for the other chips.", - ); - infoLines.push("**Parcipant Knowledge of Others' Valuations:**"); infoLines.push( @@ -513,6 +509,9 @@ const CHIP_INFO_STAGE_GAMEPLAY2 = createInfoStage({ `* Players cannot offer more chips than they currently hold. For example, if you only have 5 🔴 red chips, you cannot offer 6 🔴 red chips.`, `* Players cannot trade chips of the same color. For example, you cannot trade 🔴 red chips for 🔴 red chips.`, '![Example of offering a trade](https://i.imgur.com/Jzah8Ot.png)', + + `\n## !Time limit`, + 'As a reminder, please enter your offer within 1 minute! If you do not enter your offer within 1 minute, the experimenter will send you an attention check.🙂', ], progress: createStageProgressConfig({ showParticipantProgress: false, @@ -544,7 +543,9 @@ const CHIP_INFO_STAGE_GAMEPLAY5 = createInfoStage({ `* AI delegate: In delegation mode, you can delegate your trading decisions to an AI assistant. The AI will take actions on your behalf.`, `* AI advisor: In advisor mode, you can ask an AI assistant to give recommendations on which action to take. The AI will provide suggestions, but you must make the final decision.`, `* AI coach: In coach mode, you can ask an AI assistant for feedback on your actions. The AI will provide coaching, but you must make the final decision.`, - `\nAt each turn, you will have the option of opting into AI assistance or not. You will always have the option to ignore the AI assistance and take actions yourself.`, + `\n At each turn, you will have the option of opting into AI assistance or not. And your choice of opting in will be effective ONLY FOR THAT TURN.`, + `\n You will always have the option to ignore the AI assistance and take actions yourself.`, + `\n NOTE: you will expect to get AI assistance within 30 seconds. And there are small chances that you received the messgae that THE SYSTEM WENT WRONG. If this happens, please just ignore the message and take actions yourself.`, ], progress: createStageProgressConfig({ showParticipantProgress: false, @@ -578,7 +579,7 @@ const CHIP_INFO_STAGE_PAYOUT = createInfoStage({ 'At the end of the study, we will *randomly* pick one of the three negotiation games you played and give you a bonus payment from that game', 'There are two important features to remember about the bonus:', ' * The bonus will be equivalent to how much money you earn through trading *beyond* what you start with.', - ' * If you do not complete both games, you will not receive a bonus payment.', + ' * If you do not complete all three games, you will not receive a bonus payment.', 'In short, you want to make as much money as you can through trading!', ], progress: createStageProgressConfig({ @@ -905,7 +906,8 @@ const COACH_MODE_INSTRUCTION = createInfoStage({ '', '**• Your choice:** At each turn, you input your move. You can then either submit the move directly or ask the coach for feedback on your idea.', "**• How the coach works:** First, input the action you plan to take, then click the “Coach” button if you'd like feedback from the AI agent. The agent will provide a one-time analysis to help you strengthen your approach.", - '**• Next step:** After receiving feedback, you can revise your action before sending. You always have final control over what you send.', + '**• Next step:** After receiving feedback, you can revise your action before sending.', + '**• NOTE:** You need to make the final decision by clicking the "Send" button.', '', 'Here’s how the AI coach might help you with the proposal:', '![Example of receiving an offer](https://i.imgur.com/YTluFKf.png)', @@ -923,6 +925,7 @@ const ADVISOR_MODE_INSTRUCTION = createInfoStage({ '**• Your choice:** At each turn, you can either make your move directly or first ask the advisor for a recommendation.', '**• How the advisor works:** If you ask for advice, the advisor will suggest a move and provide the strategic rationale behind it.', "**• Next step:** After seeing the recommendation, you can either accept the agent's move or ignore it and enter your own action.", + '**• NOTE:** You need to make the final decision by clicking the "Send" button.', '', 'Here’s how the AI advisor might give suggestions on the proposal:', '![Example of receiving an offer](https://i.imgur.com/HyluDin.png)', @@ -1310,4 +1313,4 @@ const CHIP_DELEGATE_FEEDBACK_STAGE = createSurveyStage({ 'Please share any additional context on your answers. How did you decide to use (or not use) the coach? What did you think of the quality or usefulness of its suggestions?', }), ], -}); +}); \ No newline at end of file diff --git a/functions/src/stages/chip.utils.ts b/functions/src/stages/chip.utils.ts index 60f8766fc..d29d65bbc 100644 --- a/functions/src/stages/chip.utils.ts +++ b/functions/src/stages/chip.utils.ts @@ -623,7 +623,7 @@ export async function getChipOfferAssistance( const callModelWithRetries = async ( prompt: string, structuredOutputConfig: StructuredOutputConfig, - maxRetries = 2, + maxRetries = 3, ): Promise => { let lastError: object; const basePrompt = prompt; // Store original prompt @@ -831,7 +831,7 @@ export async function getChipResponseAssistance( const callModelWithRetries = async ( prompt: string, structuredOutputConfig: StructuredOutputConfig, - maxRetries = 2, + maxRetries = 3, ): Promise => { let lastError: object; const basePrompt = prompt; // Store original prompt From 26f05dff085bcb36c5f2e14ae95911ccfa66506a Mon Sep 17 00:00:00 2001 From: Kehang Zhu Date: Tue, 22 Jul 2025 11:35:17 -0400 Subject: [PATCH 2/3] update feedback prompt --- utils/src/stages/chip_stage.prompts.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/src/stages/chip_stage.prompts.ts b/utils/src/stages/chip_stage.prompts.ts index 3f1d5e408..032a661a5 100644 --- a/utils/src/stages/chip_stage.prompts.ts +++ b/utils/src/stages/chip_stage.prompts.ts @@ -462,6 +462,10 @@ You have an offer: ${offer} Here is the player's initial proposal: ${responseIdea ? 'Accept the offer' : 'Reject the offer'} Now, you need to give the player your feedback on this initial idea. +## Good Feedback Examples +1. Your current offer is profitable. But Player XXX appears to value blue chips more than you do. You may want to consider trading blue chips for other colors. +2. There is only 1 round left. You may want to consider increasing the quantity of chips you are offering. + ${printSchema(CHIP_RESPONSE_ASSISTANCE_COACH_STRUCTURED_OUTPUT_CONFIG.schema!)} `; } From 56f044a03594927df0878ba4af31e7cb78ef29ce Mon Sep 17 00:00:00 2001 From: Kehang Zhu Date: Tue, 22 Jul 2025 11:44:33 -0400 Subject: [PATCH 3/3] revert Michael's change in format --- utils/src/stages/chip_stage.prompts.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/utils/src/stages/chip_stage.prompts.ts b/utils/src/stages/chip_stage.prompts.ts index 032a661a5..c1e6adbc6 100644 --- a/utils/src/stages/chip_stage.prompts.ts +++ b/utils/src/stages/chip_stage.prompts.ts @@ -2,7 +2,6 @@ import {UnifiedTimestamp} from '../shared'; import { StructuredOutputConfig, StructuredOutputDataType, - StructuredOutputType, createStructuredOutputConfig, printSchema, } from '../structured_output'; @@ -71,7 +70,6 @@ export const CHIP_OFFER_ASSISTANCE_DELEGATE_PROMPT = /** Chip offer assistance structured output. */ export const CHIP_OFFER_ASSISTANCE_STRUCTURED_OUTPUT_CONFIG = createStructuredOutputConfig({ - type: StructuredOutputType.JSON_SCHEMA, schema: { type: StructuredOutputDataType.OBJECT, properties: [ @@ -199,7 +197,6 @@ ${printSchema(CHIP_OFFER_ASSISTANCE_STRUCTURED_OUTPUT_CONFIG.schema!)} /** Chip offer assistance advisor structured output. */ export const CHIP_OFFER_ASSISTANCE_ADVISOR_STRUCTURED_OUTPUT_CONFIG = createStructuredOutputConfig({ - type: StructuredOutputType.JSON_SCHEMA, schema: { type: StructuredOutputDataType.OBJECT, properties: [ @@ -326,7 +323,6 @@ ${printSchema(CHIP_OFFER_ASSISTANCE_ADVISOR_STRUCTURED_OUTPUT_CONFIG.schema!)} export const CHIP_RESPONSE_ASSISTANCE_COACH_STRUCTURED_OUTPUT_CONFIG = createStructuredOutputConfig({ - type: StructuredOutputType.JSON_SCHEMA, schema: { type: StructuredOutputDataType.OBJECT, properties: [ @@ -360,7 +356,6 @@ export const CHIP_RESPONSE_ASSISTANCE_COACH_STRUCTURED_OUTPUT_CONFIG = /** Chip response assistance structured output. */ export const CHIP_RESPONSE_ASSISTANCE_ADVISOR_STRUCTURED_OUTPUT_CONFIG = createStructuredOutputConfig({ - type: StructuredOutputType.JSON_SCHEMA, schema: { type: StructuredOutputDataType.OBJECT, properties: [