Financial modeling qa

From XuShuwenn/RedAct · View interactive version

Financial modeling qa is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Answer financial data analysis questions from Excel data files and PDF background context.

How to use this skill

Skill file

Financial Data Analysis Q&A

When to Use

Input Files

Critical rule: derive scoring/business logic from the PDF only after you have extracted the relevant rule text completely enough to support the implementation. If PDF extraction is truncated, partial, empty, binary, or cut off mid-sentence, switch extraction method or read smaller targeted sections; do not invent missing rules.

Source-Grounding Rules

Source-Grounding Rules

Common Pattern

Match-based calculations:

Output Format

Single number to /root/answer.txt (just the number, no text)

Execution Protocol

Execution Protocol

Steps

  1. Load data from Excel (.xlsx)
  2. Parse background question to understand what's needed

2a. Extract the full rule text needed for scoring before coding any logic. If the PDF output is truncated, incomplete, or ambiguous, try another extraction method or inspect more pages/regions until the rule is evidenced from the document.

2b. Treat /root/background.pdf as authoritative when it defines scoring, winner rules, filters, or business logic; do not infer or invent those rules from spreadsheet structure alone.

2c. Sanity-check the interpretation on the first few records before scaling: verify which rows/columns hold the needed fields and confirm one complete match pair by hand.

  1. Filter/aggregate based on game pairing rules

3a. Inspect relevant sheets/rows for blanks, incomplete records, hidden rows/sheets, merged cells, and workbook/formula cues about how missing data should be handled.

3b. Before pairing odd/even games, validate record coverage and identifier continuity after any cleaning or filtering.

3c. Do not use dropna() or other cleanup blindly if it can remove turns/games; inspect missing or malformed rows and confirm whether gaps change pairings, match counts, or scoring eligibility.

3d. If Excel headers are not on the first row, detect the real header row before analysis and then re-check downstream grouping/count assumptions.

3e. If multiple plausible treatments of incomplete data produce different answers, resolve the ambiguity from workbook structure, formulas, the PDF, or task instructions before choosing one.

  1. Calculate difference in matches won

4a. Validate extraction counts before trusting the result: expected games, expected pairs, and any missing/incomplete records should reconcile with the workbook contents.

4b. Verify every required game pair/matchup was evaluated.

4c. Before finalizing, confirm that winner/scoring logic comes from an explicit rule in the PDF or a clearly labeled outcome field in the workbook.

4d. Do not use a convenient heuristic unless the provided materials explicitly define it as the win condition.

4e. If anomalies remain unresolved, stop and investigate before writing /root/answer.txt.

  1. Write result

5a. Before writing /root/answer.txt, run or re-run a concise computation that prints the final totals and answer clearly.

5b. If earlier output was truncated, do a targeted rerun that emits only the decisive numbers. Write the answer only after the final value is visible and reproducible.

Tips

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.