Generative AI error code definitionsSummary<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } This article defines the Generative AI Controller (GAIC) error codes by stage and provides possible workarounds for each. A log record is created in the sys_generative_ai_log table after every LLM run. This table stores success responses and any error that occurs during the run. An error can happen during any of the three stages of the Generative AI Controller run: pre-processor, LLM request, and post-processor. This article breaks down every error code by stage, including the error code definition and possible workarounds. Preprocessing 100001: Min Word Count restriction error. The source doesn't have the minimum number of words required to complete the request. The final request prompt should have a minimum word count. The word count of the prompt is checked against the Min Word Count field in the sys_generative_ai_config table for the definition being used. You can set the minimum word count to -1 to bypass this check (which is also the default value for new generative AI config records). 100002: Missing _meta property in the request. The JSON input being passed to the GAIC preprocessor is missing the _meta key. This is common when teams run a GAIC subflow directly without going through the OneExtend API. An error occurred while processing the request before it reached the GAIC preprocessor. Go to flow context executions and check the input being passed to the pre-processor. Most likely a malformed JSON was sent to the pre-processor as input. This has been noticed in HI and BT1 clones as the Gen AI FDIH subflows do not get installed properly. As a workaround, change this element's attributes from: list_layout_ignore=true,model_field=sys_id,record_watcher_blacklist=true,serializer=com.glide.vars.VariableValueXMLSerializer,slushbucket_ref_no_expand=true to: list_layout_ignore=true,model_field=flow,record_watcher_blacklist=true,serializer=com.glide.vars.VariableValueXMLSerializer,slushbucket_ref_no_expand=true 100003: Missing mandatory attributes in the request. The request is expecting a capability attribute that is marked as mandatory. Go to sys_one_extend_capability and open the record for the capability being used. Under the OE Capability Attributes tab, verify that your request has the mandatory attributes. 100004: Error occurred while preparing the request. This error is common when the active prompt configuration is not found for the given capability definition. 100005: Error occurred while running request validators in the pre-processor. Something went wrong with the request validator (sys_generative_ai_request_validator) for the given capability definition. 100006: Error occurred while calling the Data Privacy API. The Data Privacy API returned an error during the GAIC preprocessor. The Data Privacy API is called to mask personally identifiable information (PII). Refer to the Data Privacy API error codes document for more information. LLM request 200000: Error at the LLM run level. Unknown Host Exception. Check the host URL for your connection and make sure it is correct. The API deployment for this resource does not exist. This means the connection needs an updated API key. Placing a toolkit URL in the NowLLM connection_url will now start to throw this error: "Cannot execute internal HTTP request. Request is not authorized." As a workaround, use the following background script to set the is_internal field to false to bypass this error: var gr = new GlideRecord("sys_alias");gr.get("4e85d828777721105de60f207b5a9906");gr.setValue("is_internal", false);gr.update(); 200001: Invalid JSON returned from LLM. When the json_format_supported flag is enabled (this is configured in the sys_generative_ai_config record for the definition being used), the LLM model output is expected to come back in a JSON format. This error occurs when the LLM response is not in a JSON format but the json_format_supported flag is enabled. Postprocessing 300000: Flagged moderation checks in Guardrail response. Moderation checks (offensiveness or prompt injection) were flagged. Check the guardrail response for which moderation checks were flagged, the associated categories, and the list of error codes. 300001: Error in Trust Builder response. An error occurred in the Trust Builder post-processor. Check the GenAITrustBuilderResponsePostProcessor action in Flow Designer for more details. 300002: Error in validating response. Something went wrong with the response validator (sys_generative_ai_response_validator) for the given capability definition. 300100: Hallucination threshold exceeded for Trust Builder. The offensiveness score returned by Trust Builder exceeds the threshold defined in the sn_generative_ai.hallucination threshold system property. Check the GenAITrustBuilderResponsePostProcessor action in Flow Designer for more details. Note: This error code is only part of the guardian response. 300200: Offensiveness moderation check was flagged. Check the sys_generative_ai_metric table for the Offensiveness raw response and the categories that were flagged. Note: This error code is only part of the guardian response. 300300: Prompt Injection moderation check was flagged. Check the sys_generative_ai_metric table for the Prompt Injection raw response and the categories that were flagged. Note: This error code is only part of the guardian response. Additional errors 400001: Catastrophic error. A catastrophic error happened in one of the subflow nodes, or an exception was thrown before the subflow run completed. 400002: Error occurred outside the GAIC process. An error happened outside the GAIC process and the original log record was changed from success to error by using the scriptable API sn_one_extend.GenerativeAIUtility.updateGenerativeAILog(). Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } }