Skip to main content

Using SDK

Use SDK to import your data to Future AGI.
1

Assign Dataset Name

Assign a name to your dataset and click on “Next” to proceed.assign_dataset_name
2

Add Rows via SDK

You will be greeted with a screen containing code snippet to add rows to your dataset.
# pip install futureagi

import os
from fi.datasets import Dataset
from fi.datasets.types import (
    Cell,
    Column,
    DatasetConfig,
    DataTypeChoices,
    ModelTypes,
    Row,
    SourceChoices,
)

# Set environment variables
os.environ["FI_API_KEY"] = "<fi_api_key>"
os.environ["FI_SECRET_KEY"] = "<fi_secret_key>"

# Get existing dataset
config = DatasetConfig(name="my-dataset", model_type= ModelTypes.GENERATIVE_LLM)
dataset = Dataset(dataset_config=config)
dataset = Dataset.get_dataset_config("my-dataset")

# Define columns
columns = [
    Column(
        name="user_query",
        data_type=DataTypeChoices.TEXT,
        source=SourceChoices.OTHERS
    ),
    Column(
        name="response_quality",
        data_type=DataTypeChoices.INTEGER,
        source=SourceChoices.OTHERS
    ),
    Column(
        name="is_helpful",
        data_type=DataTypeChoices.BOOLEAN,
        source=SourceChoices.OTHERS
    )
]

# Define rows
rows = [
    Row(
        order=1,
        cells=[
            Cell(column_name="user_query", value="What is machine learning?"),
            Cell(column_name="response_quality", value=8),
            Cell(column_name="is_helpful", value=True)
        ]
    ),
    Row(
        order=2,
        cells=[
            Cell(column_name="user_query", value="Explain quantum computing"),
            Cell(column_name="response_quality", value=9),
            Cell(column_name="is_helpful", value=True)
        ]
    )
]

try:
    # Add columns and rows to dataset
    dataset = dataset.add_columns(columns=columns)
    dataset = dataset.add_rows(rows=rows)
    print("✓ Data added successfully")

except Exception as e:
    print(f"Failed to add data: {e}")
Click here to access API Key and Secret Key.

Upload File

1

Upload CSV, JSON or JSONL files to create a dataset.

upload_file

Using Synthetic Data Generation

Synthetically generate data and perform experimentations on it.
1

Add Details

Provide basic details about the dataset you want to generate.add_details
PropertyDescription
NameName of the dataset
Knowledge Base (optional)Select which you want to use.
DescriptionDescribe the dataset you want to generate
Objective (optional)Use case of the dataset
Pattern (optional)Style, tone or behavioral traits of the generated dataset
No. of RowsRow count of the generated dataset (min 10 rows)
2

Add Column Properties

Define column types and propertiesadd_column_properties
PropertyDescription
Column NameName of the column
Column TypeChoose the type of the column (available types: text, boolean, integer, float, json, array, datetime)
3

Add Description

Now add description for each column. Describe in detail what values you want in this column.add_column_description
4

Create Dataset

Click on “Create Dataset” button to generate the dataset. Your synthetic dataset will be generated in a few seconds and will be available in your dataset dashboard.If you are not satisfied with the generated dataset, you can click on “Configure Synthetic Data” button. It will allow you to edit the fields and generate the dataset again.create_datasetconfigure_synthetic_data

Manually Create Dataset

Manually create dataset from scratch.
1

Provide Basic Details

To proceed with creating dataset manually from scratch, provdide the name you want to assign and the number of columns and rows you want.manuallyYou will be greeted with an empty dataset with the name you assigned and with empty rows and columns.empty_dataset
2

Populating the dataset

You can populate the dataset by double-tapping over the empty cell you want to populate. It will open an editor where you can provide the details you want to fill in that cell.populate_dataset

Importing from Hugging Face

1

Search Hugging Face Dataset

Search for the dataset you want to import from Hugging Face. You can even refine the search by using flters given on left side.search_hugging_face_dataset
2

Import Dataset

Once you have selected the dataset you want to import, click on that dataset and it will open a panel where you can select what subset and split you want to import.You can also select the number of rows you want to import. By default, it will import all the rows.import_datasetClick on “Start Experimenting” button and it willl start importing the dataset and you will be able to see it in your dataset dashboard.

From Existing Dataset

You can create a subset from an existing dataset.
1

Choose the existing dataset

Assign a name to this dataset and choose the existing dataset from the dropdown you want to create a subset from.choose_existing_datasetIt allows you to import the dataset in two ways:
  1. Import Data: It will only import the original columns from the existing dataset.
  2. Import Data and Prompt Configuration: Along with original column, it will also import the prompt columns from that dataset.
2

Map the columns

You can choose what columns you want to use from that existing dataset and also you can assign a new name to the columns you want to use.map_columns
3

Import the dataset

Click on “Add” button and it will create a new dataset in your dataset dashboard.