Repository navigation
fix: AI sees which rows it gets, and never guesses the others - #13
Merged
Merged
Conversation
With more than 50 rows, anomaly detection sent a summary of all rows (80 rows, group totals on all 80) and then the first 50 under "Data to analyze", asking to analyze all rows provided. The model reported the sample itself: "the dataset announces 80 rows but only 50 are provided, the data seems truncated". The rows now come under "rows 1 to 50 of 80, left out on purpose", and the prompt says not to report row counts, missing rows or totals the sample does not add up to. Refs #12
…s them The chat received only the summary and 5 sample rows, and the app passed no rows at all. Asked for one employee's salary or a count over a threshold, the model extrapolated a pattern from 5 rows and stated the result as fact. The rows now go with the question (all of them, or the first ones within 20,000 characters, under a heading saying which), and the prompt says to take whole-dataset totals from the summary, individual values only from the rows given, and never to guess a value it cannot see. Refs #12
Contributor
|
🎉 This PR is included in version 1.17.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Closes #12
Anomaly detection sent the summary of all rows ("80 rows", group totals "computed on all 80 rows") and then only the first 50 under "Data to analyze", with "Analyze ALL rows provided". The model reported the sample as an anomaly: "le jeu de données annonce 80 lignes, mais seulement 50 sont fournies… les données semblent tronquées".
rows 1 to 50 of 80. The other 30 rows are left out on purpose; the summary above covers all 80.(orall N rows).Data chat (same cause, worse result): it received the summary and 5 sample rows only, and the app passed no rows. Asked for EMP1060's salary and a count over 60 000 on 80 rows, Claude Sonnet 5.5 inferred a pattern from 5 rows and stated both numbers as fact.
askAboutData/streamAskAboutDatasend the rows as CSV: all of them, or the first ones withinCHAT_ROWS_MAX_CHARS(20 000 characters, optionmaxRowChars), under the same kind of heading.Checks: lint, typecheck, csv-charts-ai 166 tests (4 new), app 103. Real model (Claude Sonnet 5.5, 80 rows): anomaly detection still finds the planted negative salary; the chat now answers EMP1060 = 66 220 and 22 employees above 60 000 by reading the rows (both match the data).