skills/nlp/prompt-text-concatenation/SKILL.md
Prepends prompt question or full prompt text to input with SEP token for context-aware text evaluation.
npx skillsauth add wenmin-wu/ds-skills nlp-prompt-text-concatenationInstall 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.
When evaluating text quality relative to a prompt (e.g., "how well does this summary capture the source?"), prepend the prompt question or full prompt text to the input, separated by the tokenizer's SEP token. This gives the transformer explicit context about what the text should contain.
def build_input(row, tokenizer, add_question=True, add_prompt=False):
parts = []
if add_question:
parts.append(row["prompt_question"])
if add_prompt:
parts.append(row["prompt_text"])
parts.append(row["text"])
sep = f" {tokenizer.sep_token} "
return sep.join(parts)
# Tokenize with combined input
df["input_text"] = df.apply(lambda r: build_input(r, tokenizer), axis=1)
encodings = tokenizer(df["input_text"].tolist(), truncation=True, max_length=512)
data-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