Skip to content

Update HallucinationDetectionOutput in line with documentation#63

Merged
gabor-openai merged 1 commit intoopenai:mainfrom
karlr-openai:main
Dec 8, 2025
Merged

Update HallucinationDetectionOutput in line with documentation#63
gabor-openai merged 1 commit intoopenai:mainfrom
karlr-openai:main

Conversation

@karlr-openai
Copy link
Copy Markdown
Contributor

The definition of the output schema is not consistent with the typescript library:
https://github.com/openai/openai-guardrails-js/blob/a8e8ace55601a9e3f383891862de6100751d2e8c/src/checks/hallucination-detection.ts#L55-L71
or the documentation at
https://openai.github.io/openai-guardrails-python/ref/checks/hallucination_detection/#what-it-returns

Notably it's missing the reasoning field, so although the model can respond with that, it's not returned in the structured output available to the caller.

Testing:
Before
image

After
image

@gabor-openai
Copy link
Copy Markdown
Contributor

@codex pls review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gabor-openai gabor-openai self-requested a review December 8, 2025 17:40
Copy link
Copy Markdown
Contributor

@gabor-openai gabor-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY!

@gabor-openai gabor-openai merged commit 8b2e4c3 into openai:main Dec 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants