Skip to content

BIRD: output cap, reasoning effort, candidate voting settings and LLM call pacing - #32

Merged
Parth-Vasave merged 3 commits into
mainfrom
bird-llm-controls
Oct 14, 2026
Merged

Parth-Vasave merged 3 commits into
mainfrom
bird-llm-controls

Conversation

@Parth-Vasave

@Parth-Vasave Parth-Vasave commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

First of a stack of six PRs with the BIRD Mini-Dev work. Merge in order.

  • Output cap and reasoning effort: LLM_MAX_OUTPUT_TOKENS (sent as max_tokens) and LLM_REASONING_EFFORT (low|medium|high), sent only when set. Evaluation runs record the LLM host and effort, the report shows them, and a resumed run must keep the same effort. .env.example documents Cerebras.
  • No concatenated columns: the SQL prompt (sql-generator/7) tells the model never to join stored columns into one value.
  • Candidate voting wired in: SQL_CANDIDATES (API) and --candidates (runner) pass the candidate count to AgentController. Runs record it and resume refuses a mismatch.
  • Pacing: LLM_REQUESTS_PER_MINUTE spaces LLM calls, retries included. Evaluation runs wait out per-minute 429s inside the call (up to 120 s), and a 429 asking to wait more than ten minutes counts as a used-up quota.

Testing

Run locally on the top of the stack (readme-bird-results): ruff check, ruff format --check, mypy clean; backend 340 passed, scripts + evaluation 115 passed (database integration tests skipped locally, run in CI); frontend lint and 57 tests pass. CI runs on each PR.

LLM_MAX_OUTPUT_TOKENS caps each reply (sent as max_tokens, the name every
OpenAI-compatible API accepts). Cerebras reserves the cap against its rate
limits before running a request, so an unset cap reserves the model maximum.
LLM_REASONING_EFFORT (low|medium|high) is passed to reasoning models such as
gpt-oss. Both are sent only when set, so existing setups are unchanged.

Evaluation runs record the LLM host and reasoning effort, the report shows
them, a resumed run must keep the same effort, and token estimates count
only earlier runs with the same effort. .env.example documents Cerebras.
In the partial Mini-Dev run, 4 of 87 questions were missed only because the
model joined two stored columns into one (a definition named them as one
term). The rule is general: concatenating is reformatting stored values,
which the prompt already discourages. Prompt version sql-generator/7.
- SQL_CANDIDATES (API) and --candidates (evaluation runs) pass the number of
  candidate queries to AgentController. Runs record it, resume refuses a
  mismatch, the token estimate only counts runs with the same number, and the
  report shows it.
- LLM_REQUESTS_PER_MINUTE spaces LLM calls (retries included) so a small
  per-minute limit such as the Cerebras trial's is not hit; with it set the
  runner's --delay defaults to 0. Pacing waits are not counted in call duration.
- Evaluation runs wait out per-minute 429s inside the LLM call (up to 120 s),
  keeping the question's earlier calls and candidates instead of re-asking.
- A 429 asking to wait more than ten minutes counts as a used-up quota even
  without a body (Cerebras can answer with only Retry-After).
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ai-sql-analyst-agent Ready Ready Preview Oct 14, 2026 4:56am UTC

@Parth-Vasave
Parth-Vasave merged commit 769d4c6 into main Oct 14, 2026
12 checks passed
@Parth-Vasave
Parth-Vasave deleted the bird-llm-controls branch October 14, 2026 05:00

This branch was successfully deployed

1 active deployment
Preview — 6f85d145 Deployed Oct 14, 2026 by vercel[bot]
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.

1 participant