Skip To Content

Use the model

You can use the HF Text Question Answering model in the Process Text Using AI Model tool available in the GeoAI toolbox in ArcGIS Pro.

Use the HF Text Question Answering model

Complete the following steps to use the model for question answering:

  1. Download the HF Text Question Answering pretrained model from ArcGIS Living Atlas of the World.
  2. Browse to Tools on the Analysis tab.
    Tools on the Analysis tab
  3. Click the Toolboxes tab in the Geoprocessing pane, select GeoAI Tools, and browse to the Process Text Using AI Model tool under Text Analysis.
    Process Text using AI Model tool
  4. Set the variables on the Parameters tab as follows:
    1. Set Input Layer or Table to the input point, line, or polygon feature class, or table containing the text.
    2. Set Data Fields to the text column to search for answers.

      The column must be named input_text. You can select multiple columns from the drop-down menu, but processing will only be done on input_text. The other columns will be copied to the output.

    3. For Input Model Definition File , select the model .dlpk file.
    4. Set Output Layer Or Table to the name of the output table that will contain the results.
    5. For Model Arguments, change the values of the arguments if required.
      • huggingface_id—The model ID of a pretrained question answering model hosted on huggingface.co.

        Text Question Answering models can be filtered by selecting the Question Answering tag under the Tasks section within the Natural Language Processing category on the Hugging Face model hub, as shown below:

        Text model on the model hub

        The model ID follows the format {username}/{repository}, as displayed at the top of the model's page:

        Model ID

        Only those models that have config.json are supported. This file can be verified under the Files and versions tab of the model page, as shown below:

        config.json on the Files and versions tab
      • question—A user-specified question string. This same question will be applied to all rows in the input table.
      • Result Field—The name of the output column where extracted answers will be stored.
      Process Text Using AI Model tool Parameters tab
  5. Set the variables on the Environments tab as follows:
    1. For Processor Type, select CPU or GPU.

      It is recommended that you select GPU, if available, and set GPU ID to specify the GPU to be used.

      Process Text Using AI Model tool Environments tab
  6. Click Run.

    The output table is added to the current geodatabase.

    results from the model