Repository navigation
fix(workflow-executor): name the related collection when the AI picks a record - #2061
Draft
hercemer42 wants to merge 1 commit into
Draft
hercemer42 wants to merge 1 commit into
hercemer42 wants to merge 1 commit into
Conversation
… a record When a Load Related Record step asks the AI to pick a record, the field selection was told which collection the candidates come from but the record selection was not. The AI then judged whether each candidate was what the request named: on "the dvds priced above $8" over titles reading like bicycles, it marked a correct pick as unsure, which makes Full AI pause instead of loading, and could decline every candidate. The record selection now gets the same line as the field selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 new issue
|
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When a Load Related Record step asks the AI to pick its record (AI-assisted or Full AI), the AI is now told which collection the candidates come from. Found while testing PRD-1693 (multiple related records), where the same prompt picks several records.
What changes
The related records are from the "Dvd" collection., but the second, which picks the record, saw only the candidates and the request. The AI then judges whether each candidate is what the request names. PRD-1693's pick of several records uses the same prompt shape, and there, on "Pick the dvds priced above $8" over titles reading like bicycles, the AI answered "I'm not confident they are DVDs" in 3 of 6 runs and once picked none. This single-record prompt was not measured the same way, but it gives the AI the same gap. After: the record selection gets the same line as the field selection.What a reviewer should weigh
This changes a live path: every AI-assisted and Full AI Load Related Record step goes through this prompt. Expected effect:
Every candidate comes from that relation by construction, so the line only tells the AI something true.
Tests
load-related-record-step-executor.test.ts: a new test reads the record-selection prompt and finds the collection line. It fails without the change (Tests: 1 failed, 104 skipped) and the file passes with it (Tests: 105 passed, 105 total).Definition of Done
General
Security
Squash message
🤖 Generated with Claude Code
Note
Add related collection display name to AI record-selection prompt in
LoadRelatedRecordStepExecutorPasses the related collection's display name into
selectBestRecordIndexand adds a system message that names the collection in the record-selection prompt. Adds a test in load-related-record-step-executor.test.ts asserting the collection-name system message is present.Macroscope summarized 2c4fbf8.