Tutorial: Building Your First Question Answering App

This tutorial guides you through the process of building an English question answering pipeline in the fastest and easiest possible way. It uses the UI to upload the sample dataset and it teaches you how to create a pipeline from the template.

  • Level: Beginner
  • Time to complete: 10 minutes
  • Prerequisites:
    • This tutorial assumes a basic knowledge of NLP.
    • You must be an Admin to complete this tutorial.
    • Make sure you have a deepset Cloud workspace for your question answering pipeline ready.
  • Goal: After completing this tutorial, you will have built a complete English question answering app that can answer various questions about jazz.

Upload Files

You need files the search will run on.

  1. Download the .zip file from gdrive and unpack it on your computer.
  2. Log in to deepset Cloud, switch to the workspace you want to use, and go to Data>Files.
Navigation bar in deepset Cloud with the workspace switch marked as number one and the Files option marked as number two.
  1. Click Upload Files.
  2. Drop the files you unpacked in step 1 into the Upload Files window and click Upload.
  3. Wait until the upload finishes. You should have 344 files. You can check that in the Dashboard.

Result: Your files are in your workspace, and you can see them on the Files page.

A screenshot of the Files page with a list of uploaded files displayed.

Create a Pipeline

In this step, you define how your search is going to run. Let's use the question answering pipeline template to create the pipeline.

  1. Go to Pipelines>Create Pipeline.

  2. Type Jazz_English_QA as the pipeline name and choose the Extractive Question Answering template.

    The image is a screenshot of a web interface for creating a pipeline in a YAML editor. The interface includes a section titled "Create a pipeline in YAML Editor" which explains that YAML is the fastest way to deploy a pipeline and allows for easy import and export. There is a field for giving the pipeline a name, with "Jazz_English_QA" entered as an example, and a note below it instructs to only use alphanumeric characters and underscore or dash. Below, there are two options presented: "Start from scratch" to build a pipeline from an empty file, and "Get started quickly with a template" which lists two templates for question answering pipelines — "Extractive Question Answering" and "Generative Question Answering GPT". On the left side of the interface, there is a visual representation of a pipeline with components connected by lines, featuring plus and arrow symbols, indicating points where components can be added or where the flow proceeds.
  3. Click Create. You're redirected to the YAML Editor.

  4. Review the pipeline and click Deploy. This triggers indexing and makes your pipeline ready for running a search.

  5. In the navigation, click Pipelines and wait until the status of your pipeline changes to Indexed. This may take a while.
    Tip: When you hover your mouse over the status, you can see the number of files already indexed.

Result: You created and deployed a pipeline. Your pipeline shows on the Pipelines page with the status Indexed.

A screenshot of the Pipelines page with the Jazz English QA pipeline shown as indexed and deployed.

Run a Search

Now, it's time to test your pipeline.

  1. Go to Search.
  2. Select Jazz_English_QA as the pipeline you want to use.
  3. Now, search for an answer to this question: "How many people attended Duke Ellington's funeral?"
    You should get a number of answers.

Result: There! You've built a live question answering system from beginning to end. You can now ask your app questions related to jazz, and it will answer them.