Skip to main content

via

Generate VIA (Variable Information Archive) table from a user-provided documentation file (PDF or text). Requires a data dictionary or schema documentation to produce meaningful variable descriptions. If no document is provided, the skill will ask for one before proceeding. Output is used as input to format-validity, cross-sectional-consistency, and bias-detection skills.

Jump to install

Source facts

Repository
28sungmin/m4-add-skills
Last source activity
July 9, 2026 at 10:57
Detected SKILL.md language
Mixed languages
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
4 files

Showing SKILL.md

SKILL.md
Source instructions ยท Read-only preview
name
via
description
Generate VIA (Variable Information Archive) table from a user-provided documentation file (PDF or text). Requires a data dictionary or schema documentation to produce meaningful variable descriptions. If no document is provided, the skill will ask for one before proceeding. Output is used as input to format-validity, cross-sectional-consistency, and bias-detection skills.
tier
community
category
lydus
parameters
{"quiq_path":{"description":"Path to QUIQ-format CSV file (output of quiq skill).","type":"string"},"doc_path":{"description":"Path to documentation file describing the variables (PDF, txt, md, etc.). REQUIRED โ€” the skill will not run without this.","type":"string"},"save_path":{"description":"Directory path to save output file (via.csv).","type":"string"}}
# VIA (Variable Information Archive) Generates a **VIA table** by reading a user-provided documentation file and using an LLM to extract a description for every unique `(Original_table_name, Variable_name)` pair in the QUIQ dataset. > โš ๏ธ **๋ฌธ์„œ ํ•„์ˆ˜**: VIA๋Š” ๋ณ€์ˆ˜ ์„ค๋ช… ๋ฌธ์„œ ์—†์ด ์‹คํ–‰๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ ๋”•์…”๋„ˆ๋ฆฌ, ์ฝ”๋“œ๋ถ, ์Šคํ‚ค๋งˆ ๋ฌธ์„œ ๋“ฑ์„ ๋จผ์ € ์ค€๋น„ํ•ด์ฃผ์„ธ์š”. ## When to Use This Skill - Before running `format-validity` โ€” VIA descriptions help identify the correct medical code system (ICD-9/10, LOINC, etc.) - Before running `cross-sectional-consistency` โ€” VIA provides context for LLM-based categorical value grouping - Before running `bias-detection` โ€” orchestrates both above skills ## VIA Table Schema | Column | Type | Description | |--------|------|-------------| | `Original_table_name` | String | Source table name (same as in QUIQ) | | `Variable_name` | String | Variable name (same as in QUIQ) | | `Description` | String | Description extracted from the provided documentation | ## Supported Document Formats | Format | Extension | |--------|-----------| | PDF | `.pdf` | | Plain text | `.txt` | | Markdown | `.md` | | CSV / TSV (data dictionary ํ˜•ํƒœ) | `.csv`, `.tsv` | | ๊ธฐํƒ€ ํ…์ŠคํŠธ ํŒŒ์ผ | ๋ชจ๋‘ ๊ฐ€๋Šฅ | ## Generation Pipeline ``` 1. doc_path ๋ฏธ์ œ๊ณต ์‹œ โ†’ "๋ฌธ์„œ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค" ๋ฉ”์‹œ์ง€ ์ถœ๋ ฅ ํ›„ ์ข…๋ฃŒ 2. ๋ฌธ์„œ ์ฝ๊ธฐ (PDF: pdfplumber, ํ…์ŠคํŠธ: UTF-8) 3. QUIQ์—์„œ (Original_table_name, Variable_name) ๊ณ ์œ  ์กฐํ•ฉ ์ถ”์ถœ 4. 30๊ฐœ ๋‹จ์œ„ ๋ฐฐ์น˜๋กœ LLM์— ์งˆ์˜: "์ด ๋ฌธ์„œ์—์„œ ๋‹ค์Œ ๋ณ€์ˆ˜๋“ค์˜ ์„ค๋ช…์„ ์ฐพ์•„ 1-2๋ฌธ์žฅ์œผ๋กœ ์ž‘์„ฑํ•ด์ค˜" 5. ์‘๋‹ต ํŒŒ์‹ฑ โ†’ via.csv ์ €์žฅ ``` ## Output | File | Description | |------|-------------| | `via.csv` | VIA table: Original_table_name, Variable_name, Description | ## How to Run ```python import pandas as pd from scripts.via import get_via quiq = pd.read_csv("/path/to/quiq.csv") via_df = get_via(quiq, doc_path="/path/to/mimic_data_dictionary.pdf") via_df.to_csv("/path/to/output/via.csv", index=False, encoding="utf-8-sig") ``` ### As a script with config ```yaml # config.yaml quiq_path: /path/to/quiq.csv doc_path: /path/to/data_dictionary.pdf # ํ•„์ˆ˜ save_path: /path/to/output ``` ```bash python scripts/via.py --config config.yaml ``` ## Critical Notes 1. **๋ฌธ์„œ ๋ฏธ์ œ๊ณต ์‹œ ์‹คํ–‰ ๋ถˆ๊ฐ€** โ€” `doc_path`๊ฐ€ ์—†๊ฑฐ๋‚˜ ํŒŒ์ผ์ด ์กด์žฌํ•˜์ง€ ์•Š์œผ๋ฉด ์Šคํ‚ฌ์ด ์ฆ‰์‹œ ์ข…๋ฃŒ๋˜๋ฉฐ ๋ฌธ์„œ๋ฅผ ์š”์ฒญํ•˜๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค. 2. **๋ฐฐ์น˜ ์ฒ˜๋ฆฌ** โ€” ๋ณ€์ˆ˜ 30๊ฐœ์”ฉ ๋ฌถ์–ด์„œ LLM์— ํ•œ ๋ฒˆ์— ์งˆ์˜ํ•ฉ๋‹ˆ๋‹ค. ์ „์ฒด ๋ณ€์ˆ˜ ์ˆ˜๊ฐ€ N์ด๋ฉด ์•ฝ โŒˆN/30โŒ‰๋ฒˆ API ํ˜ธ์ถœ์ด ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. 3. **๋ฌธ์„œ์— ์—†๋Š” ๋ณ€์ˆ˜** โ€” ๋ฌธ์„œ์—์„œ ์ฐพ์ง€ ๋ชปํ•œ ๋ณ€์ˆ˜๋Š” `"No description available in the provided document."` ๋กœ ์ฑ„์›Œ์ง‘๋‹ˆ๋‹ค. ์ด ๊ฒฝ์šฐ downstream LLM ์Šคํ‚ฌ์€ ๋ณ€์ˆ˜๋ช…๋งŒ์œผ๋กœ ํŒ๋‹จํ•ฉ๋‹ˆ๋‹ค. 4. **PDF ์˜์กด์„ฑ** โ€” PDF ์ฝ๊ธฐ์— `pdfplumber` ์‚ฌ์šฉ. ๋ฏธ์„ค์น˜ ์‹œ: `pip install pdfplumber` 5. **Consumed by downstream skills**: - `format-validity`: Description์œผ๋กœ ์˜๋ฃŒ ์ฝ”๋“œ ์ฒด๊ณ„ ์‹๋ณ„ (ICD-9/LOINC/etc.) - `cross-sectional-consistency`: ์นดํ…Œ๊ณ ๋ฆฌ ๊ฐ’ ์‹œ๋งจํ‹ฑ ๊ทธ๋ฃจํ•‘ ์ปจํ…์ŠคํŠธ๋กœ ํ™œ์šฉ - `bias-detection`: ์œ„ ๋‘ ์Šคํ‚ฌ์— VIA ์ „๋‹ฌ ## References - LYDUS ํ’ˆ์งˆ๊ด€๋ฆฌ ํ”„๋กœ๊ทธ๋žจ ํ™œ์šฉ ๊ฐ€์ด๋“œ๋ผ์ธ (๋น„๊ณต๊ฐœ ๋‚ด๋ถ€ ๋ฌธ์„œ) - VIA ๊ฐœ๋… ์ •์˜: ์Šคํฌ๋ฆฐ์ƒท ๊ธฐ๋ฐ˜ ์„ค๊ณ„ (์ด์„ฑ๋ฏผ, 2026-06-21)
View on GitHub