Skip to content

Commit

Permalink
fix prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenius1424 committed Oct 27, 2024
1 parent 8f1e0eb commit d447879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/learnbefore-bff/src/get-words.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ export async function* getWords(

const systemPrompt =
"Use only RFC8259 compliant compact JSON and help to extract big list of words from the text that the language learner is unlikely to know or that are crucial to the understanding of the text. Words should be converted to dictionary form. Duplicates, names of characters, persons or toponyms are not allowed." +
"Words that do not exist in the text are not allowed. Returns an empty response if the text contains no words. MUST keep the order of words as they appear in the text."
"Words that do not exist in the text are not allowed. Returns an empty response if the text contains no words."

function getUserPrompt(text: string, translationLanguage = "Russian") {
return `
You must extract 50 words from the text below which language learner likely do not know or need to know in order to understand the text.
Please ensure the extracted words are diverse and relevant to the context of the text.
You must extract 40 words from the text below which language learner likely do not know or need to know in order to understand the text.
Please ensure that the extracted words are taken from the text and remain in the same order.
Translation language is ${translationLanguage}.
Expand Down

0 comments on commit d447879

Please sign in to comment.