Skip to content

fix(research): accept object-shaped exploration queries and report failures - #531

Closed
tharunsridhar wants to merge 1 commit into
chunkhound:mainfrom
tharunsridhar:fix/exploration-queries-515
Closed

tharunsridhar wants to merge 1 commit into
chunkhound:mainfrom
tharunsridhar:fix/exploration-queries-515

Conversation

@tharunsridhar

Copy link
Copy Markdown
Contributor

Fixes #515

Exploration query generation declared queries as an array of strings. A model that answered with {query, aspect} objects failed schema validation, and the swallowed exception turned every query for that file into [] with nothing in the run stats.

  • The schema now accepts a bare string or an object with a query string (anyOf). Both are normalised to the list of strings the stage already consumes, and each coerced item is logged with its file at debug level. Payloads with no extractable query are still rejected.
  • A failed call is raised after the warning so it is counted in query_generation_failures. The early return for "no queries" now includes that counter too.
  • The completion-token budget is unchanged.

test_returns_empty_on_llm_failure is replaced on purpose: it pinned the silent empty list this issue asks to remove. New tests cover string, object, mixed and unusable payloads and the failure accounting. 265 tests under tests/unit/research pass.

…ilures

Exploration query generation declared queries as an array of strings. A
model that returned {query, aspect} objects failed schema validation, and
the swallowed exception turned every query for the file into [] with no
signal in the run stats.

Accept a bare string or an object with a query string, normalize both to
the query list the stage consumes and log each coerced item with its file
at debug level. Payloads with no extractable query are still rejected.
A failed call is now raised after the warning so it is counted in
query_generation_failures, which the early return for 'no queries' now
includes as well. The completion-token budget is unchanged.

test_returns_empty_on_llm_failure is replaced deliberately: it pinned the
silent empty list.

Fixes #515
@HananKavitzAmat

Copy link
Copy Markdown
Collaborator

This issue was resolved in #532

Thanks!

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.

fix(research): accept object-shaped exploration queries

2 participants