Complete Your First AI Q&A with Sample Data

Create a knowledge base from an English sample paper, ask a question, and verify the answer against its source.

Before you begin

  • Sign in to CloudSigma and open the workspace you will use for this tutorial.

  • Confirm that you can create import tasks and knowledge bases, that a chat model is available, and that the account has enough Credit for processing and Q&A.

  • Download the paper Scikit-learn: Machine Learning in Python and save it as scikit-learn-machine-learning-in-python.pdf.

The paper was published in 2011. The expected answer below refers to the figures reported in that paper.

1. Import the PDF into Catalog

  1. Select Data in the top navigation and confirm that you are in the intended workspace.

  2. Under Data Connection, select Import Tasks and create a local file import task.

  3. Import scikit-learn-machine-learning-in-python.pdf into a Catalog volume. For detailed import settings, see Data Loading.

  4. Open Catalog and confirm that the PDF appears in the target volume.

The examples below use this Catalog location:

Text
the_first_tutorial / pdf / scikit_learn_machine_learning_in_python

If you use a different location, select your actual Catalog path in the following steps.

Completion check: The PDF is visible in Catalog.

2. Create a knowledge base

  1. Under Resource Center, select Knowledge Base.

  2. Click Create Knowledge Base.

  3. Enter cloudsigma_first_knowledge in Knowledge Base Name.

  4. Leave Remark empty and keep Advanced options unchanged.

  5. Click Finish.

Completion check: The knowledge base is named cloudsigma_first_knowledge.

3. Add the PDF

  1. Open cloudsigma_first_knowledge and click Add Data.

  2. In Select Data, browse to the Catalog volume containing the PDF.

  3. Select scikit-learn-machine-learning-in-python.pdf.

  4. Confirm that the selection contains one file and no tables.

  5. Click Append and wait for the file to appear on the Data Source tab.

The knowledge base uses the file already stored in Catalog. You do not need to upload another copy.

Completion check: The Data Source tab lists the PDF.

4. Wait for processing to complete

On the Data Source tab, find the PDF and wait until Processing Status becomes Completed. Confirm that its Catalog path points to the sample PDF.

If processing fails, resolve the error before starting the conversation.

Completion check: The PDF shows Completed.

5. Ask a question

  1. Return to the Knowledge Base list.

  2. On the cloudsigma_first_knowledge card, click Chat.

  3. On the Dialogue tab, start a New Session if needed.

  4. Confirm that cloudsigma_first_knowledge appears in the knowledge selection. If it is missing, use Select Knowledge to add it.

  5. Select an available chat model.

  6. Paste the following question and press Enter:

    Text
    According to Section 2 of the paper "Scikit-learn: Machine Learning in Python", what unit-test coverage was reported for release 0.8, and which two static analysis tools were used?
    
    Answer in English using only the knowledge base, and cite the supporting passage.
    

Completion check: The answer reports 81% test coverage for release 0.8 and identifies pyflakes and pep8. The wording may vary.

6. Verify the source

  1. Open References below the answer.

  2. Find the reference to scikit-learn-machine-learning-in-python.pdf.

  3. Open the source and locate Section 2, Project Vision, in the paragraph beginning Code quality. The PDF page is 3, and the printed page number is 2827.

  4. Confirm that the passage supports all three details: 81%, pyflakes, and pep8.

Completion check: You can open the source from the answer and locate the passage supporting its claims.

Next tutorial

Continue with Create Your First Knowledge Base from a PDF, or return to the tutorial overview to choose another scenario.

Last updated on