sae-program-viewer / data /v2 /shared.json
AmiriHayes's picture
Add v2 agent transcript and program panel below the v1 transcript
c65a743 verified
Raw History Blame Contribute Delete
5.12 kB
{
"shared_prompt_prefix": "You describe the feature with a PROGRAM: some named token sets, a few\nclauses over them, and a boolean expression combining the clauses.\n\n {\"sets\": [\"CURRENCY_SYMBOLS\",\"NUMBER_TOKENS\"],\n \"clauses\": [\n {\"id\":\"c1\",\"slot\":\"tok-2\",\"op\":\"in\",\"set\":\"CURRENCY_SYMBOLS\"},\n {\"id\":\"c2\",\"slot\":\"tok-1\",\"op\":\"in\",\"set\":\"NUMBER_TOKENS\"}],\n \"logic\": \"c1 and c2\"}\n\nSLOTS\n tok-1 .. tok-5 a single token. tok-1 IS the position being classified,\n tok-2 the token before it, and so on back.\n window(k) the k tokens immediately before tok-1, k from 2 to 12.\n\nOPERATORS\n in tok slots only. The token is a member of the named set.\n any_in window slots only. At least one token in the window is in the set.\n count_in window slots only, with \"n\": at least n tokens of the window are\n in the set. n from 1 to 5.\n endswith the token's last characters are in the set; the harness fits a\n set of word endings rather than whole tokens.\n pred a built-in test, no set needed. One of:\n isdigit isupper istitle is_punct single_char\n regex tok slots only. {\"op\":\"regex\",\"pattern\":\"^\\\\s?[0-9]+$\",\"flags\":\"i\"}\n The pattern is matched with re.search against the token's STRING\n over the whole vocabulary. \"flags\":\"i\" is case-insensitive.\n Use it when you can describe the SHAPE of a token but listing the\n tokens would be guesswork.\n\nLOGIC\n Clause ids joined with and / or / not and parentheses. No length limit.\n\nLIMITS\n At most 8 clauses and 8 sets. Set names must be descriptive: at least three\n characters, starting with a letter. Single letters like \"S\" are rejected.\n\nFIT SETTINGS \u2014 you may seed a set instead of leaving it entirely to the solver.\nSend a \"fit_settings\" object alongside the spec:\n\n \"fit_settings\": {\n \"CURRENCY_SYMBOLS\": {\"mode\":\"fixed\", \"tokens\":[\"$\",\"\\u00a3\",\"\\u20ac\"]},\n \"NUMBER_TOKENS\": {\"mode\":\"extend\", \"tokens\":[\"0\",\"1\",\"2\"]}\n }\n\n mode \"fit\" the solver fills the set from the data. This is the default\n for any set you do not mention.\n mode \"fixed\" your tokens are used exactly as given.\n mode \"prune\" start from your tokens; the solver may only REMOVE.\n mode \"extend\" start from your tokens; the solver may only ADD from the data.\n \"variants\":true on any seeded set also admits the capitalisation and\n leading-space forms of your tokens (\"and\" also covers \" and\",\n \"And\", \" And\", \"AND\").\n\n Under \"prune\" a token is dropped only when the data argues against it: it\n must occur at least three times and fire less often than the set does on\n average. Tokens the data is silent about are kept.\n\nA WORKED EXAMPLE, on a made-up feature\n Suppose the examples made you believe the feature fires on a number that\n follows a currency symbol \u2014 \"$\" then \"500\". You would define\n CURRENCY_SYMBOLS for the symbol and NUMBER_TOKENS for the digits, put a\n clause on tok-2 for the symbol and a clause on tok-1 for the number, and\n join them with \"and\". If you were confident about the symbols but not the\n digits you would fix CURRENCY_SYMBOLS and let the solver fit NUMBER_TOKENS.\n If instead you thought the shape mattered more than the exact tokens, you\n would drop NUMBER_TOKENS and use {\"op\":\"regex\",\"pattern\":\"^\\\\s?[0-9]\"} on\n tok-1. This feature is not one of the ones you will be asked about; it only\n shows the moves available.\n\nACTIONS \u2014 one JSON object per reply, nothing else.\n\nROUND 1 IS DIFFERENT. Your first reply must offer THREE structurally different\ncandidate programs \u2014 not three variations of one idea, but three different\nreadings of the data (for example: one keyed on the scored token alone, one on\na token before it, one on something in a window). All three are fitted and\nscored, and you then refine whichever looks best. Every candidate counts as a\nround for the purpose of choosing what to keep, so a first-round candidate can\nwin outright.\n\n {\"action\":\"propose_many\",\n \"rationale\":\"<two sentences>\",\n \"candidates\":[{\"spec\":{...},\"fit_settings\":{...}},\n {\"spec\":{...}}, {\"spec\":{...}}]}\n\nLATER ROUNDS use:\n\n {\"action\":\"propose\",\n \"rationale\":\"<two sentences: what you noticed in the data, and what this\n proposal tests>\",\n \"spec\":{...},\n \"fit_settings\":{...}} fit_settings is optional\n\n {\"action\":\"submit\",\"rationale\":\"<two sentences: why you are stopping>\"}\n\nAfter each proposal you are told its precision, recall and F1 on the fitting\ndata AND cross-validated over three folds of it, each fold scored by a fit that\nnever saw it, the size and leading\nmembers of every set under YOUR names, and samples of the positions it got\nwrong in both directions. You have up to ",
"n": 1167
}