---
# System prepended metadata

title: Dami - Software Design

---

# Software Design

## Idea

`Dami` -  Data Minesation

> Incentived Synthetic Data Generation

### Problem

Creating good datasets is hard.

<details>
    <summary>Read More</summary>
    We bet that to train our next iteration of LLM's further we need synthecial Datasets, because Internet Data is big but even that is limited.

</details>

### Solution

`Dami` -  Data Minesation

<details>
    <summary>Read more</summary>
    There is a ne tool which allows judging how good the dataset is. Especially for LLM's. We use that to judge the Dataset and via web3 primitives we create a nice incentives system, which gives the AI's a nice Frame to improve theirself to generate even better data.
</details>


## Requirments

### Functional Requirments

- Ai nodes should get money
- Ai nodes should improve theirself
- Ai nodes should generate Data
- Data genration should be judges automatically
- The user should have be able to get Data

### Non Functional Requirments

- Simple to use

## Story 

- As AiNode Provider I want money for run my service
- As AiNode Provider I want to improve my neural nets
- As Valdator I want to judge the output
- As a User I want I want to have great Dataset

## Diagrams

### Use Case

```plantuml
left to right direction
actor AiNode
actor Validator
actor User 

AiNode -- (get money)
AiNode -- (improve)
Validator -- (judge)
User -- (get data)
```

### Class Diagram

```plantuml
class Optico {
    +owner: Address
    +nodes: Address[]
    +validator: Address
    +task: Map<Int,String>
    .. Ai Node  Handling..
    +ai_register()
    +ai_unregister()
    +get_task()
    +get_rewarded()
    +send_result(id: int)
    .. Validator Handling ..
    +validator_register()
    +validator_unregister()
    +judge()
    .. User Handling ..
    +add_task()
    +get_results()
}
```

### Sequence Diagramm

```plantuml
actor User
entity WebApp
database SmartContract
entity AiNode
entity Validator


group "Register"
AiNode --> SmartContract: "register"
Validator --> SmartContract: "register"
end

group "User Interaction"
User --> WebApp: "gives task"
WebApp --> SmartContract: "add_task"
end

group "Task doing"
AiNode --> SmartContract: "give me Task"
SmartContract --> AiNode: "sends Task"
AiNode --> AiNode: "does Task"
AiNode --> SmartContract: "sends result"
end

group "Judging"
Validator --> SmartContract: "give me results"
Validator --> Validator: "judging"
Validator --> SmartContract: "sends judging"
end 

group "Payout"
AiNode --> SmartContract: "give me money"
SmartContract --> AiNode: "sends money"
end

```

