# System Design

FLock's system logic is comprised of three major components, namely, AI Arena, FL Alliance and AI Marketplace.

<figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FYydKabo3VBqQ9GnXF8dv%2Fsystem-design-fig1.png?alt=media&#x26;token=9482df79-2f03-4ac3-8099-e84760768960" alt=""><figcaption><p>Figure1. FLock's system logic. </p></figcaption></figure>

As shown in Figure 1, upon a task creation, the model is first trained and validated in ***AI Arena***, a blockchain-based decentralised training platform, and then optionally further fine-tuned in ***FL Alliance*** using participants’ local data. Finally, the model is deployed by applications in the ***AI Marketplace***, where feedback will be used to further improve the model.

<figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FLxZHCOJfAmDJTbxgUeBd%2Fsystem-design-fig2.png?alt=media&#x26;token=de36c09a-b7c7-4640-a1ac-e28f1b810b25" alt=""><figcaption><p>Figure2. FLock's system design.</p></figcaption></figure>

Specifically, as shown in Figure 2, when a task is first created in AI Arena, it is first trained by training nodes. These nodes then submit their models to validators, who evaluate and propose scores for each submission. The validators reach a consensus on these scores to determine the ranking of the submitted models. The consensus model can then be assigned to FL clients, who fine-tune and improve it using their local data, resulting in the FL global model. The AI Arena consensus model or the FL global model can be deployed and hosted in the AI Marketplace, providing interfaces to various applications. AI Arena training nodes, validators and FL clients need to stake to participate the system, and will be rewarded based on their performance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flock.io/what-is-flock/architectural-breakdown/system-design.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
