Tune Accuracy

by RECERQA

skill

Run accuracy evaluation/tuning for RQ-SCAN and generate reports.

Skill Details


name: tune-accuracy description: "Run accuracy evaluation/tuning for RQ-SCAN and generate reports." metadata: version: "1.0.0"

/tune-accuracy

概要

精度評価・チューニングの実行を支援するスクリプトです。正解データ(CSV/Excel/JSON)と抽出結果を比較し、精度レポートと分析資料を生成します。

使い方

node scripts/tuning-round.mjs <round_number> --config <config_path>

例:

node scripts/tuning-round.mjs 1 --config ./tuning-config.json

必須環境変数

  • RQSCAN_API_URL
  • RQSCAN_API_KEY
  • RQSCAN_ORGANIZATION_ID

設定ファイル(JSON)

最低限の構成例:

{
  "base_dir": ".",
  "workflow_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "ground_truth_path": "./ground_truth.xlsx",
  "ground_truth_sheet": "Sheet1",
  "pdf_directory": "./pdfs",
  "output_directory": "./rounds",
  "target_files_mode": "list",
  "target_files": ["sample1.pdf", "sample2.pdf"],
  "api": {
    "url": "http://localhost:8000",
    "timeout_ms": 300000
  },
  "evaluation": {
    "matching_keys": ["ファイル名", "倉入NO", "名変枝番", "出庫個数"],
    "file_name_key": "ファイル名",
    "fields": ["ファイル名", "出庫日", "運送便名称", "時間帯区分", "出荷先名称", "摘要", "倉入NO", "名変枝番", "出庫個数"],
    "field_rules": {
      "ファイル名": {"compare": "filename"},
      "出庫日": {"compare": "exact"},
      "運送便名称": {"compare": "normalized"},
      "時間帯区分": {"compare": "number"},
      "出荷先名称": {"compare": "normalized"},
      "摘要": {"compare": "remarks"},
      "倉入NO": {"compare": "exact"},
      "名変枝番": {"compare": "number"},
      "出庫個数": {"compare": "number"}
    }
  },
  "format_rule": {
    "description": "帳票から情報を抽出",
    "use_llm": true,
    "llm_model_type": "gemini",
    "ocr_provider": "azure",
    "format_rule_items": [
      {"name": "出庫日", "description": "YYYYMMDD形式"}
    ]
  }
}

入力データ形式

  • CSV: 1行目ヘッダー、2行目以降データ行
  • Excel: ground_truth_sheet 指定(未指定時は先頭シート)
  • JSON: 配列形式、または { records: [...] }

出力

output_directory 配下に以下を生成します:

  • accuracy_report.md
  • extracted_results.json
  • README.md
  • change_log.md
  • error_analysis.md
  • config_used.json

Related Skills

Attack Tree Construction

Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.

skill

Grafana Dashboards

Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.

skill

Matplotlib

Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.

skill

Scientific Visualization

Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.

skill

Seaborn

Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.

skill

Shap

Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model

skill

Pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

skill

Query Writing

For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations

skill

Pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

skill

Scientific Visualization

Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.

skill

Skill Information

Category:Skill
Version:1.0.0
Last Updated:1/20/2026