The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 9 new columns ({'Gene alias', 'Gene location', 'Multi-species DNA aligment', 'Protein-coding genes', 'Human genome DNA aligment', 'Gene name conversion', 'Gene SNP association', 'SNP location', 'Gene disease association'}) and 3 missing columns ({'SNP gene function', 'sequence gene alias', 'Disease gene location'}).
This happened while the json dataset builder was generating data using
hf://datasets/casey-martin/GeneGPT/geneturing.json (at revision 41a993beb9793d068343f67ab3c05457bf80cf2d)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1870, in _prepare_split_single
writer.write_table(table)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 622, in write_table
pa_table = table_cast(pa_table, self._schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2292, in table_cast
return cast_table_to_schema(table, schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2240, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
Gene alias: struct<What is the official gene symbol of LMP10?: string, What is the official gene symbol of SNAT6?: string, What is the official gene symbol of IMD20?: string, What is the official gene symbol of C20orf195?: string, What is the official gene symbol of CXorf40B?: string, What is the official gene symbol of QSCN6L1?: string, What is the official gene symbol of OR11-86?: string, What is the official gene symbol of NPAP60L?: string, What is the official gene symbol of AF10?: string, What is the official gene symbol of bMRP63?: string, What is the official gene symbol of HsT1192?: string, What is the official gene symbol of ZNF482?: string, What is the official gene symbol of PTH1?: string, What is the official gene symbol of AGTIL?: string, What is the official gene symbol of LEP9?: string, What is the official gene symbol of SEP3?: string, What is the official gene symbol of FFDD3?: string, What is the official gene symbol of C6orf186?: string, What is the official gene symbol of hCAP?: string, What is the official gene symbol of CKBBP1?: string, What is the official gene symbol of TFA?: string, What is the official gene symbol of BMSC-MCP?: string, What is the official gene symbol of PCH3?: string, What is the official gene symbol of OR11-75?: string, What is the official gene symbol of RBAP1?: string, What is the official gene symbol of DCSCRIPT?: string, What is the official gene symbol of 15-LOX?: string, What is the official gene symbol of CT116?: string, Wha
...
genome?: string
child 32, Which chromosome does SNP rs1401416674 locate on human genome?: string
child 33, Which chromosome does SNP rs76491275 locate on human genome?: string
child 34, Which chromosome does SNP rs141272872 locate on human genome?: string
child 35, Which chromosome does SNP rs1281763211 locate on human genome?: string
child 36, Which chromosome does SNP rs1278117191 locate on human genome?: string
child 37, Which chromosome does SNP rs1239675264 locate on human genome?: string
child 38, Which chromosome does SNP rs866998836 locate on human genome?: string
child 39, Which chromosome does SNP rs1228002921 locate on human genome?: string
child 40, Which chromosome does SNP rs976400036 locate on human genome?: string
child 41, Which chromosome does SNP rs397784008 locate on human genome?: string
child 42, Which chromosome does SNP rs1170945868 locate on human genome?: string
child 43, Which chromosome does SNP rs990783431 locate on human genome?: string
child 44, Which chromosome does SNP rs1041819671 locate on human genome?: string
child 45, Which chromosome does SNP rs139642661 locate on human genome?: string
child 46, Which chromosome does SNP rs1263053296 locate on human genome?: string
child 47, Which chromosome does SNP rs1391145256 locate on human genome?: string
child 48, Which chromosome does SNP rs1002944049 locate on human genome?: string
child 49, Which chromosome does SNP rs962314907 locate on human genome?: string
to
{'sequence gene alias': {"What are the aliases of the gene that contains this sequnece:GTAGATGGAACTGGTAGTCAGCTGGAGAGCAGCATGGAGGCGTCCTGGGGGAGCTTCAACGCTGAGCGGGGCTGGTATGTCTCTGTCCAGCAGCCTGAAGAAGCGGAGGCCGA. Let's decompose the question to sub-questions and solve them step by step.": Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), "What are the aliases of the gene that contains this sequnece:ATTGTGAGAGTAACCAACGTGGGGTTACGGGGGAGAATCTGGAGAGAAGAGAAGAGGTTAACAACCCTCCCACTTCCTGGCCACCCCCCTCCACCTTTTCTGGTAAGGAGCCC. Let's decompose the question to sub-questions and solve them step by step.": Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), "What are the aliases of the gene that contains this sequnece:GGAAGAGGCCCCAGCACTGACCTCCGTGGGGGTGGAGATGAGGAGGATGGAAAGGGTGTCTTCCTCCAGCATCTTCCTGAAGGTGAAGGAGGGGCACCTTGGGGTGTCTAAGA. Let's decompose the question to sub-questions and solve them step by step.": Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), "What are the aliases of the gene that contains this sequnece:GCACACGTACGTTCCTCATGAAAGGGACGACGGGAGCTGCATGAAAGCCGAAGTTATGGACCGCTAGCATCTGTCACTGGCCACCGGTTTCCGGGAGTAAGCGGCAGCTACCT. Let's decompose the question to sub-questions and solve them step by step.": Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), "What are the aliases of the gene that contains this sequnece:AGACGTGAAGCCTAGCAGAGGACTTTTTAGCTGCTCACTGGCCCCGCTTGTCTGGCCGACTCATCCGCCCGCGACCCCTAATCCCCTCTGCCTGCCCCAAGATGCTGAAGCCA. Le
...
uestion to sub-questions and solve them step by step.": Value(dtype='string', id=None), "What is the function of the gene associated with SNP rs1199372758? Let's decompose the question to sub-questions and solve them step by step.": Value(dtype='string', id=None), "What is the function of the gene associated with SNP rs1396355441? Let's decompose the question to sub-questions and solve them step by step.": Value(dtype='string', id=None), "What is the function of the gene associated with SNP rs1432624213? Let's decompose the question to sub-questions and solve them step by step.": Value(dtype='string', id=None), "What is the function of the gene associated with SNP rs937944577? Let's decompose the question to sub-questions and solve them step by step.": Value(dtype='string', id=None), "What is the function of the gene associated with SNP rs1450106117? Let's decompose the question to sub-questions and solve them step by step.": Value(dtype='string', id=None), "What is the function of the gene associated with SNP rs34083046? Let's decompose the question to sub-questions and solve them step by step.": Value(dtype='string', id=None), "What is the function of the gene associated with SNP rs149916046? Let's decompose the question to sub-questions and solve them step by step.": Value(dtype='string', id=None), "What is the function of the gene associated with SNP rs1385096481? Let's decompose the question to sub-questions and solve them step by step.": Value(dtype='string', id=None)}}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1420, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1052, in convert_to_parquet
builder.download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 924, in download_and_prepare
self._download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1000, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1741, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1872, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 9 new columns ({'Gene alias', 'Gene location', 'Multi-species DNA aligment', 'Protein-coding genes', 'Human genome DNA aligment', 'Gene name conversion', 'Gene SNP association', 'SNP location', 'Gene disease association'}) and 3 missing columns ({'SNP gene function', 'sequence gene alias', 'Disease gene location'}).
This happened while the json dataset builder was generating data using
hf://datasets/casey-martin/GeneGPT/geneturing.json (at revision 41a993beb9793d068343f67ab3c05457bf80cf2d)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
sequence gene alias dict | Disease gene location dict | SNP gene function dict | Gene alias dict | Gene disease association dict | Gene location dict | Human genome DNA aligment dict | Multi-species DNA aligment dict | Gene name conversion dict | Protein-coding genes dict | Gene SNP association dict | SNP location dict |
|---|---|---|---|---|---|---|---|---|---|---|---|
{
"What are the aliases of the gene that contains this sequnece:GTAGATGGAACTGGTAGTCAGCTGGAGAGCAGCATGGAGGCGTCCTGGGGGAGCTTCAACGCTGAGCGGGGCTGGTATGTCTCTGTCCAGCAGCCTGAAGAAGCGGAGGCCGA. Let's decompose the question to sub-questions and solve them step by step.": [
"SLC38A6",
"NAT-1",
"SNAT6"
],
"What are the... | {
"List chromosome locations of the genes related to Hemolytic anemia due to phosphofructokinase deficiency. Let's decompose the question to sub-questions and solve them step by step.": [
"21q22.3"
],
"List chromosome locations of the genes related to Distal renal tubular acidosis. Let's decompose the questio... | {
"What is the function of the gene associated with SNP rs1217074595? Let's decompose the question to sub-questions and solve them step by step.": "ncRNA",
"What is the function of the gene associated with SNP rs1241371358? Let's decompose the question to sub-questions and solve them step by step.": "Predicted to b... | null | null | null | null | null | null | null | null | null |
null | null | null | {
"What is the official gene symbol of LMP10?": "PSMB10",
"What is the official gene symbol of SNAT6?": "SLC38A6",
"What is the official gene symbol of IMD20?": "FCGR3A",
"What is the official gene symbol of C20orf195?": "FNDC11",
"What is the official gene symbol of CXorf40B?": "EOLA2",
"What is the offici... | {
"What are genes related to Hemolytic anemia due to phosphofructokinase deficiency?": "PFKL",
"What are genes related to Distal renal tubular acidosis?": "SLC4A1, ATP6V0A4",
"What are genes related to Pseudohypoparathyroidism Ic?": "GNAS",
"What are genes related to Glycine N-methyltransferase deficiency?": "G... | {
"Which chromosome is FAM66D gene located on human genome?": "chr8",
"Which chromosome is TTTY7 gene located on human genome?": "chrY",
"Which chromosome is LA16c-329F2.2 gene located on human genome?": "chr16",
"Which chromosome is RGS16 gene located on human genome?": "chr1",
"Which chromosome is FOXL2NB g... | {
"Align the DNA sequence to the human genome:ATTCTGCCTTTAGTAATTTGATGACAGAGACTTCTTGGGAACCACAGCCAGGGAGCCACCCTTTACTCCACCAACAGGTGGCTTATATCCAATCTGAGAAAGAAAGAAAAAAAAAAAAGTATTTCTCT": "chr15:91950805-91950932",
"Align the DNA sequence to the human genome:GGACAGCTGAGATCACATCAAGGATTCCAGAAAGAATTGGCACAGGATCATTCAAGATGCATCTCTCC... | {
"Which organism does the DNA sequence come from:AGGGGCAGCAAACACCGGGACACACCCATTCGTGCACTAATCAGAAACTTTTTTTTCTCAAATAATTCAAACAATCAAAATTGGTTTTTTCGAGCAAGGTGGGAAATTTTTCGAT": "worm",
"Which organism does the DNA sequence come from:CGTACACCATTGGTGCCAGTGACTGTGGTCAATTCGGTAGAAGTAGAGGTAAAAGTGCTGTTCCATGGCTCAGTTGTAGTTATGATGGTGCT... | {
"Convert ENSG00000215251 to official gene symbol.": "FASTKD5",
"Convert ENSG00000205403 to official gene symbol.": "CFI",
"Convert ENSG00000140199 to official gene symbol.": "SLC12A6",
"Convert ENSG00000149476 to official gene symbol.": "TKFC",
"Convert ENSG00000291317 to official gene symbol.": "TMEM276",
... | {
"Is ATP5F1EP2 a protein-coding gene?": "NA",
"Is LOC124907753 a protein-coding gene?": "NA",
"Is AMD1P4 a protein-coding gene?": "NA",
"Is NODAL a protein-coding gene?": "TRUE",
"Is MIR4436B2 a protein-coding gene?": "NA",
"Is NAXE a protein-coding gene?": "TRUE",
"Is LOC124909477 a protein-coding gene?... | {
"Which gene is SNP rs1217074595 associated with?": "LINC01270",
"Which gene is SNP rs1241371358 associated with?": "LRRC23",
"Which gene is SNP rs1481036795 associated with?": "SEPTIN11",
"Which gene is SNP rs1318850293 associated with?": "PLEKHG7",
"Which gene is SNP rs996319727 associated with?": "USP39",... | {
"Which chromosome does SNP rs1430464868 locate on human genome?": "chr13",
"Which chromosome does SNP rs545148486 locate on human genome?": "chr16",
"Which chromosome does SNP rs895485955 locate on human genome?": "chr19",
"Which chromosome does SNP rs1376217783 locate on human genome?": "chr11",
"Which chr... |
GeneGPT
This directory contains code and data for GeneGPT, a tool-augmented LLM for improved access to biomedical information.
Introduction
While large language models (LLMs) have been successfully applied to various tasks, they still face challenges with hallucinations, especially for specialized knowledge. We propose GeneGPT, a novel approach to address this challenge by teaching LLMs to exploit biomedical tools, specifically NCBI Web APIs, for answering information-seeking questions. Our approach utilizes in-context learning, coupled with a novel decoding algorithm that can identify and execute API calls. Empirical results show that GeneGPT achieves state-of-the-art (SOTA) performance on eight GeneTuring tasks with an average score of 0.83, largely surpassing previous SOTA (0.44 by New Bing), biomedical LLMs such as BioGPT (0.04), and ChatGPT (0.12). Further analyses suggest that: Firstly, API demonstrations are more effective than documentations for in-context tool learning; Secondly, GeneGPT can generalize to longer chains of API calls and answer multi-hop questions; Lastly, the unique and task-specific errors made by GeneGPT provide valuable insights for future improvements. Our results underline the potential of integrating domain-specific tools with LLMs for improved access and accuracy in specialized knowledge areas.
Requirements
The code has been tested with Python 3.9.13. Please first install the required packages by:
pip install -r requirements.txt
You also need an OpenAI API key to run GeneGPT with Codex. Replace the placeholder with your key in config.py:
$ cat config.py
API_KEY = 'YOUR_OPENAI_API_KEY'
Using GeneGPT
After setting up the environment, one can run GeneGPT on GeneTuring by:
python main.py 111111
where 111111 denotes that all Documentations (Dc.1-2) and Demonstrations (Dm.1-4) are used.
To run GeneGPT-slim, simply use:
python main.py 001001
which will only use the Dm.1 and Dm.4 for in-context learning.
Evaluating GeneGPT
One can evaluate the results by running:
python evaluate.py ${RESULT_DIRECTORY}
For example, we also put our experimental results in geneturing_results and geneturing_results. By running:
python evaluate.py geneturing_results/001001/
The user can get the evaluation results of GeneGPT-slim:
Evaluating geneturing_results/001001/Gene alias.json
0.84
Evaluating geneturing_results/001001/Gene disease association.json
0.6613333333333332
Evaluating geneturing_results/001001/Gene location.json
0.66
Evaluating geneturing_results/001001/Human genome DNA aligment.json
0.44
Evaluating geneturing_results/001001/Multi-species DNA aligment.json
0.88
Evaluating geneturing_results/001001/Gene name conversion.json
1.0
Evaluating geneturing_results/001001/Protein-coding genes.json
1.0
Evaluating geneturing_results/001001/Gene SNP association.json
1.0
Evaluating geneturing_results/001001/SNP location.json
0.98
Acknowledgments
This work was supported by the Intramural Research Programs of the National Institutes of Health, National Library of Medicine.
Disclaimer
This tool shows the results of research conducted in the Computational Biology Branch, NCBI/NLM. The information produced on this website is not intended for direct diagnostic use or medical decision-making without review and oversight by a clinical professional. Individuals should not change their health behavior solely on the basis of information produced on this website. NIH does not independently verify the validity or utility of the information produced by this tool. If you have questions about the information produced on this website, please see a health care professional. More information about NCBI's disclaimer policy is available.
Citation
If you find this repo helpful, please cite GeneGPT by:
@misc{jin2023genegpt,
title={GeneGPT: Augmenting Large Language Models with Domain Tools for Improved Access to Biomedical Information},
author={Qiao Jin and Yifan Yang and Qingyu Chen and Zhiyong Lu},
year={2023},
eprint={2304.09667},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- Downloads last month
- 45