You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-54Lines changed: 43 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,48 @@
1
-
# AI Act Implementation Tool
1
+
# AI Act Questions
2
2
3
-
Opinionated implementation of [AI act questions](https://github.com/NGO-Algorithm-Audit/AI-Act-Questions) created by the Algorithm Audit team in collaboration with the muncipality of Amsterdam.
3
+
AI Act questions based on AI Act defintions and the definition of High Impact Algorithm in the Algorithm Registery guidance by the Dutch Ministry of the Interior (https://algoritmes.pleio.nl/attachment/entity/f1a35292-7ea6-4e47-93fa-b3358e9ab2e0).
4
4
5
-
# How to run
5
+
The questions are developed in collaboration with the Muncipality of Amsterdam.
6
+
7
+
The templates are available in JSON format and can be easily customized to fit the specific needs of an organization.
8
+
9
+
# How it works
10
+
11
+
The JSON schema's use the [React JSON Schema Form (RJSF) library](https://github.com/rjsf-team/react-jsonschema-form), this library is built on top of: [Json schema's](https://json-schema.org/) which should make it easy to implement the schema's in your own tech stack.
12
+
Please read the [RSJF documentation](https://rjsf-team.github.io/react-jsonschema-form/docs/) for information about how the forms and dependencies work.
13
+
14
+
Changes we made to the original specification:
15
+
16
+
### 1. Output
17
+
18
+
The templates should return an outcome after the questions, to show this result we trigger the results component when the question key is `output`. For example:
19
+
20
+
```json
21
+
"output": {
22
+
"type": "string",
23
+
"title": "Uitslag",
24
+
"default": "Uw toepassing is op basis van uw antwoorden waarschijnlijk een impactvol algoritme."
25
+
}
26
+
```
27
+
28
+
This allows us to have multiple different outcomes in one template that each are triggered based on a unique combination of dependencies.
29
+
30
+
In case a form ends without an `output` question we automatically trigger an error component.
31
+
32
+
### 2. Intermediate output
6
33
7
-
This project includes a Git submodule that references the JSON Schemas repository (LINK), allowing us to keep schema definitions separate while using them within this project. Follow these steps to setup everything correctly.
34
+
To show intermediate outputs or simple text messages to the user we trigger a classname on such elements, to prevent the content from rendering as an input. This is done by adding the following uiSchema definition:
35
+
36
+
```json
37
+
"outputIntermediate": {
38
+
"ui:widget": "textarea",
39
+
"ui:classNames": "intermediate-output"
40
+
}
41
+
```
42
+
43
+
In this example we trigger this for the input element `outputIntermediate` but this mechanism can be used for any question.
44
+
45
+
# How to run
8
46
9
47
## Prerequisites
10
48
@@ -22,20 +60,10 @@ npm -v
22
60
##### 1. Clone the repository to your local machine. Open your terminal and run:
# If you’re cloning this repository for the first time, or if you haven't initialized the submodule yet
33
-
git submodule update --init --recursive
34
-
35
-
# To update the submodule from the remote.
36
-
git submodule update --remote --merge
37
-
```
38
-
39
67
##### 3. Once inside the project directory, install the necessary packages by running:
40
68
41
69
```bash
@@ -58,45 +86,6 @@ yarn dev
58
86
59
87
This command will compile and serve the application. By default, it should be accessible at http://localhost:5173 in your web browser.
60
88
61
-
# How it works.
62
-
63
-
The actual form schema's are specified in [AI act questions repository.](https://github.com/NGO-Algorithm-Audit/AI-Act-Questions) And this repository is used as a git sub module in this repository.
64
-
65
-
This rendering implementation extends the [React JSON Schema Form (RJSF) library](https://github.com/rjsf-team/react-jsonschema-form) to create a step-by-step wizard interface. Instead of displaying all form fields at once, it presents them one at a time, with validation and navigation controls.
66
-
67
-
The original specification is still applicable so please read the [RSJF documentation](https://rjsf-team.github.io/react-jsonschema-form/docs/) for information about how the forms work.
68
-
69
-
Changes we made to the original specification:
70
-
71
-
### 1. Output
72
-
73
-
The templates should return an outcome after the questions, to show this result we trigger the results component when the question key is `output`. For example:
74
-
75
-
```json
76
-
"output": {
77
-
"type": "string",
78
-
"title": "Uitslag",
79
-
"default": "Uw toepassing is op basis van uw antwoorden waarschijnlijk een impactvol algoritme."
80
-
}
81
-
```
82
-
83
-
This allows us to have multiple different outcomes in one template that each are triggered based on a unique combination of dependencies.
84
-
85
-
In case a form ends without an `output` question we automatically trigger an error component.
86
-
87
-
### 2. Intermediate output
88
-
89
-
To show intermediate outputs or simple text messages to the user we trigger a classname on such elements, to prevent the content from rendering as an input. This is done by adding the following uiSchema definition:
90
-
91
-
```json
92
-
"outputIntermediate": {
93
-
"ui:widget": "textarea",
94
-
"ui:classNames": "intermediate-output"
95
-
}
96
-
```
97
-
98
-
In this example we trigger this for the input element `outputIntermediate` but this mechanism can be used for any question.
99
-
100
89
# Styling overrides
101
90
102
91
With these css variables defined in the root where the frontend is injected the default theming can be overriden.
0 commit comments