> 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

This section gives a high-level overview of FLock's 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&amp;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&amp;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
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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
