-
Notifications
You must be signed in to change notification settings - Fork 237
chore(compass-collection): ignore mongoType from LLM response CLOUDP-351514 #7466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Assigned |
...fieldMapping, | ||
mongoType: fieldMapping.mongoType, | ||
// Note: fallback to String would only occur if LLM response renames the input field path | ||
mongoType: inputSchema[fieldPath]?.type ?? 'String', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that malformed fieldPaths will be stripped anyway, see below. Might make sense to just not bother storing such cases here, or make the behvior clear in the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the 'String' fallback and updated the comment to note validateFakerSchema
👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, one small comment
Description
Remove usage of the mongoType field from the LLM response supporting mock data generation. mongType is will still be fed as context to the LLM, but the LLM does not need to return it back. There is less data subject to AI hallucination and ~15-20 tokens per field are saved because of this. A separate PR will update the backend response
Note: This feature is in development behind an experiment flag. Normally, if the feature was already rolled out we would version the API change.
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes