• Updated on 07 Jul 2020
  • 4 minutes to read
  • Print
  • Share
  • Dark

  • Print
  • Share
  • Dark

Before you begin

Getting an Aito instance

If you want to follow along with this tutorial, you'll have to go and get your own Aito instance from the Aito Console.

  1. Sign in or create an account, if you haven't got one already.
  2. In the Aito Console go to the instances page and click the "Create an instance" button.
  3. Select the instance type you want to create and fill in needed fields, Sandbox is the free instance for testing and small projects. Visit our pricing page, to learn more about the Aito instance types.
  4. Click "Create instance" and wait for a moment while your instance is created, you will receive an email once your instance is ready.

If you're totally new to Aito the get started guides might be useful before reading this tutorial.

Accessing instance details

After the instance creation is ready, you can access the URL and API keys of the instance by

  1. Log in to Aito Console
  2. Click on the instance your created
  3. Go to the overview page. You can copy the API keys after clicking the eye icon.


Get the Aito CLI

  1. Get the Aito CLI if you don't have it yet (you'll need Python3.6 or higher installed)
pip install aitoai
  1. Configure the CLI using the instance URL and read/write API key.
aito configure

Other prequisites

To follow along this tutorial you will also need a parabola account. You can sign up and get free credits here.


Google sheets is used in this tutorial, so you will also need a Google account. Create an account here, if you don't have one already.

Use case: avoiding duplicates in CRM data

The data used in this tutorial can be found here. It's made as an example for a company who wanted to reduce duplicates and errors with their CRM data. Even a slight difference like missing "LTD" from the name in corporate details ended up spinning a duplicate record. This tutorial shows how quick it is to find already existing entries even with minimum and typoed searches.


The workflow will consist of three steps.

  1. Upload data into Aito

  2. Read company search inputs (aka "human inputs") from a Google Sheet.

  3. For each row of inputs, check with Aito if the CRM database already contains an entry that is a likely match.

  4. Write search parameters and found likely matches to a new Google Sheet.

Simple, right! It is extremely obvious how to make this happen with Parabola's editor. Here's what you aim to have when all the tasks are in place.

alt text

#1 Upload data into Aito

  1. Download the dataset from here

  2. Upload data using the quick-add-table feature

aito quick-add-table --file-format csv --table-name company_info company_info.csv

#2 Read data from Google Sheet

The first step is to create a Google sheet which will have the name and city of the companies you want to search for. So create columns with headers Name and City. Then you can create names and cities for the companies you want to search for. Here are two example inputs you can use. They look like to entries found in the database but not exactly (some typos and wrong city).


In the end the Google sheet should resemble this example.

alt text

In Parabola the import configuration should look like this.
alt text

#3 Get results from Aito API

In Parabola the task is done with API Enrichment. It takes every row from the Google sheet and uses it as an input to Aito and then outputs the results. Next you should setup Parabola to be able to connect to Aito. Step explanations can be found under the parabola screenshots.

alt text

  1. For the search Aito's Similarity function is used, so set the HTTP request type to be POST.

  2. Set the endpoint URL to pinpoint to your Aito instance: $AITO_INSTANCE_URL/api/v1/_similarity.

  3. To the "body" field write the following query that goes into Aito. Inside, you need to use the {ColumnName} notation to pull the appropriate fields from the input data.

  "from": "company_info",
    "similarity": {
      "Name": "{Name}",
      "City": "{City}"
  "limit": 1

alt text

  1. Add a custom header for content-type with a value application/json.

  2. Add a custom header for authentication. So x-api-key equals to your-API-key.

  3. Finally in "Nested Keys" choose "hits" so that you get Aito's results conveniently broken down as columns in your results.

Good to go! Hit Show Updated Results and you should see that the rows are populated with results. Score tells you the strength of the similarity.

Then check whether the results seem to make sense. In the example cases first search was for BCG SECUTIES in New York, but in reality the company is BCG SECURITIES, INC. and they are based at Cherry Hill, so the result seems to make sense.

alt text

#3 Write results to Google Sheets

Writing the results back to Google sheets can be done in Parabola by Google Sheet Export.
The write operation can be configured as follows.

alt text

Running it

Remember to hit Publish button at the top right of the screen to get the results out.

In Parabola it is possible to create a webhook that would trigger the run or set scheduling.

alt text

What's next

When integrating the solution into production use you should consider to look for maybe top 2 results (change limit = 2 in Aito query), and only use the results if there is a strong enough difference between first and second result. Also Aito's evaluate query should be run to see how accurately Aito returns results. That's covered in a separate article.

If you'd like to discuss more about how to get your use case into production, please contact us.

Join our Community Slack to give feedback, or share your own automation use case!

Was this article helpful?