From 80b467930f1c7b9574b60bc99fab91ac5ec78f31 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 27 Sep 2024 10:38:29 +0200 Subject: [PATCH] TaskProcessing docs: Add a note about multilingual prompts and testing Signed-off-by: Marcel Klehr --- .../digging_deeper/task_processing.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/developer_manual/digging_deeper/task_processing.rst b/developer_manual/digging_deeper/task_processing.rst index b602d78801e..3519d6f7bd3 100644 --- a/developer_manual/digging_deeper/task_processing.rst +++ b/developer_manual/digging_deeper/task_processing.rst @@ -87,6 +87,21 @@ The following built-in task types are available: * Output shape: * ``output``: ``ListOfImages`` +LLM Prompts and multilingual I/O +################################ + +When writing prompts for the TextToText task type in your apps, we recommend testing it with at least + +* OpenAI GPT-3.5 +* Llama 3.1 + +Also, make sure that you instruct the model to use the correct language in its output. By default most models will answer in English if the main prompt is in English, even though the source data is in another language. +A tweak to make sure of this is to instruct the model as follows: + +.. code-block:: php + + "Detect the language used in the text and make sure to answer in the same language without mentioning the language explicitly." + Input and output shapes ~~~~~~~~~~~~~~~~~~~~~~~