viewof P1_REQUESTS_ = {
const fragments = P0_FRAGMENTS;
if (!fragments) return null;
const requests = [];
for (let i=0, n=fragments.length; i<n; ++i) {
const fragment = fragments[i];
const messages = [];
messages.push({
role: String.raw`system`,
content: String.raw`You are an undergraduate university student taking a microbiology course. You have been given an assignment to write a summary of an academic paper according to a provided rubric. Your job is split into 3 Phases:
Phase 1) You collect facts verbatim from the paper that relate to the rubric.
Phase 2) You combine the facts into a cogent summary for a specific part of the rubric.
Phase 3) You combine individual paragraphs into a complete and coherent summary of the paper that addresses the rubric.
You are currently in Phase 1.`,
});
messages.push({
role: String.raw`user`,
content: String.raw`I will now provide you with the rubric.
Please find a scientific paper that addresses productivity and has extended impacts on a societal issue or topic.
After reading your chosen paper, please submit a half page summary regarding the paper's main motivations, findings, and larger impacts.
This summary should include the title (citation) of your paper, main ideas and specific hypotheses addressed, methods used, relevant conclusions, and potential societal impacts (see rubric for details).
Paragraph needs:
title/citation and main focus of paper
summary includes main ideas and specific hypothesis/ theories tested
includes brief overview of methods
includes main results and relevant discussion topics
addresses potential social impact/concern`,
});
messages.push({
role: String.raw`user`,
content: String.raw`I will now provide you with a snippet of the paper. This is part ${i+1} of the total ${n} parts.
${fragment}`,
});
messages.push({
role: String.raw`user`,
content: String.raw`Remember: Phase 1) You collect facts verbatim from the paper that relate to the rubric.
Perform Phase 1.`,
});
const request = {
model: String.raw`gpt-3.5-turbo`,
messages,
};
requests.push(request);
}
return FORM(requests.map(({ model, messages }, i) => {
return FORM({
model: Inputs.text({
label: 'model',
value: model,
}),
messages: FORM(messages.map(({ role, content }) => {
return FORM({
role: Inputs.text({
label: 'role',
value: role,
}),
content: Inputs.textarea({
rows: 24,
label: 'content',
value: content,
}),
});
})),
});
}));
}