| 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
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
quiq_path: /path/to/quiq.csv
doc_path: /path/to/data_dictionary.pdf
save_path: /path/to/output
python scripts/via.py --config config.yaml
Critical Notes
-
๋ฌธ์ ๋ฏธ์ ๊ณต ์ ์คํ ๋ถ๊ฐ โ doc_path๊ฐ ์๊ฑฐ๋ ํ์ผ์ด ์กด์ฌํ์ง ์์ผ๋ฉด ์คํฌ์ด ์ฆ์ ์ข
๋ฃ๋๋ฉฐ ๋ฌธ์๋ฅผ ์์ฒญํ๋ ๋ฉ์์ง๋ฅผ ์ถ๋ ฅํฉ๋๋ค.
-
๋ฐฐ์น ์ฒ๋ฆฌ โ ๋ณ์ 30๊ฐ์ฉ ๋ฌถ์ด์ LLM์ ํ ๋ฒ์ ์ง์ํฉ๋๋ค. ์ ์ฒด ๋ณ์ ์๊ฐ N์ด๋ฉด ์ฝ โN/30โ๋ฒ API ํธ์ถ์ด ๋ฐ์ํฉ๋๋ค.
-
๋ฌธ์์ ์๋ ๋ณ์ โ ๋ฌธ์์์ ์ฐพ์ง ๋ชปํ ๋ณ์๋ "No description available in the provided document." ๋ก ์ฑ์์ง๋๋ค. ์ด ๊ฒฝ์ฐ downstream LLM ์คํฌ์ ๋ณ์๋ช
๋ง์ผ๋ก ํ๋จํฉ๋๋ค.
-
PDF ์์กด์ฑ โ PDF ์ฝ๊ธฐ์ pdfplumber ์ฌ์ฉ. ๋ฏธ์ค์น ์: pip install pdfplumber
-
Consumed by downstream skills:
format-validity: Description์ผ๋ก ์๋ฃ ์ฝ๋ ์ฒด๊ณ ์๋ณ (ICD-9/LOINC/etc.)
cross-sectional-consistency: ์นดํ
๊ณ ๋ฆฌ ๊ฐ ์๋งจํฑ ๊ทธ๋ฃจํ ์ปจํ
์คํธ๋ก ํ์ฉ
bias-detection: ์ ๋ ์คํฌ์ VIA ์ ๋ฌ
References
- LYDUS ํ์ง๊ด๋ฆฌ ํ๋ก๊ทธ๋จ ํ์ฉ ๊ฐ์ด๋๋ผ์ธ (๋น๊ณต๊ฐ ๋ด๋ถ ๋ฌธ์)
- VIA ๊ฐ๋
์ ์: ์คํฌ๋ฆฐ์ท ๊ธฐ๋ฐ ์ค๊ณ (์ด์ฑ๋ฏผ, 2026-06-21)