You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/ops/functions.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,17 @@ Return type: `vector[float32; N]`, where `N` is determined by the model
49
49
*`output_type` (type: `type`, required): The type of the output. e.g. a dataclass type name. See [Data Types](/docs/core/data_types) for all supported data types. The LLM will output values that match the schema of the type.
50
50
*`instruction` (type: `str`, optional): Additional instruction for the LLM.
51
51
52
+
:::tip Clear type definitions
53
+
54
+
Definitions of the `output_type` is fed into LLM as guidance to generate the output.
55
+
To improve the quality of the extracted information, giving clear definitions for your dataclasses is especially important, e.g.
56
+
57
+
* Provide readable field names for your dataclasses.
58
+
* Provide reasonable docstrings for your dataclasses.
59
+
* For any optional fields, clearly annotate that they are optional, by `SomeType | None` or `typing.Optional[SomeType]`.
60
+
61
+
:::
62
+
52
63
Input data:
53
64
54
65
*`text` (type: `str`, required): The text to extract information from.
0 commit comments