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
The expected input format is a list of dictionaries, where each dictionary has the following keys:
1129
+
- name: Name of the evaluation criteria.
1130
+
- criteria: Instructions specifying the evaluation criteria.
1131
+
1132
+
max_tokens (int, default = 512): the maximum number of tokens that can be generated in the response from `TLM.prompt()` as well as during internal trustworthiness scoring.
1133
+
If you experience token/rate-limit errors, try lowering this number.
1134
+
For OpenAI models, this parameter must be between 64 and 4096. For Claude models, this parameter must be between 64 and 512.
1135
+
1136
+
reasoning_effort ({"none", "low", "medium", "high"}, default = "high"): how much internal LLM calls are allowed to reason (number of thinking tokens)
1137
+
when generating alternative possible responses and reflecting on responses during trustworthiness scoring.
1138
+
Reduce this value to reduce runtimes. Higher values may improve trust scoring.
1139
+
1140
+
num_self_reflections (int, default = 3): the number of different evaluations to perform where the LLM reflects on the response, a factor affecting trust scoring.
1141
+
The maximum number currently supported is 3. Lower values can reduce runtimes.
1142
+
Reflection helps quantify aleatoric uncertainty associated with challenging prompts and catches responses that are noticeably incorrect/bad upon further analysis.
1143
+
This parameter has no effect when `disable_trustworthiness` is True.
1144
+
1145
+
num_consistency_samples (int, default = 8): the amount of internal sampling to measure LLM response consistency, a factor affecting trust scoring.
1146
+
Must be between 0 and 20. Lower values can reduce runtimes.
1147
+
Measuring consistency helps quantify the epistemic uncertainty associated with
1148
+
strange prompts or prompts that are too vague/open-ended to receive a clearly defined 'good' response.
1149
+
TLM measures consistency via the degree of contradiction between sampled responses that the model considers plausible.
1150
+
This parameter has no effect when `disable_trustworthiness` is True.
1151
+
1152
+
similarity_measure ({"semantic", "string", "embedding", "embedding_large", "code", "discrepancy"}, default = "discrepancy"): how the
1153
+
trustworthiness scoring's consistency algorithm measures similarity between alternative responses considered plausible by the model.
1154
+
Supported similarity measures include - "semantic" (based on natural language inference),
1155
+
"embedding" (based on vector embedding similarity), "embedding_large" (based on a larger embedding model),
1156
+
"code" (based on model-based analysis designed to compare code), "discrepancy" (based on model-based analysis of possible discrepancies),
1157
+
and "string" (based on character/word overlap). Set this to "string" for minimal runtimes.
1158
+
This parameter has no effect when `num_consistency_samples = 0`.
1159
+
1160
+
num_candidate_responses (int, default = 1): how many alternative candidate responses are internally generated in `TLM.prompt()`.
1161
+
`TLM.prompt()` scores the trustworthiness of each candidate response, and then returns the most trustworthy one.
1162
+
You can auto-improve responses by increasing this parameter, but at higher runtimes/costs.
1163
+
This parameter must be between 1 and 20. It has no effect on `TLM.score()`.
1164
+
When this parameter is 1, `TLM.prompt()` simply returns a standard LLM response and does not attempt to auto-improve it.
1165
+
This parameter has no effect when `disable_trustworthiness` is True.
1166
+
1167
+
disable_trustworthiness (bool, default = False): if True, TLM will not compute trust scores,
1168
+
useful if you only want to compute custom evaluation criteria.
0 commit comments