> For the complete documentation index, see [llms.txt](https://docs.flock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flock.io/what-is-flock/architectural-breakdown/system-design.md).

# System Design

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

<figure><img src="/files/IvwQpmDlp8SVlXrJUSYe" 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="/files/eifchckNIEmmYUMvYWHq" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
