{"data":{"kind":"file","path":"README.md","version_id":"hfpznmk5ca21fndq5ars5uo3","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":2878,"modified_at":"2026-03-13T17:35:51.323000","content_hash":"b3407d02a54d670d6b88a43d446883021b0904c924c22d27889cfdefd2cd3bac"},"entries":[],"content":"# medpt-gqa\n\n### Overview\n- **Environment ID**: `medpt-gqa`\n- **Short description**: Generative question-answering environment based on MedPT dataset - Portuguese medical questions\n- **Tags**: medical, qa, portuguese, train, eval\n\n### Datasets\n- **Primary dataset(s)**: MedPT\n- **Source links**: https://huggingface.co/datasets/AKCIT/MedPT\n- **Split sizes**: 384k raw. Split in 80% train, 20% eval after deduplication and top-k selection.\n\n### Task\n- **Type**: `vf.SingleTurnEnv`\n- **Output format expectations (optional)**: `vf.XMLParser` with `<response>...</response>` tags. If CoT is enabled, `<reasoning>...</reasoning>` tags are also expected.\n- **Rubric overview**: `vf.JudgeRubric` with `safety_accuracy`, `completeness` and `professional_tone` reward functions. `format_reward_func` is also used.\n\n### Quickstart\nRun an evaluation with default settings:\n\n```bash\nprime eval run medpt-gqa\n```\n\nConfigure model and sampling:\n\n```bash\nprime eval run medpt-gqa   -m gpt-4.1-mini   -n 20 -r 3 -t 1024 -T 0.7   -a '{\"key\": \"value\"}'  # env-specific args as JSON\n```\n\nNotes:\n- Use `-a` / `--env-args` to pass environment-specific configuration as a JSON object.\n\n### Environment Arguments\n\n| Arg | Type | Default | Description |\n| --- | ---- | ------- | ----------- |\n| `dataset_path` | str | `\"AKCIT/MedPT\"` | Path to the dataset |\n| `dataset_split` | str | `\"train\"` | Split of the dataset to use |\n| `eval_size` | float | `0.2` | Size of the evaluation set |\n| `min_reference_answers` | int | `2` | Minimum number of reference answers a question must have to be included in the final set |\n| `max_examples` | int | `-1` | Limit on dataset size (use -1 for all) |\n| `num_shots` | int | `0` | Number of k-shots to use for few-shot prompting |\n| `prompt_lang` | str | `\"pt\"` | Language of the prompt |\n| `seed` | int | `42` | Seed for data preparation |\n| `enable_cot` | bool | `False` | Enable chain-of-thought |\n| `format_reward_weight` | float | `0.0` | Weight of the format reward |\n| `safety_accuracy_weight` | float | `0.5` | Weight of the safety accuracy reward |\n| `completeness_weight` | float | `0.25` | Weight of the completeness reward |\n| `professional_tone_weight` | float | `0.25` | Weight of the professional tone reward |\n| `judge_model` | str | `\"gpt-4.1-mini\"` | Model to use for judging |\n| `judge_base_url` | str | `\"https://api.openai.com/v1\"` | Base URL for the judge model |\n| `judge_api_key_var` | str | `\"OPENAI_API_KEY\"` | Environment variable for the judge API key |\n\n### Metrics\n\n| Metric | Meaning |\n| ------ | ------- |\n| `safety_accuracy` | Clinical safety and accuracy (aligns with reference answers, no dangerous hallucinations). |\n| `completeness` | Completeness (addresses the core inquiry). |\n| `professional_tone` | Professional tone (appropriate bedside manner, includes disclaimers if necessary). |\n| `format_reward` | Format reward. |\n","encoding":"utf-8","truncated":false,"total_bytes":2878},"status":null}