diff --git a/example/transform/huggingface_model_json.ipynb b/example/transform/huggingface_model_json.ipynb index ef43b77b..9dcbe576 100644 --- a/example/transform/huggingface_model_json.ipynb +++ b/example/transform/huggingface_model_json.ipynb @@ -79,14 +79,9 @@ } ], "source": [ - "from dotenv import load_dotenv\n", - "from IPython.display import display\n", - "\n", "from uniflow.flow.client import TransformClient\n", "from uniflow.flow.config import HuggingfaceModelConfig, TransformQAHuggingFaceJsonFormatConfig\n", - "from uniflow.op.prompt import Context\n", - "\n", - "load_dotenv()" + "from uniflow.op.prompt import Context" ] }, { diff --git a/example/transform/huggingface_pdf_source_irs_QA.ipynb b/example/transform/huggingface_pdf_source_irs_QA.ipynb new file mode 100644 index 00000000..868cce90 --- /dev/null +++ b/example/transform/huggingface_pdf_source_irs_QA.ipynb @@ -0,0 +1,1323 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "7cbc4c4a", + "metadata": {}, + "source": [ + "# Example of generating QAs for IRS PDF\n", + "In this example, we will show you how to generate question-answers (QAs) from a pdf using Huggingface's models via `uniflow`'s [TransformQAHuggingFaceJsonFormatConfig](https://github.com/CambioML/uniflow/blob/main/uniflow/flow/config.py#L168).\n", + "\n", + "For this example, we're using [IRS 2023](https://www.irs.gov/pub/irs-pdf/p535.pdf).\n", + "\n", + "### Before running the code\n", + "\n", + "You will need to `uniflow` conda environment to run this notebook. You can set up the environment following the instruction: https://github.com/CambioML/uniflow/tree/main#installation.\n", + "\n", + "For more details, see this [instruction](https://github.com/CambioML/uniflow/tree/main?tab=readme-ov-file#huggingfacemodelconfig)\n", + "\n", + "Finally, we are storing the IRS dataset in the `data\\raw_input` directory as \"IRS_2023.pdf\". You can download the file from [here](https://www.irs.gov/pub/irs-pdf/p535.pdf)." + ] + }, + { + "cell_type": "markdown", + "id": "f0680f79", + "metadata": {}, + "source": [ + "### Update system path" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "e48abf8f", + "metadata": {}, + "outputs": [], + "source": [ + "%reload_ext autoreload\n", + "%autoreload 2\n", + "\n", + "import sys\n", + "\n", + "sys.path.append(\".\")\n", + "sys.path.append(\"..\")\n", + "sys.path.append(\"../..\")" + ] + }, + { + "cell_type": "markdown", + "id": "20612882", + "metadata": {}, + "source": [ + "### Install helper packages" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "b161dd54", + "metadata": {}, + "outputs": [], + "source": [ + "!{sys.executable} -m pip install -q langchain pandas pypdf" + ] + }, + { + "cell_type": "markdown", + "id": "f010f635", + "metadata": {}, + "source": [ + "### Import Dependency" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "8d84dd70", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import os\n", + "\n", + "import pandas as pd\n", + "\n", + "from uniflow.flow.client import ExtractClient, TransformClient\n", + "from uniflow.flow.config import ExtractPDFConfig, TransformQAHuggingFaceJsonFormatConfig\n", + "from uniflow.op.extract.split.constants import MARKDOWN_HEADER_SPLITTER\n", + "from uniflow.op.model.model_config import HuggingfaceModelConfig, NougatModelConfig\n", + "from uniflow.op.prompt import PromptTemplate, Context" + ] + }, + { + "cell_type": "markdown", + "id": "cb677037", + "metadata": {}, + "source": [ + "### Prepare the input data\n", + "\n", + "First, we need to pre-process the PDF to get text chunks that we can feed into the model. We will use `uniflow`'s `ExtractPDFConfig`." + ] + }, + { + "cell_type": "markdown", + "id": "ef64b646", + "metadata": {}, + "source": [ + "#### Load PDF" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "a707ef78", + "metadata": {}, + "outputs": [], + "source": [ + "pdf_file = \"IRS_2023.pdf\"" + ] + }, + { + "cell_type": "markdown", + "id": "4b177df1", + "metadata": {}, + "source": [ + "##### Set current directory and input data directory." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "092b355a", + "metadata": {}, + "outputs": [], + "source": [ + "dir_cur = os.getcwd()\n", + "input_file = os.path.join(f\"{dir_cur}/data/raw_input/\", pdf_file)" + ] + }, + { + "cell_type": "markdown", + "id": "7e90b269", + "metadata": {}, + "source": [ + "#### Set correct path" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "63e9a7f7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[{'filename': '/home/ubuntu/uniflow/example/transform/data/raw_input/IRS_2023.pdf'}]\n" + ] + } + ], + "source": [ + "data = [\n", + " {\"filename\": input_file},\n", + "]\n", + "\n", + "from pprint import pprint\n", + "\n", + "pprint(data)" + ] + }, + { + "cell_type": "markdown", + "id": "6fd95598", + "metadata": {}, + "source": [ + "#### Create extract_config" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "9ddba5ea", + "metadata": {}, + "outputs": [], + "source": [ + "extract_config = ExtractPDFConfig(\n", + " model_config=NougatModelConfig(\n", + " model_name=\"0.1.0-small\",\n", + " batch_size=1, # When batch_size>1, nougat will run on CUDA, otherwise it will run on CPU\n", + " ),\n", + " splitter=MARKDOWN_HEADER_SPLITTER,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "d7b5a712", + "metadata": {}, + "source": [ + "#### Create extract_client" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "cae041e2", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/conda/envs/uniflow/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3526.)\n", + " return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\n" + ] + } + ], + "source": [ + "extract_client = ExtractClient(extract_config)" + ] + }, + { + "cell_type": "markdown", + "id": "cd71259d", + "metadata": {}, + "source": [ + "#### Run extract_client" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "8ab2ec60", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + " 0%| | 0/1 [00:00\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ContextQuestion
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.1. Where can I find specific tax topics in Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.3. What categories of tax topics are available on the IRS Interactive Tax Assistant (ITA) page that relate to Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.4. Can I download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms?
.........
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...36. What are some common misconceptions about tax filing requirements?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...37. How does percentage depletion work for oil and gas wells?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...38. What is the difference between exploratory expenses and development costs for tax purposes?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...39. What are the key differences between partnerships and corporations for tax purposes?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...40. What factors determine whether coal, iron, or similar
\n", + "

2977 rows × 2 columns

\n", + "" + ], + "text/plain": [ + " Context \\\n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + ".. ... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "\n", + " Question \n", + "0 \n", + "0 1. Where can I find specific tax topics in Publication 535? \n", + "0 2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535? \n", + "0 3. What categories of tax topics are available on the IRS Interactive Tax Assistant (ITA) page that relate to Publication 535? \n", + "0 4. Can I download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms? \n", + ".. ... \n", + "195 36. What are some common misconceptions about tax filing requirements? \n", + "195 37. How does percentage depletion work for oil and gas wells? \n", + "195 38. What is the difference between exploratory expenses and development costs for tax purposes? \n", + "195 39. What are the key differences between partnerships and corporations for tax purposes? \n", + "195 40. What factors determine whether coal, iron, or similar \n", + "\n", + "[2977 rows x 2 columns]" + ] + }, + "execution_count": 92, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "id": "297bf8de", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ContextQuestion
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.1. Where can I find specific tax topics in Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.3. What categories of tax topics are available on the IRS Interactive Tax Assistant (ITA) page that relate to Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.4. Can I download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms?
.........
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...36. What are some common misconceptions about tax filing requirements?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...37. How does percentage depletion work for oil and gas wells?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...38. What is the difference between exploratory expenses and development costs for tax purposes?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...39. What are the key differences between partnerships and corporations for tax purposes?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...40. What factors determine whether coal, iron, or similar
\n", + "

2647 rows × 2 columns

\n", + "
" + ], + "text/plain": [ + " Context \\\n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + ".. ... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "\n", + " Question \n", + "0 \n", + "0 1. Where can I find specific tax topics in Publication 535? \n", + "0 2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535? \n", + "0 3. What categories of tax topics are available on the IRS Interactive Tax Assistant (ITA) page that relate to Publication 535? \n", + "0 4. Can I download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms? \n", + ".. ... \n", + "195 36. What are some common misconceptions about tax filing requirements? \n", + "195 37. How does percentage depletion work for oil and gas wells? \n", + "195 38. What is the difference between exploratory expenses and development costs for tax purposes? \n", + "195 39. What are the key differences between partnerships and corporations for tax purposes? \n", + "195 40. What factors determine whether coal, iron, or similar \n", + "\n", + "[2647 rows x 2 columns]" + ] + }, + "execution_count": 94, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = df.drop_duplicates()\n", + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "id": "f9c47f72", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ContextQuestion
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.1. Where can I find specific tax topics in Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.3. What categories of tax topics are available on the IRS Interactive Tax Assistant (ITA) page that relate to Publication 535?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.4. Can I download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms?
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.5. How long does it take for the IRS to process my request for ordering current forms, instructions, and publications through their website?
.........
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...36. What are some common misconceptions about tax filing requirements?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...37. How does percentage depletion work for oil and gas wells?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...38. What is the difference between exploratory expenses and development costs for tax purposes?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...39. What are the key differences between partnerships and corporations for tax purposes?
195### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp...40. What factors determine whether coal, iron, or similar
\n", + "

2622 rows × 2 columns

\n", + "
" + ], + "text/plain": [ + " Context \\\n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + ".. ... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "195 ### How Can You Learn About Your Taxpayer Rights? The Taxpayer Bill of Rights describes 10 basic rights that all taxpayers have when dealing with the IRS. Go to _Taxpayer.ak/.pick/.pick_ to help you understand what these rights mean to you and how they apply. These are _your_ rights. Know them. Use them. You can find a list of your rights and the IRS's obligations to protect them in _Pub.L.Y. Your Rights as a Taxayer_. It includes the following. 1. **The Right To Be Informed.** Taxayers have the right to know what they need to do to comply with the tax laws. They are entitled to clear explanations of the laws and IRS procedures in all tax forms, instructions, publications, notices, and correspondence. They have the right to be informed of IRS decisions about their tax accounts and to receive clear explanations of the outcomes. 2. **The Right to Quality Service.** Taxayers have the right to receive prompt, courous, and professional assistance in their dealings with the IRS, to be sp... \n", + "\n", + " Question \n", + "0 1. Where can I find specific tax topics in Publication 535? \n", + "0 2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535? \n", + "0 3. What categories of tax topics are available on the IRS Interactive Tax Assistant (ITA) page that relate to Publication 535? \n", + "0 4. Can I download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms? \n", + "0 5. How long does it take for the IRS to process my request for ordering current forms, instructions, and publications through their website? \n", + ".. ... \n", + "195 36. What are some common misconceptions about tax filing requirements? \n", + "195 37. How does percentage depletion work for oil and gas wells? \n", + "195 38. What is the difference between exploratory expenses and development costs for tax purposes? \n", + "195 39. What are the key differences between partnerships and corporations for tax purposes? \n", + "195 40. What factors determine whether coal, iron, or similar \n", + "\n", + "[2622 rows x 2 columns]" + ] + }, + "execution_count": 96, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = df[df[\"Question\"].str.strip().astype(bool)]\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "8f321fcb", + "metadata": {}, + "source": [ + "#### If you want to save the output and do the rest of the generation later, you can save and retrieve it here." + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "id": "4d2807d3", + "metadata": {}, + "outputs": [], + "source": [ + "df.to_pickle('my_dataframe.pkl')" + ] + }, + { + "cell_type": "markdown", + "id": "dd7bc948", + "metadata": {}, + "source": [ + "#### We need to create the prompt and instruction for answer generation" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "35ca7e5e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "answer_instruction:\n", + "\n", + "Based on the context provided, generate an answer that directly addresses the question. Start your response with the question number followed by a period and a space. For example, if the question is number 1, begin your answer with '1. ' followed by the response.\n", + " \n", + "\n" + ] + } + ], + "source": [ + "answer_instruction = \"\"\"\n", + "Based on the context provided, generate an answer that directly addresses the question. Start your response with the question number followed by a period and a space. For example, if the question is number 1, begin your answer with '1. ' followed by the response.\n", + "\"\"\"\n", + "\n", + "\n", + "answer_prompt = PromptTemplate(instruction=answer_instruction)\n", + "\n", + "print(\"answer_instruction:\")\n", + "print(answer_instruction, \"\\n\")" + ] + }, + { + "cell_type": "markdown", + "id": "de793e42", + "metadata": {}, + "source": [ + "#### TransformConfig for answer" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "254fd599", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Loading checkpoint shards: 100%|██████████| 3/3 [00:04<00:00, 1.50s/it]\n" + ] + } + ], + "source": [ + "answer_config = TransformQAHuggingFaceJsonFormatConfig(\n", + " prompt_template=answer_prompt,\n", + " model_config=HuggingfaceModelConfig(\n", + " batch_size=16,\n", + " response_start_key=\"answer\",\n", + " response_format={\"type\": \"json_object\"},\n", + " ),\n", + ")\n", + "answer_client = TransformClient(answer_config)" + ] + }, + { + "cell_type": "markdown", + "id": "0faf6d69", + "metadata": {}, + "source": [ + "#### Format data to feed into answer_client" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "bcf8c3c6", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sample size of processed input data: 2622\n" + ] + }, + { + "data": { + "text/plain": [ + "[Context(context=\"**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \", question='1. Where can I find specific tax topics in Publication 535?'),\n", + " Context(context=\"**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \", question='2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535?')]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "input_question = [\n", + " Context(\n", + " context=row[\"Context\"],\n", + " question=row[\"Question\"],\n", + " )\n", + " for index, row in df.iterrows()\n", + "]\n", + "\n", + "print(\"sample size of processed input data: \", len(input_question))\n", + "\n", + "input_question[:2]" + ] + }, + { + "cell_type": "markdown", + "id": "34c50b94", + "metadata": {}, + "source": [ + "#### `run` the `answer_client`" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "8f638e0f", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + " 0%| | 0/164 [00:00\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ContextQuestionAnswer
0**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.1. Where can I find specific tax topics in Publication 535?1. You can find specific tax topics in Publication 535 by going to the IRS Interactive Tax Assistant page at IRS.gov ( Hela/ITA ). Use the search feature or view the categories listed to find topics related to your query.
1**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535?2. To use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535, follow these steps: 1. Go to the IRS Interactive Tax Assistant (ITA) page at IRS.gov/Help/ITA. 2. In the Search box located in the top right corner of the page, type \"Publication 535\" or specific keywords related to the topic within the publication. 3. Press Enter or click the magnifying glass icon next to the search box to initiate the search. 4. Review the results displayed on the screen and select the relevant tax topic to access more information and resources.
2**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.3. What categories of tax topics are available on the IRS Interactive Tax Assistant (ITA) page that relate to Publication 535?3. On the IRS Interactive Tax Assistant (ITA) page, the following categories related to Publication 535 may be found: \"Getting tax help,\" which includes topics on how to obtain assistance with tax issues, including information about Publication 535 itself. Other relevant categories might include \"Tax credits and deductions\" or \"Retirement plans and IRAs.\" Use the search feature on the IRS Interactive Tax Assistant page to explore these and other potential categories in more detail.
3**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.4. Can I download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms?4. Yes, you can download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms.
4**Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online.5. How long does it take for the IRS to process my request for ordering current forms, instructions, and publications through their website?5. There is no specific time mentioned in the context for the IRS to process a request for ordering current forms, instructions, and publications through their website. However, it is suggested that individuals can get these materials faster online compared to ordering them.
............
2363### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_.5. What types of issues can taxpayers bring before TAS for resolution?5. Taxpayers can bring various issues before TAS for resolution, including but not limited to: disputes involving income tax, payroll tax, estate and gift tax, and collection matters. They can also seek assistance in resolving identity theft cases or appeals related to penalties or interest assessments. Additionally, TAS may help taxpayers who believe they have received incorrect refunds or overassessments. However, it's important to note that TAS does not have the authority to change the law or grant amnesty from taxes owed.
2364### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_.6. How long does it typically take for TAS to review and respond to a case once it has been submitted?6. The length of time it takes for TAS to review and respond to a case can vary greatly depending on the complexity of the issue and the volume of cases they are currently handling. On average, it may take anywhere from several months to over a year for a decision to be made. However, TAS strives to resolve each case as quickly as possible while ensuring thoroughness and fairness. It's important to note that the processing time can also depend on whether additional information or documentation is required from the taxpayer during the review process.
2365### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_.7. Are there any costs associated with filing a request with TAS for help with a tax issue?7. No, there are no fees or costs associated with filing a request for assistance with Taxpayer Advocacy Service (TAS) regarding a tax issue. The service is free to all eligible taxpayers. However, keep in mind that some actions taken as part of resolving a tax matter may require payment, such as owing back taxes or penalties. But the act of contacting TAS itself does not come with any cost.
2366### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_.8. Does contacting TAS affect any ongoing audit or collection process with the IRS?8. Contacting the Taxpayer Advocacy Service (TAS) does not automatically stop any ongoing audits or collections processes with the Internal Revenue Service (IRS). However, TAS may be able to help taxpayers resolve issues they have with the IRS, including those related to audits and collections. If you are concerned about how contacting TAS might impact your specific situation, it's best to consult with a tax professional or contact TAS directly for guidance.
2367### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_.9. If TAS finds in favor of a taxpayer, what actions will be taken to rectify the situation?9. If TAS finds in favor of a taxpayer, they will work with the appropriate IRS office or function to correct any errors or resolve the issue. This may include providing additional education to IRS personnel, making adjustments to tax records, granting refunds or abatements, or offering other forms of relief as allowed by law. The specific action taken depends on the nature of the case.
\n", + "

2368 rows × 3 columns

\n", + "" + ], + "text/plain": [ + " Context \\\n", + "0 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "1 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "2 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "3 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "4 **Publication 535** **Publication 535** publication or the _How To Get Tax Help_ section at the end of this publication, go to the IRS Interactive Tax Assistant page at _IRS.gov_ _Hela/ITA_ where you can find topics by using the search feature or viewing the categories listed. _Getting tax forms, instructions, and publications_. Go to _IRS.gov/Forms_ to download current and prior-year forms, instructions, and publications. _Ordering tax forms, instructions, and publications._ Go to _IRS.gov/OrderForms_ to order current forms, instructions, and publications; call 800-829-3676 to order prior-year forms and instructions. The IRS will process your order for forms and publications as soon as possible. **Don't** resmbur requests you already sent us. You can get forms and publications faster online. \n", + "... ... \n", + "2363 ### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_. \n", + "2364 ### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_. \n", + "2365 ### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_. \n", + "2366 ### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_. \n", + "2367 ### What Is TAS? TAS is an _Independent_ organization within the IRS that helps taxpayers and protects taxpayer rights. Their job is to ensure that every taxpayer is treated fairly and that you know and understand your rights under the _Taxpayer Bill of Rights_. \n", + "\n", + " Question \\\n", + "0 1. Where can I find specific tax topics in Publication 535? \n", + "1 2. How do I use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535? \n", + "2 3. What categories of tax topics are available on the IRS Interactive Tax Assistant (ITA) page that relate to Publication 535? \n", + "3 4. Can I download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms? \n", + "4 5. How long does it take for the IRS to process my request for ordering current forms, instructions, and publications through their website? \n", + "... ... \n", + "2363 5. What types of issues can taxpayers bring before TAS for resolution? \n", + "2364 6. How long does it typically take for TAS to review and respond to a case once it has been submitted? \n", + "2365 7. Are there any costs associated with filing a request with TAS for help with a tax issue? \n", + "2366 8. Does contacting TAS affect any ongoing audit or collection process with the IRS? \n", + "2367 9. If TAS finds in favor of a taxpayer, what actions will be taken to rectify the situation? \n", + "\n", + " Answer \n", + "0 1. You can find specific tax topics in Publication 535 by going to the IRS Interactive Tax Assistant page at IRS.gov ( Hela/ITA ). Use the search feature or view the categories listed to find topics related to your query. \n", + "1 2. To use the search feature on the IRS Interactive Tax Assistant (ITA) page to find tax topics related to Publication 535, follow these steps: 1. Go to the IRS Interactive Tax Assistant (ITA) page at IRS.gov/Help/ITA. 2. In the Search box located in the top right corner of the page, type \"Publication 535\" or specific keywords related to the topic within the publication. 3. Press Enter or click the magnifying glass icon next to the search box to initiate the search. 4. Review the results displayed on the screen and select the relevant tax topic to access more information and resources. \n", + "2 3. On the IRS Interactive Tax Assistant (ITA) page, the following categories related to Publication 535 may be found: \"Getting tax help,\" which includes topics on how to obtain assistance with tax issues, including information about Publication 535 itself. Other relevant categories might include \"Tax credits and deductions\" or \"Retirement plans and IRAs.\" Use the search feature on the IRS Interactive Tax Assistant page to explore these and other potential categories in more detail. \n", + "3 4. Yes, you can download both current and prior-year forms, instructions, and publications related to Publication 535 from IRS.gov/Forms. \n", + "4 5. There is no specific time mentioned in the context for the IRS to process a request for ordering current forms, instructions, and publications through their website. However, it is suggested that individuals can get these materials faster online compared to ordering them. \n", + "... ... \n", + "2363 5. Taxpayers can bring various issues before TAS for resolution, including but not limited to: disputes involving income tax, payroll tax, estate and gift tax, and collection matters. They can also seek assistance in resolving identity theft cases or appeals related to penalties or interest assessments. Additionally, TAS may help taxpayers who believe they have received incorrect refunds or overassessments. However, it's important to note that TAS does not have the authority to change the law or grant amnesty from taxes owed. \n", + "2364 6. The length of time it takes for TAS to review and respond to a case can vary greatly depending on the complexity of the issue and the volume of cases they are currently handling. On average, it may take anywhere from several months to over a year for a decision to be made. However, TAS strives to resolve each case as quickly as possible while ensuring thoroughness and fairness. It's important to note that the processing time can also depend on whether additional information or documentation is required from the taxpayer during the review process. \n", + "2365 7. No, there are no fees or costs associated with filing a request for assistance with Taxpayer Advocacy Service (TAS) regarding a tax issue. The service is free to all eligible taxpayers. However, keep in mind that some actions taken as part of resolving a tax matter may require payment, such as owing back taxes or penalties. But the act of contacting TAS itself does not come with any cost. \n", + "2366 8. Contacting the Taxpayer Advocacy Service (TAS) does not automatically stop any ongoing audits or collections processes with the Internal Revenue Service (IRS). However, TAS may be able to help taxpayers resolve issues they have with the IRS, including those related to audits and collections. If you are concerned about how contacting TAS might impact your specific situation, it's best to consult with a tax professional or contact TAS directly for guidance. \n", + "2367 9. If TAS finds in favor of a taxpayer, they will work with the appropriate IRS office or function to correct any errors or resolve the issue. This may include providing additional education to IRS personnel, making adjustments to tax records, granting refunds or abatements, or offering other forms of relief as allowed by law. The specific action taken depends on the nature of the case. \n", + "\n", + "[2368 rows x 3 columns]" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "7ef0f5b7", + "metadata": {}, + "outputs": [], + "source": [ + "df.to_csv(\"output.csv\", index=False)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "self-instruct-ft", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}