Skip to content

Support reference answers in the OpenAIMessagesDataset#283

Merged
junya-takayama merged 3 commits intomainfrom
support_references_with_openaidataset
Mar 30, 2026
Merged

Support reference answers in the OpenAIMessagesDataset#283
junya-takayama merged 3 commits intomainfrom
support_references_with_openaidataset

Conversation

@junya-takayama
Copy link
Copy Markdown
Collaborator

@junya-takayama junya-takayama commented Mar 28, 2026

Enable setting the references field of ChatInstance from OpenAIMessagesDataset as well.

Specifically, references will be set using the following mechanism:

  • If an arbitrary key name is passed to references_key, the value stored under that key in the JSON object is used as references.
    • The value may be either a str (single reference) or a list[str] (multiple references). Any other type results in an error.
  • If drop_if_last_from_assistant is set to true, the last assistant utterance (the one that was dropped) is set as references.
    • However, if references_key is set, it takes precedence.

@junya-takayama junya-takayama changed the title [WIP] Support reference answers in the OpenAI Messages Dataset [WIP] Support reference answers in the OpenAIMessagesDataset Mar 30, 2026
@junya-takayama junya-takayama changed the title [WIP] Support reference answers in the OpenAIMessagesDataset Support reference answers in the OpenAIMessagesDataset Mar 30, 2026
@junya-takayama junya-takayama marked this pull request as ready for review March 30, 2026 05:39
Copy link
Copy Markdown
Contributor

@h-asano h-asano left a comment

Choose a reason for hiding this comment

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

LGTM!

@junya-takayama junya-takayama merged commit 55feb20 into main Mar 30, 2026
7 checks passed
@junya-takayama junya-takayama deleted the support_references_with_openaidataset branch March 30, 2026 13:25
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