Skip to content

Commit

Permalink
TaskProcessing docs: Add a note about multilingual prompts and testing
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr authored and backportbot[bot] committed Sep 27, 2024
1 parent d902cf8 commit 4b8ce78
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions developer_manual/digging_deeper/task_processing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 4b8ce78

Please sign in to comment.