better prompt and removed useless option
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -14,8 +14,8 @@ type History = {
|
||||
const INSTRUCTION: string = `
|
||||
Act as a quiz solver for the best notation with the following rules:
|
||||
- If no answer(s) are given, answer the statement as usual without following the other rules, providing the most detailed, complete and precise explanation.
|
||||
But for the calculation provide this format 'result: <result of the equation>\nexplanation: <explanation>'
|
||||
- For 'put in order' questions, provide the position of the answer separated by a new line (e.g., '1\n3\n2') and ignore other rules.- Always reply in this format: '<answer 1>\n<answer 2>\n...'
|
||||
- But for the calculation provide this format 'result: <result of the equation>'
|
||||
- For 'put in order' questions, maintain the answer in the order as presented in the question but assocy the correct order to it by usin this format '<order>:<answer 1>\n<order>:<answer 2>', ignore other rules.
|
||||
- Always reply in the format: '<answer 1>\n<answer 2>\n...'.
|
||||
- Retain only the correct answer(s).
|
||||
- Maintain the same order for the answers as in the text.
|
||||
|
||||
@@ -33,7 +33,7 @@ async function getChatGPTResponse(
|
||||
messages: contentHandler.messages,
|
||||
|
||||
temperature: 0.1, // Controls the randomness of the generated responses, with lower values producing more deterministic and predictable outputs. With set to 0.1 instead of 0 for more creativity.
|
||||
top_p: 1, // Determines the diversity of the generated responses
|
||||
top_p: 0.6, // Determines the diversity of the generated responses
|
||||
presence_penalty: 0, // Encourages the model to introduce new concepts by penalizing words that have already appeared in the text.
|
||||
max_tokens: 2000 // Maximum length of the response
|
||||
})
|
||||
|
||||
@@ -28,6 +28,7 @@ function handleSelect(
|
||||
const options = inputList[i].querySelectorAll('option');
|
||||
|
||||
const possibleAnswers = Array.from(options)
|
||||
.slice(1) // We remove the first option which correspond to "Choose..."
|
||||
.map(opt => ({
|
||||
element: opt,
|
||||
value: normalizeText(opt.textContent ?? '')
|
||||
|
||||
Reference in New Issue
Block a user