Skip to content

fix(research): align evidence query limits - #166

Merged
iamjr15 merged 1 commit into
mainfrom
fix/research-evidence-query-bounds
Aug 5, 2026
Merged

fix(research): align evidence query limits#166
iamjr15 merged 1 commit into
mainfrom
fix/research-evidence-query-bounds

Conversation

@iamjr15

@iamjr15 iamjr15 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

Live production tracing of the research Markdown/PDF acceptance flow found that workflow queries feed three Exa fields: the main query accepts 2,000 characters, while highlightQuery and summaryQuery accept 1,000. The workflow used the broader limit, so detailed topics produced deterministic Zod failures before evidence retrieval.

The same natural prompt also showed the model selecting fan-out for a three-source comparison and sending entities as one combined string.

What changed

  • bound workflow-generated evidence queries to the strictest shared 1,000-character contract
  • retain the distinct angle/entity suffix when shortening a verbose topic
  • describe fan-out entities explicitly as an array of separate short names
  • route comparisons of a few sources or standards within one topic to focused research
  • reserve fan-out for four or more independent entities or genuinely separate angles

Architecture and migration impact

No database, deployment-topology, or public API changes. This aligns an internal workflow with its downstream provider schema and sharpens agent routing instructions.

Verification

  • pnpm lint
  • pnpm typecheck
  • pnpm turbo build --force
  • pnpm deadcode
  • pnpm architecture:check
  • pnpm turbo skills:build
  • parsed maximum-length deep and fan-out queries through ExaSearchInputSchema with query, highlightQuery, and summaryQuery
  • asserted all generated queries remain distinct and preserve their angle/entity suffix
  • production trace identified the original executeExaSearch Zod failure; the same natural-language flow will be rerun after deployment

The local machine reports the existing Node engine warning (repo pins 24.18.0; local Node is 26.4.0); all checks completed successfully.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
cheatcode Skipped Skipped Aug 5, 2026 5:33am

@iamjr15
iamjr15 merged commit a54b845 into main Aug 5, 2026
6 checks passed
@iamjr15
iamjr15 deleted the fix/research-evidence-query-bounds branch August 5, 2026 05:34
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