Skip to content

Rank upload variable suggestions by which inputs take the files - #478

Closed
wmobley wants to merge 1 commit into
developfrom
fix/ui-upload-suggestion-ranking
Closed

wmobley wants to merge 1 commit into
developfrom
fix/ui-upload-suggestion-ranking

Conversation

@wmobley

@wmobley wmobley commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Problem

On the upload page, a transcript dataset described as "transcriptions of oral histories" was suggested document_collection_narrative_frame__description (a flow output nothing takes as input) above document_collection__text (the corpus input of six flows). On dev the semantic scores were 0.17 vs 0.16, with groundwater variables in between, so the frames variable was picked and the dataset never appeared in a thread's data step.

Change

Suggestions are re-ordered using the model tree the page already loads, keeping the semantic order within each group:

  1. an input with a declared format accepts these files
  2. an input takes the variable but declares no format (or no files chosen yet)
  3. inputs take it, but not in this file format
  4. no registered flow or model takes it

Each suggestion now says who takes it ("Input to 2 flows", "No registered flow or model takes this as an input"). The picker's preferred order uses the same ranking.

Tests

  • New src/lib/datasets/__tests__/upload-preview.test.ts, using dev's real order for the transcript case.
  • Full vitest: 156 files, 1592 tests pass. tsc -b clean, eslint clean on the changed files.

Do not merge until dev testing is scheduled.

🤖 Generated with Claude Code

Text similarity alone put a flow's output variable (narrative frames) above
the corpus variable for a transcript upload. Suggestions now rank first the
variables a registered flow or model input accepts these files under, then
those an input takes without a declared format, then format mismatches, then
variables nothing takes, keeping the semantic order within each group. Each
suggestion says which flows and models take it.
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
monorepo Ready Ready Preview Nov 20, 2026 7:24pm UTC

@wmobley

wmobley commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Combined into #482 so all five build and deploy together.

@wmobley wmobley closed this Nov 20, 2026

This branch was successfully deployed

1 active deployment
Preview — 38c0b291 Deployed Nov 20, 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