Sometimes getting only a word or weird responses when trying to fix german grammar errors using text-davinci-003 model.
Prompt used: “Fix grammar in this German sentence: (sentence)”
An example of wrong response from API:
Prompt: “Fix grammar in this German sentence: Er hat gesagt dass sie ist zu spät”
Result: kommen würde
Result should be the whole sentence with grammar fixes, sometimes it is not.
Thanks for the help! I’m trying with different prompts now, but looks like now it’s returning empty response mostly. Also tried temperature 0.9 but nothing changed.
Using NodeJS to call completion api:
const response = await openai.createCompletion({
model: "text-davinci-003",
prompt: `Correct the grammar in the following German sentence and reply with the entire sentence: ${text}`,
temperature: 0,
max_tokens: 60,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
});
console.log(response.data.choices[0].text.trim())
For the example above, prompt the result is same as yours which is exactly it should be.
But for “Correct the grammar in the following German sentence and reply with the entire sentence: er hat gesagt dass sie ist zu spat” the response is always empty;