import { useState } from "react";
const Instructions = ({ modality, onComplete }) => {
const [currentPage, setCurrentPage] = useState(0);
const textInstructions = [
{
title: "Welcome to the Text Response Evaluation Study",
content: (
Thank you for participating in our research study. You will be evaluating AI-generated text responses to various questions.
What you'll be doing:
- You'll see a user question followed by two different AI responses
- Your task is to rate each response on how helpful and appropriate it is
- There will be 21 trials total (including 1 practice trial)
- Each trial should take about 1-2 minutes
)
},
{
title: "How to Rate Responses",
content: (
Rating Scale: You'll use a slider from 1 to 100 to rate each response.
- 1-20: Terrible - Completely unhelpful, wrong, or inappropriate
- 21-40: Poor - Somewhat unhelpful or partially wrong
- 41-60: Average - Okay but could be better
- 61-80: Good - Helpful and mostly accurate
- 81-100: Perfect - Excellent, very helpful response
Consider: Accuracy, helpfulness, completeness, and appropriateness of each response.
)
},
{
title: "Important Guidelines",
content: (
Please remember:
- Read each response carefully before rating
- Rate responses independently - don't compare them directly
- Use the full scale (1-100) based on response quality
- There are no right or wrong ratings - we want your honest opinion
- Some questions may have conversation history for context
Technical notes:
- The survey will remember your progress if you need to take a break
- Please complete the survey in one session if possible
- Make sure you have a stable internet connection
)
}
];
const audioInstructions = [
{
title: "Welcome to the Audio Response Evaluation Study",
content: (
Thank you for participating in our research study. You will be evaluating AI-generated audio responses to various questions.
What you'll be doing:
- You'll see a user question followed by two different AI audio responses
- Your task is to rate each response on both content quality and audio quality
- There will be 21 trials total (including 1 practice trial)
- Each trial should take about 2-3 minutes
Audio requirements:
- Please use headphones or speakers
- Make sure your volume is at a comfortable level
- Find a quiet environment for best evaluation
)
},
{
title: "How to Rate Audio Responses",
content: (
You'll rate each audio response on two dimensions:
1. Response Rating (Content Quality):
- 1-20: Terrible content - Unhelpful, wrong, or inappropriate
- 21-40: Poor content - Somewhat unhelpful or partially wrong
- 41-60: Average content - Okay but could be better
- 61-80: Good content - Helpful and mostly accurate
- 81-100: Perfect content - Excellent, very helpful response
2. Audio Quality Rating:
- 1-20: Terrible audio - Very hard to understand, robotic
- 21-40: Poor audio - Somewhat hard to understand
- 41-60: Average audio - Understandable but not natural
- 61-80: Good audio - Clear and fairly natural sounding
- 81-100: Perfect audio - Very natural, human-like speech
)
},
{
title: "Audio Controls & Guidelines",
content: (
Audio Controls Available:
- Play/Pause: Start or stop the audio
- Replay: Start the audio over from the beginning
- Skip Back (-10s): Jump back 10 seconds
- Progress Bar: Click or drag to jump to any point in the audio (unlocked after first full listen)
Important Guidelines:
- You must listen to each audio response completely at least once before the progress bar unlocks
- You cannot move on until both audio clips have been fully listened to AND all ratings are provided
- After the first full listen, you can replay or skip around as much as needed
- Rate content and audio quality independently
- Use the full scale (1-100) for both ratings
- There are no right or wrong ratings - we want your honest opinion
Technical notes:
- Audio files will load automatically
- If audio doesn't play, try refreshing the page
- The survey remembers your progress
)
}
];
const instructions = modality === "text" ? textInstructions : audioInstructions;
const isLastPage = currentPage === instructions.length - 1;
const handleNext = () => {
if (isLastPage) {
onComplete();
} else {
setCurrentPage(prev => prev + 1);
}
};
const handlePrevious = () => {
setCurrentPage(prev => Math.max(0, prev - 1));
};
return (
{instructions[currentPage].title}
Page {currentPage + 1} of {instructions.length}
{instructions[currentPage].content}
{instructions.map((_, index) => (
))}
{isLastPage && (
Ready to begin? Click "Start Survey" to proceed to the {modality} evaluation tasks.
)}
);
};
export default Instructions;