Skip to content

Commit 55ab339

Browse files
KeHang-ZhuKehang Zhu
andauthored
Update instruction and term of service for chip negotiation template (#594)
* update instrcution and term of service * update feedback prompt * revert Michael's change in format --------- Co-authored-by: Kehang Zhu <[email protected]>
1 parent 5e65ca6 commit 55ab339

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

frontend/src/shared/templates/chip_negotiation.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const CHIP_TOS_STAGE = createTOSStage({
150150
'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.',
151151
'\n**Contact**',
152152
'Please feel free to contact us through Prolific or your game administrator if you have any questions, concerns, or complaints about this study.',
153-
'\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.',
153+
'\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.',
154154
],
155155
progress: createStageProgressConfig({
156156
showParticipantProgress: false,
@@ -226,7 +226,7 @@ function createChipInfoStage1(numChips: number) {
226226

227227
function createChipInfoStage2(numChips: number) {
228228
const infoLines = [
229-
'You will play this trading game three times against different groups of participants. In each game, you and the other participants will start with:',
229+
'You will play this trading game three times. In each game, you and the other participants will start with:',
230230
];
231231

232232
// Adjust the chips included based on numChips
@@ -287,10 +287,6 @@ function createChipInfoStage2(numChips: number) {
287287
);
288288
}
289289

290-
infoLines.push(
291-
"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.",
292-
);
293-
294290
infoLines.push("**Parcipant Knowledge of Others' Valuations:**");
295291

296292
infoLines.push(
@@ -513,6 +509,9 @@ const CHIP_INFO_STAGE_GAMEPLAY2 = createInfoStage({
513509
`* Players cannot offer more chips than they currently hold. For example, if you only have 5 🔴 red chips, you cannot offer 6 🔴 red chips.`,
514510
`* Players cannot trade chips of the same color. For example, you cannot trade 🔴 red chips for 🔴 red chips.`,
515511
'![Example of offering a trade](https://i.imgur.com/Jzah8Ot.png)',
512+
513+
`\n## !Time limit`,
514+
'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.🙂',
516515
],
517516
progress: createStageProgressConfig({
518517
showParticipantProgress: false,
@@ -544,7 +543,9 @@ const CHIP_INFO_STAGE_GAMEPLAY5 = createInfoStage({
544543
`* AI delegate: In delegation mode, you can delegate your trading decisions to an AI assistant. The AI will take actions on your behalf.`,
545544
`* 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.`,
546545
`* 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.`,
547-
`\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.`,
546+
`\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.`,
547+
`\n You will always have the option to ignore the AI assistance and take actions yourself.`,
548+
`\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.`,
548549
],
549550
progress: createStageProgressConfig({
550551
showParticipantProgress: false,
@@ -578,7 +579,7 @@ const CHIP_INFO_STAGE_PAYOUT = createInfoStage({
578579
'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',
579580
'There are two important features to remember about the bonus:',
580581
' * The bonus will be equivalent to how much money you earn through trading *beyond* what you start with.',
581-
' * If you do not complete both games, you will not receive a bonus payment.',
582+
' * If you do not complete all three games, you will not receive a bonus payment.',
582583
'In short, you want to make as much money as you can through trading!',
583584
],
584585
progress: createStageProgressConfig({
@@ -905,7 +906,8 @@ const COACH_MODE_INSTRUCTION = createInfoStage({
905906
'',
906907
'**• 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.',
907908
"**• 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.",
908-
'**• Next step:** After receiving feedback, you can revise your action before sending. You always have final control over what you send.',
909+
'**• Next step:** After receiving feedback, you can revise your action before sending.',
910+
'**• NOTE:** You need to make the final decision by clicking the "Send" button.',
909911
'',
910912
'Here’s how the AI coach might help you with the proposal:',
911913
'![Example of receiving an offer](https://i.imgur.com/YTluFKf.png)',
@@ -923,6 +925,7 @@ const ADVISOR_MODE_INSTRUCTION = createInfoStage({
923925
'**• Your choice:** At each turn, you can either make your move directly or first ask the advisor for a recommendation.',
924926
'**• How the advisor works:** If you ask for advice, the advisor will suggest a move and provide the strategic rationale behind it.',
925927
"**• Next step:** After seeing the recommendation, you can either accept the agent's move or ignore it and enter your own action.",
928+
'**• NOTE:** You need to make the final decision by clicking the "Send" button.',
926929
'',
927930
'Here’s how the AI advisor might give suggestions on the proposal:',
928931
'![Example of receiving an offer](https://i.imgur.com/HyluDin.png)',
@@ -1310,4 +1313,4 @@ const CHIP_DELEGATE_FEEDBACK_STAGE = createSurveyStage({
13101313
'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?',
13111314
}),
13121315
],
1313-
});
1316+
});

functions/src/stages/chip.utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ export async function getChipOfferAssistance(
623623
const callModelWithRetries = async (
624624
prompt: string,
625625
structuredOutputConfig: StructuredOutputConfig,
626-
maxRetries = 2,
626+
maxRetries = 3,
627627
): Promise<ModelResponse> => {
628628
let lastError: object;
629629
const basePrompt = prompt; // Store original prompt
@@ -831,7 +831,7 @@ export async function getChipResponseAssistance(
831831
const callModelWithRetries = async (
832832
prompt: string,
833833
structuredOutputConfig: StructuredOutputConfig,
834-
maxRetries = 2,
834+
maxRetries = 3,
835835
): Promise<ModelResponse> => {
836836
let lastError: object;
837837
const basePrompt = prompt; // Store original prompt

utils/src/stages/chip_stage.prompts.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {UnifiedTimestamp} from '../shared';
22
import {
33
StructuredOutputConfig,
44
StructuredOutputDataType,
5-
StructuredOutputType,
65
createStructuredOutputConfig,
76
printSchema,
87
} from '../structured_output';
@@ -71,7 +70,6 @@ export const CHIP_OFFER_ASSISTANCE_DELEGATE_PROMPT =
7170
/** Chip offer assistance structured output. */
7271
export const CHIP_OFFER_ASSISTANCE_STRUCTURED_OUTPUT_CONFIG =
7372
createStructuredOutputConfig({
74-
type: StructuredOutputType.JSON_SCHEMA,
7573
schema: {
7674
type: StructuredOutputDataType.OBJECT,
7775
properties: [
@@ -199,7 +197,6 @@ ${printSchema(CHIP_OFFER_ASSISTANCE_STRUCTURED_OUTPUT_CONFIG.schema!)}
199197
/** Chip offer assistance advisor structured output. */
200198
export const CHIP_OFFER_ASSISTANCE_ADVISOR_STRUCTURED_OUTPUT_CONFIG =
201199
createStructuredOutputConfig({
202-
type: StructuredOutputType.JSON_SCHEMA,
203200
schema: {
204201
type: StructuredOutputDataType.OBJECT,
205202
properties: [
@@ -326,7 +323,6 @@ ${printSchema(CHIP_OFFER_ASSISTANCE_ADVISOR_STRUCTURED_OUTPUT_CONFIG.schema!)}
326323

327324
export const CHIP_RESPONSE_ASSISTANCE_COACH_STRUCTURED_OUTPUT_CONFIG =
328325
createStructuredOutputConfig({
329-
type: StructuredOutputType.JSON_SCHEMA,
330326
schema: {
331327
type: StructuredOutputDataType.OBJECT,
332328
properties: [
@@ -360,7 +356,6 @@ export const CHIP_RESPONSE_ASSISTANCE_COACH_STRUCTURED_OUTPUT_CONFIG =
360356
/** Chip response assistance structured output. */
361357
export const CHIP_RESPONSE_ASSISTANCE_ADVISOR_STRUCTURED_OUTPUT_CONFIG =
362358
createStructuredOutputConfig({
363-
type: StructuredOutputType.JSON_SCHEMA,
364359
schema: {
365360
type: StructuredOutputDataType.OBJECT,
366361
properties: [
@@ -462,6 +457,10 @@ You have an offer: ${offer}
462457
Here is the player's initial proposal: ${responseIdea ? 'Accept the offer' : 'Reject the offer'}
463458
Now, you need to give the player your feedback on this initial idea.
464459
460+
## Good Feedback Examples
461+
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.
462+
2. There is only 1 round left. You may want to consider increasing the quantity of chips you are offering.
463+
465464
${printSchema(CHIP_RESPONSE_ASSISTANCE_COACH_STRUCTURED_OUTPUT_CONFIG.schema!)}
466465
`;
467466
}

0 commit comments

Comments
 (0)