├── .DS_Store ├── .gitignore ├── LICENSE ├── README.md ├── datasets ├── README.md ├── has_squall.py ├── hybridqa.py ├── missing_squall.py ├── mmqa.py ├── tab_fact.py ├── wikitq.py ├── wikitq_scalability_100rows.py ├── wikitq_scalability_200rows.py ├── wikitq_scalability_500rows.py ├── wikitq_scalability_ori.py ├── wikitq_sql_solvable.py ├── wikitq_sql_solvable_lower.py ├── wikitq_sql_unsolvable.py └── wikitq_sql_unsolvable_but_in_squall.py ├── generation ├── generator.py └── prompt.py ├── key.txt ├── nsql ├── .DS_Store ├── database.py ├── nsql_exec.py ├── nsql_exec_python.py ├── parser.py └── qa_module │ ├── 0af77d205dc6673001cdd9ea753f880e.JPG │ ├── __init__.py │ ├── openai_qa.py │ └── vqa.py ├── pics └── binder.png ├── py3.7binder.yaml ├── retrieval ├── retrieve_pool.py └── retriever.py ├── run.py ├── scripts ├── annotate_binder_program.py ├── execute_binder_program.py ├── mmqa │ ├── annotate_binder_program.py │ └── execute_binder_program.py └── w_ic_examples_retrieval │ ├── README.md │ ├── annotate_binder_program.py │ ├── nsql_annotations_tab_fact_train.json │ └── tab_fact_in_context_examples_test_from_train_ids.json.zip ├── templates ├── .DS_Store ├── prompts │ ├── mmqa_binder.txt │ ├── prompt_mmqa_v2_Qa.txt │ ├── prompt_qa_balanced.txt │ ├── prompt_qa_balanced_no_table_input.txt │ ├── prompt_tab_fact_puresql_v2.txt │ ├── prompt_tab_fact_word.txt │ ├── prompt_wikitq_puresql_v3.txt │ ├── prompt_wikitq_python_simplified_v4.txt │ ├── tab_fact_binder.txt │ └── wikitq_binder.txt └── qa_retrieve_pool │ ├── mmqa_qa_retrieve_pool.json │ └── qa_retrieve_pool.json └── utils ├── __init__.py ├── errors.py ├── evaluator.py ├── gpt2 ├── config.json ├── merges.txt ├── tokenizer.json └── vocab.json ├── matcher.py ├── mmqa ├── __init__.py ├── eval_mmqa.py ├── evaluator.py ├── image_stuff.py ├── mmqa_captions.json ├── qc_mmqa_dev.csv ├── qimc.py ├── qimc_mmqa_dev.csv ├── qpmc.py └── qpmc_mmqa_dev.csv ├── normalizer.py ├── sql ├── __init__.py ├── all_keywords.py ├── extraction_from_sql.py └── process_sql.py ├── tab_fact ├── __init__.py └── small_test_id.json ├── utils.py └── wtq ├── __init__.py ├── evaluator.py └── utils.py /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/README.md -------------------------------------------------------------------------------- /datasets/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/README.md -------------------------------------------------------------------------------- /datasets/has_squall.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/has_squall.py -------------------------------------------------------------------------------- /datasets/hybridqa.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/hybridqa.py -------------------------------------------------------------------------------- /datasets/missing_squall.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/missing_squall.py -------------------------------------------------------------------------------- /datasets/mmqa.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/mmqa.py -------------------------------------------------------------------------------- /datasets/tab_fact.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/tab_fact.py -------------------------------------------------------------------------------- /datasets/wikitq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq.py -------------------------------------------------------------------------------- /datasets/wikitq_scalability_100rows.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq_scalability_100rows.py -------------------------------------------------------------------------------- /datasets/wikitq_scalability_200rows.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq_scalability_200rows.py -------------------------------------------------------------------------------- /datasets/wikitq_scalability_500rows.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq_scalability_500rows.py -------------------------------------------------------------------------------- /datasets/wikitq_scalability_ori.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq_scalability_ori.py -------------------------------------------------------------------------------- /datasets/wikitq_sql_solvable.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq_sql_solvable.py -------------------------------------------------------------------------------- /datasets/wikitq_sql_solvable_lower.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq_sql_solvable_lower.py -------------------------------------------------------------------------------- /datasets/wikitq_sql_unsolvable.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq_sql_unsolvable.py -------------------------------------------------------------------------------- /datasets/wikitq_sql_unsolvable_but_in_squall.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/datasets/wikitq_sql_unsolvable_but_in_squall.py -------------------------------------------------------------------------------- /generation/generator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/generation/generator.py -------------------------------------------------------------------------------- /generation/prompt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/generation/prompt.py -------------------------------------------------------------------------------- /key.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nsql/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/nsql/.DS_Store -------------------------------------------------------------------------------- /nsql/database.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/nsql/database.py -------------------------------------------------------------------------------- /nsql/nsql_exec.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/nsql/nsql_exec.py -------------------------------------------------------------------------------- /nsql/nsql_exec_python.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/nsql/nsql_exec_python.py -------------------------------------------------------------------------------- /nsql/parser.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/nsql/parser.py -------------------------------------------------------------------------------- /nsql/qa_module/0af77d205dc6673001cdd9ea753f880e.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/nsql/qa_module/0af77d205dc6673001cdd9ea753f880e.JPG -------------------------------------------------------------------------------- /nsql/qa_module/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nsql/qa_module/openai_qa.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/nsql/qa_module/openai_qa.py -------------------------------------------------------------------------------- /nsql/qa_module/vqa.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/nsql/qa_module/vqa.py -------------------------------------------------------------------------------- /pics/binder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/pics/binder.png -------------------------------------------------------------------------------- /py3.7binder.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/py3.7binder.yaml -------------------------------------------------------------------------------- /retrieval/retrieve_pool.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/retrieval/retrieve_pool.py -------------------------------------------------------------------------------- /retrieval/retriever.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/retrieval/retriever.py -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/run.py -------------------------------------------------------------------------------- /scripts/annotate_binder_program.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/scripts/annotate_binder_program.py -------------------------------------------------------------------------------- /scripts/execute_binder_program.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/scripts/execute_binder_program.py -------------------------------------------------------------------------------- /scripts/mmqa/annotate_binder_program.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/scripts/mmqa/annotate_binder_program.py -------------------------------------------------------------------------------- /scripts/mmqa/execute_binder_program.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/scripts/mmqa/execute_binder_program.py -------------------------------------------------------------------------------- /scripts/w_ic_examples_retrieval/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/scripts/w_ic_examples_retrieval/README.md -------------------------------------------------------------------------------- /scripts/w_ic_examples_retrieval/annotate_binder_program.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/scripts/w_ic_examples_retrieval/annotate_binder_program.py -------------------------------------------------------------------------------- /scripts/w_ic_examples_retrieval/nsql_annotations_tab_fact_train.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/scripts/w_ic_examples_retrieval/nsql_annotations_tab_fact_train.json -------------------------------------------------------------------------------- /scripts/w_ic_examples_retrieval/tab_fact_in_context_examples_test_from_train_ids.json.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/scripts/w_ic_examples_retrieval/tab_fact_in_context_examples_test_from_train_ids.json.zip -------------------------------------------------------------------------------- /templates/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/.DS_Store -------------------------------------------------------------------------------- /templates/prompts/mmqa_binder.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/mmqa_binder.txt -------------------------------------------------------------------------------- /templates/prompts/prompt_mmqa_v2_Qa.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/prompt_mmqa_v2_Qa.txt -------------------------------------------------------------------------------- /templates/prompts/prompt_qa_balanced.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/prompt_qa_balanced.txt -------------------------------------------------------------------------------- /templates/prompts/prompt_qa_balanced_no_table_input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/prompt_qa_balanced_no_table_input.txt -------------------------------------------------------------------------------- /templates/prompts/prompt_tab_fact_puresql_v2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/prompt_tab_fact_puresql_v2.txt -------------------------------------------------------------------------------- /templates/prompts/prompt_tab_fact_word.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/prompt_tab_fact_word.txt -------------------------------------------------------------------------------- /templates/prompts/prompt_wikitq_puresql_v3.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/prompt_wikitq_puresql_v3.txt -------------------------------------------------------------------------------- /templates/prompts/prompt_wikitq_python_simplified_v4.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/prompt_wikitq_python_simplified_v4.txt -------------------------------------------------------------------------------- /templates/prompts/tab_fact_binder.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/tab_fact_binder.txt -------------------------------------------------------------------------------- /templates/prompts/wikitq_binder.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/prompts/wikitq_binder.txt -------------------------------------------------------------------------------- /templates/qa_retrieve_pool/mmqa_qa_retrieve_pool.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/qa_retrieve_pool/mmqa_qa_retrieve_pool.json -------------------------------------------------------------------------------- /templates/qa_retrieve_pool/qa_retrieve_pool.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/templates/qa_retrieve_pool/qa_retrieve_pool.json -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/errors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/errors.py -------------------------------------------------------------------------------- /utils/evaluator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/evaluator.py -------------------------------------------------------------------------------- /utils/gpt2/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/gpt2/config.json -------------------------------------------------------------------------------- /utils/gpt2/merges.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/gpt2/merges.txt -------------------------------------------------------------------------------- /utils/gpt2/tokenizer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/gpt2/tokenizer.json -------------------------------------------------------------------------------- /utils/gpt2/vocab.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/gpt2/vocab.json -------------------------------------------------------------------------------- /utils/matcher.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/matcher.py -------------------------------------------------------------------------------- /utils/mmqa/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/mmqa/eval_mmqa.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/eval_mmqa.py -------------------------------------------------------------------------------- /utils/mmqa/evaluator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/evaluator.py -------------------------------------------------------------------------------- /utils/mmqa/image_stuff.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/image_stuff.py -------------------------------------------------------------------------------- /utils/mmqa/mmqa_captions.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/mmqa_captions.json -------------------------------------------------------------------------------- /utils/mmqa/qc_mmqa_dev.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/qc_mmqa_dev.csv -------------------------------------------------------------------------------- /utils/mmqa/qimc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/qimc.py -------------------------------------------------------------------------------- /utils/mmqa/qimc_mmqa_dev.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/qimc_mmqa_dev.csv -------------------------------------------------------------------------------- /utils/mmqa/qpmc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/qpmc.py -------------------------------------------------------------------------------- /utils/mmqa/qpmc_mmqa_dev.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/mmqa/qpmc_mmqa_dev.csv -------------------------------------------------------------------------------- /utils/normalizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/normalizer.py -------------------------------------------------------------------------------- /utils/sql/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/sql/all_keywords.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/sql/all_keywords.py -------------------------------------------------------------------------------- /utils/sql/extraction_from_sql.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/sql/extraction_from_sql.py -------------------------------------------------------------------------------- /utils/sql/process_sql.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/sql/process_sql.py -------------------------------------------------------------------------------- /utils/tab_fact/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/tab_fact/small_test_id.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/tab_fact/small_test_id.json -------------------------------------------------------------------------------- /utils/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/utils.py -------------------------------------------------------------------------------- /utils/wtq/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/wtq/evaluator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/wtq/evaluator.py -------------------------------------------------------------------------------- /utils/wtq/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xlang-ai/Binder/HEAD/utils/wtq/utils.py --------------------------------------------------------------------------------