Skip to content

A reasoning model's extraction times out and its reply carries the reasoning #690

Description

@WaylandYang

What happens

Configured with deepseek-ai/DeepSeek-V4-Flash (a reasoning model, available on SiliconFlow), extraction on the NVIDIA recall corpus did not finish in an hour:

  • 64 chunks took over 60 minutes, against about 25 with DeepSeek-V3, and the bench harness timed out at 63/64;
  • 10 chunks failed with LLM endpoint gave no usable answer: error sending request for url (…/chat/completions), which looks like LlmClient's read timeout on long reasoning replies;
  • there was no rate limiting at all (0 throttle warnings, against 45–96 per V3 round the same night), so the model is attractive precisely when V3 is throttled.

Separately, the model returns its reasoning inline: settings/test came back as "OK</think>OK". utopia_extract::json_block takes everything from the first { to the last }, so a brace inside the reasoning would make it cut the wrong span. It did not happen in this round, but only by luck.

Proposed

  1. Keep only the reply after the reasoning. Strip everything up to the last </think> in the chat reply before any parsing, in LlmClient, so extraction, chat and adjudication all benefit. This is a protocol marker, not vocabulary. Also check whether the endpoint returns reasoning_content separately and ignore that field.
  2. A longer read timeout for reasoning models, or a timeout that scales with the requested completion budget, so a long reasoning reply isn't cut off and retried.
  3. Re-run the recall bench with V4 Flash after 1 and 2, so it can be offered as the stable option when V3 is throttled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions