Skip to content

Commit

Permalink
add pages to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrieh committed May 1, 2024
1 parent 980f045 commit 8df5d79
Show file tree
Hide file tree
Showing 18 changed files with 602 additions and 192 deletions.
30 changes: 30 additions & 0 deletions docs/pages/docs/collecting-data/adding-tasks.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Adding tasks

Adding tasks to a campaign is done through <u>batches</u> batches are a collection of tasks that are added to a campaign. Each batch can contain multiple tasks.
Let's start by creating a batch with 3 tasks to our newly created image classification campaign.

```ts [example.ts]
import { createBatch } from '@effectai/effect-js'

const { actor } = client.session

const batch = await createBatch({
client,
batch: {
campaign_id: '<..>', // the id of the campaign
repetitions: 1 // number of times each task should be repeated
payer: actor // the actor that will pay the workers for the tasks
}
data: [
{
image: 'https://example.com/image.jpg', //task 1 image placeholder
},
{
image: 'https://example.com/image2.jpg', //task 2 image placeholder
},
{
image: 'https://example.com/image3.jpg', // task 3 image placeholder
}
]
})
```
43 changes: 43 additions & 0 deletions docs/pages/docs/collecting-data/create-a-campaign.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Creating Your First Campaign

Campaigns are the main way to collect data on Effect Network.
A campaign is a <u>collection of tasks</u> that need to be completed by workers. Each task is a small piece of work that needs to be done. For example, a task could be to label an image, transcribe a piece of audio, or answer a question.
They are created by the data requester (you) and contain information like the reward for the workers, the template for the tasks, the instructions for the workers etc.

### Creating a campaign

```ts [example.ts]
import { createCampaign } from '@effectai/effect-js'

// get the actor from the session
const { actor } = client.session

// example template
const template = '<html>...</html>'

const campaign = await createCampaign({
client,
data: {
title: 'My first campaign',
category: 'Image Labeling', // Category of the campaign e.g. Image Labeling, Audio Transcription etc.
description: 'This is a description of my first campaign', // Description of the campaign
estimated_time: 3600, // Estimated time to complete a task in seconds
example_task: 'This is an example task',
image: 'https://example.com/image.png',
instructions: 'This is the instructions for the workers',
input_schema: null,
output_schema: null,
template,
version: 1,
},
campaign: {
owner: actor,
reward: { quantity: '1', contract: 'effecttokens' },
max_task_time: 3600,
qualis: [],
payer: actor,
},
})
```

Wooooho! You have created your first campaign. You can now view the campaign on the [Effect Network](https://app.effect.network/campaigns) before you start collecting data, you need to add tasks to the campaign. You can do this by following the [Adding Tasks](/docs/collecting-data/add-tasks) guide.
57 changes: 57 additions & 0 deletions docs/pages/docs/collecting-data/create-a-template.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

# Create a Template
Before we can create a data collection campaign, we need to create a **template**.

A template is a blueprint for the tasks in a campaign. It defines the structure of the tasks, the input and output data.
Templates are created by the data requester (you) and can be reused across multiple campaigns.

A typical template will be a HTML file that contains the structure of the tasks. The template can contain placeholders for the input data, output data, and other dynamic content.

For this guide, we will create a simple template for an image labeling campaign. The template contains a title, an image, and a question for the workers to answer. The image is loaded from IPFS using the `ipfs` placeholder.

```html
<html>
<head>
<title>My Image labeling Campaign</title>
</head>
<body>
<form>
<div class="classify-image">
<h1 class="title">Classify The Image</h1>

<!-- The image loaded from IPFS -->
<img src='https://gateway.pinata.cloud/ipfs/${ipfs}'/>
</div>
<div class="question question-sentiment">
<!-- Our question to ask the workers-->
<h2 class="subtitle">How much does this resemble the original one?</h2>

<!-- Input options for the workers-->
<div class="field">
<input class="is-checkradio" id="full" value="full" type="radio" name="resemblance" required>
<label for="full">Completly</label>
<input class="is-checkradio" id="half" value="half" type="radio" name="resemblance">
<label for="half">Half</label>
<input class="is-checkradio" id="none" value="none" type="radio" name="resemblance">
<label for="none">Nothing At All</label>
</div>

</div>

<!-- Submit button so workers can submit their data -->
<button type="submit" class="is-large mt-6">Submit</button>
</form>
</body>

<script>
setTimeout(() => console.log(window.FORCE_PLACEHOLDERS), 1000)
</script>

</html>
```

You can find examples for different types of templates on our [github](https://github.com/effectai/effect-force-templates)
We highly recommended to follow the [template guide](/docs/templates/introduction) when you are creating your own template.


Now that we have created a template for our campaign, we can move on to the next step: [Creating a Campaign](/docs/collecting-data/create-a-campaign)
Empty file.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Getting Started [Get started with the SDK in just a few lines of code.]

## Overview

## Installation

Use your favorite package manager to install the SDK.
Expand Down
90 changes: 0 additions & 90 deletions docs/pages/docs/guides/createACampaign.mdx

This file was deleted.

57 changes: 7 additions & 50 deletions docs/pages/docs/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,57 +1,14 @@
# Why Effect AI

## Introduction

Effect AI was built to solve the problem of AI development.
It's a platform that connects AI developers with AI trainers to create data to train AI models.

## Problems

The problem that Effect AI is trying to solve is the lack of training data for AI models.
AI models are only as good as the data they are trained on.
The more data you have, the better the model will be.

There is an issue though that now we are facing, AI models are being trained with data that ws created by other AI models.
This is a problem because the data is not always accurate, the model will learn and exacerbate mistakes from the training data.
Leading to unreliable AI models.
AI will be the pivotal technology of the future that will transcend us into a new era of efficiency and innovation.
However, the development of AI models is contingent upon the availability of high-quality training data.
This poses a significant challenge, as the creation of such data is a labor-intensive and time-consuming process.
Moreover, this data is often gathered & developed behind closed doors, leading to a lack of transparency and accountability.

## Solution

The soluiton is to create high quality training data.
This is where Effect AI comes in.

Effect AI is a platform that connects AI developers with AI trainers.

AI developers can post tasks that they need training data for.
Ai trainers can then complete these tasks and get paid for their work.

---


In the rapidly evolving landscape of artificial intelligence (AI), the quest for optimal development and performance remains paramount.
Effect AI emerges as a beacon in this realm, offering a solution to a pressing dilemma: the scarcity of high-quality training data for AI models.

At its core, Effect AI addresses the fundamental challenge of AI development—the insufficiency of robust datasets.
As the adage goes, "garbage in, garbage out"; AI models are only as proficient as the data they are trained upon.
Consequently, the quest for superior data becomes imperative for fostering the accuracy and reliability of AI technologies.

However, a disconcerting trend has emerged in the AI domain—models being trained with data generated by other AI models.
This recursive process, while ostensibly efficient, precipitates a cascade of issues.
Foremost among these concerns is the potential for error amplification: inaccuracies within the training data can be perpetuated and magnified within the AI model, resulting in flawed outcomes and unreliable performance.

Enter Effect AI, a platform meticulously crafted to address these challenges.
Serving as a nexus between AI developers and AI trainers, Effect AI facilitates the creation of high-quality training data, thereby fortifying the foundations of AI development.

The modus operandi of Effect AI is elegantly simple yet profoundly impactful.
AI developers leverage the platform to articulate their data requirements through the formulation of tasks.
These tasks, ranging from image classification to natural language processing, encapsulate the diverse array of challenges encountered in AI development.

In response, AI trainers—individuals proficient in data annotation and curation—step forward to fulfill these tasks.
Through their collective efforts, they meticulously craft datasets that adhere to the highest standards of quality and accuracy.
In doing so, they contribute not merely to the advancement of AI technologies but to the cultivation of a virtuous cycle wherein superior data begets superior models.

Crucially, Effect AI's platform incentivizes participation and excellence.
AI trainers are duly compensated for their contributions, thereby fostering a symbiotic relationship wherein both developers and trainers are mutually benefited.

In conclusion, Effect AI stands as a testament to the power of innovation in addressing complex challenges.
By championing the creation of high-quality training data, it not only mitigates the pitfalls of current AI development practices but also charts a course towards a future where AI technologies are synonymous with reliability, accuracy, and societal benefit.
The solution is Effect AI, a decentralized network that connects AI developers with a global workforce of AI trainers.
Leading the charge in the democratization of AI, Effect AI enables developers to create high-quality training data through a transparent and collaborative process.
By leveraging the power of the crowd, Effect AI ensures that AI models are trained on diverse and reliable datasets, thereby enhancing their accuracy and performance.
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/pages/docs/templates/introduction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Introduction


## What is a template?

## Creating Your own template
Empty file.
11 changes: 9 additions & 2 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ logo: false
import { HomePage } from 'vocs/components'


<div className="absolute max-w-[1120px] mx-auto w-full top-20 bottom-0 bg-[url('/colosseum-light.svg')] dark:bg-[url('/colosseum.svg')] bg-no-repeat max-sm:w-[200%] max-sm:-left-[200px] max-sm:hidden" />
<div
style={{
"background":
`linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 1) 100%),
url('/preview-bg.png')
`
}}
className="absolute mx-auto w-full top-20 bottom-0 bg-no-repeat max-sm:w-[200%] max-sm:-left-[200px] max-sm:hidden bg-cover left-0" />

<div className="max-w-[1120px] mx-auto vp-doc relative px-[24px] mb-[96px] mt-[32px] md:px-0 md:mb-[64px]">
<div className="pt-[48px] max-sm:pt-0">
Expand All @@ -19,7 +26,7 @@ import { HomePage } from 'vocs/components'
<img className="h-[72px] dark:invert-[1] max-sm:h-[60px]" src="/logo.png" alt="Effect logo" />
<div className="font-regular text-[21px] max-sm:text-[18px] text-[#919193] max-md:text-center">Effect AI is the data network for training next-gen transparent AI models. Integrate the SDK into your app and tap into a global, decentralized workforce.</div>
<div className="flex justify-center space-x-2">
<HomePage.Button href="/docs/gettingStarted" variant="accent">Get started</HomePage.Button>
<HomePage.Button href="/docs/getting-started" variant="accent">Get started</HomePage.Button>
<HomePage.Button href="https://github.com/effectai">GitHub</HomePage.Button>
</div>
</div>
Expand Down
Binary file added docs/public/preview-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8df5d79

Please sign in to comment.