Skip to content

chore(closes OPEN-9405): allow specifying/logging question column name#607

Merged
viniciusdsmello merged 1 commit intomainfrom
cid/log-question
Mar 5, 2026
Merged

chore(closes OPEN-9405): allow specifying/logging question column name#607
viniciusdsmello merged 1 commit intomainfrom
cid/log-question

Conversation

@gustavocidornelas
Copy link
Contributor

Pull Request

Summary

This PR adds question support to the tracing system, mirroring the existing context handling for RAG use cases.

Users can now explicitly identify the user query field either via the @trace(question_kwarg="my_param") decorator
parameter or by calling log_question(value) manually inside a traced function.

Internally, this introduces a _rag_question context variable, a get_rag_question() helper, and a log_question() public function; the question is included in the trace payload and the config is updated with question_column_name: "_question" automatically when set, eliminating the need for the backend to infer the question through heuristics.

Changes

  • Described above.

Context

OPEN-9405: Allow specifying/logging question column name

Testing

  • Manual testing

@viniciusdsmello viniciusdsmello merged commit 436def7 into main Mar 5, 2026
5 checks passed
@viniciusdsmello viniciusdsmello deleted the cid/log-question branch March 5, 2026 15:08
@stainless-app stainless-app bot mentioned this pull request Mar 5, 2026
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