1. Running with full Data Processing Pipeline from PDF Files:
2. Running from Pre-Built Dataset:
Recommendation: For efficiency, it’s recommended to use the pre-built dataset to save processing time.
requirements.txt, including:
pymupdfpytesseractpdf2imagepdfplumbertorch==2.3.1transformerstqdmRun the script by providing the following arguments:
| Argument | Type | Description |
|---|---|---|
--question_path | String | Path to the JSON file containing the questions. |
--source_path | String | Path to the directory containing reference documents (insurance, finance, and faq). |
--output_path | String | Path where the output JSON will be saved. |
--use_pre_built_dataset | Boolean | If included, uses pre-built chunks to save processing time. |
--use_pre_built_document_titles | Boolean | Only used if use_pre_built_dataset is False. If included, uses pre-built titles instead of extracting them anew. |
Again, it is recommended to use -use_pre_built_dataset to save time or it would probably spend extra 30+ minutes for processing data.
Example:
python main.py --question_path ...questions.json --source_path .../reference --output_path ....pred_retrieve.json --use_pre_built_dataset
1. Running with full Data Processing Pipeline from PDF Files:
2. Running from Pre-Built Dataset:
Recommendation: For efficiency, it’s recommended to use the pre-built dataset to save processing time.
requirements.txt, including:
pymupdfpytesseractpdf2imagepdfplumbertorch==2.3.1transformerstqdmRun the script by providing the following arguments:
| Argument | Type | Description |
|---|---|---|
--question_path | String | Path to the JSON file containing the questions. |
--source_path | String | Path to the directory containing reference documents (insurance, finance, and faq). |
--output_path | String | Path where the output JSON will be saved. |
--use_pre_built_dataset | Boolean | If included, uses pre-built chunks to save processing time. |
--use_pre_built_document_titles | Boolean | Only used if use_pre_built_dataset is False. If included, uses pre-built titles instead of extracting them anew. |
Again, it is recommended to use -use_pre_built_dataset to save time or it would probably spend extra 30+ minutes for processing data.
Example:
python main.py --question_path ...questions.json --source_path .../reference --output_path ....pred_retrieve.json --use_pre_built_dataset