Add doc section on LLM + task factories (#12905)

* Add section on LLM + task factories.

* Apply suggestions from code review

---------

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
This commit is contained in:
Raphael Mitsch 2023-09-01 14:43:16 +02:00 committed by GitHub
parent b52480f32e
commit eb3cd9facc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,12 @@ options:
| `save_io` | Whether to save prompts/responses within `Doc.user_data["llm_io"]`. ~~bool~~ | | `save_io` | Whether to save prompts/responses within `Doc.user_data["llm_io"]`. ~~bool~~ |
| `validate_types` | Whether to check if signatures of configured model and task are consistent. ~~bool~~ | | `validate_types` | Whether to check if signatures of configured model and task are consistent. ~~bool~~ |
Beyond that, an `llm_TASKNAME` factory is available for each task - `llm_ner` for
an LLM component with the NER task, `llm_rel` for relationship extraction etc.
These factories are equivalent to using the `llm` factory and defining the task
in the configuration. Note: tasks may require more configuration than just
the task factory - compare with the tasks' description below.
An `llm` component is defined by two main settings: An `llm` component is defined by two main settings:
- A [**task**](#tasks), defining the prompt to send to the LLM as well as the - A [**task**](#tasks), defining the prompt to send to the LLM as well as the