skills/llm/answer-accumulation-filter/SKILL.md
Parse sequential yes/no answers to build inclusion/exclusion sets, then apply compound boolean filters to narrow a candidate list
npx skillsauth add wenmin-wu/ds-skills llm-answer-accumulation-filterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
In multi-turn question-answering games, each yes/no answer constrains the solution space. Maintain parallel inclusion and exclusion sets for each attribute dimension (category, region, letter). After each answer, update the appropriate set, then apply all filters as a compound boolean mask on the candidate dataframe. This turns sequential dialogue into progressively tighter database queries.
import pandas as pd
class AnswerAccumulator:
def __init__(self, candidates_df):
self.candidates = candidates_df
self.include = {} # attr -> set of included values
self.exclude = {} # attr -> set of excluded values
def update(self, attr, value, answer_is_yes):
if answer_is_yes:
self.include.setdefault(attr, set()).add(value)
else:
self.exclude.setdefault(attr, set()).add(value)
def filter(self):
mask = pd.Series(True, index=self.candidates.index)
for attr, vals in self.include.items():
mask &= self.candidates[attr].isin(vals)
for attr, vals in self.exclude.items():
mask &= ~self.candidates[attr].isin(vals)
return self.candidates[mask]
acc = AnswerAccumulator(keywords_df)
acc.update('category', 'place', answer_is_yes=True)
acc.update('continent', 'Europe', answer_is_yes=False)
remaining = acc.filter() # all places not in Europe
update(attribute, value, is_yes)filter() to get remaining candidates matching all constraintslen(remaining) to decide whether to ask more questions or guessdata-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF