Skip to content

Commit b43877c

Browse files
authored
General: Document AI service pipelines (#683)
1 parent b6064d0 commit b43877c

13 files changed

Lines changed: 390 additions & 1261 deletions

File tree

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Deliberately NOT the whole tree — gitignored local secrets (.env,
2020
# application.local.yml, llm_config.local.yml) must never enter the image.
2121
!memiris/pyproject.toml
22-
!memiris/README.MD
22+
!memiris/README.md
2323
!memiris/src
2424
!memiris/tests
2525
**/__pycache__

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ EduTelligence maintains compatibility with different versions of [Artemis](https
2929

3030
> **Note:** Always ensure you're using compatible versions for optimal integration and functionality.
3131
32+
## Pipeline and lifecycle references
33+
34+
- **Iris:** [Pipeline system](https://ls1intum.github.io/edutelligence/iris/docs/developer/pipeline-system) and [RAG pipeline](https://ls1intum.github.io/edutelligence/iris/docs/developer/rag-pipeline)
35+
- **Athena:** [Module request lifecycle](https://ls1intum.github.io/edutelligence/athena/docs/dev/module/request-lifecycle)
36+
- **Atlas:** [AtlasML ML pipelines](https://ls1intum.github.io/edutelligence/atlas/dev/code-reference/ml-pipelines)
37+
- **Logos:** [Request pipeline source reference](./logos/logos-orchestrator/src/logos/pipeline/README.md)
38+
- **Memiris:** [Library source reference](./memiris/README.md)
39+
3240
## 🚀 Sub-Services Overview
3341

3442
### 🤖 [Iris](./iris/) - AI Virtual Tutor
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Module Request Lifecycle
3+
---
4+
5+
# Module Request Lifecycle
6+
7+
This page follows an Athena request from Artemis to a module and back. It complements the [module structure](./structure.md) reference, which defines the decorator signatures and module layout.
8+
9+
## 1. Artemis selects a module
10+
11+
Artemis selects a configured assessment module for an exercise type and calls the Assessment Module Manager's authenticated module-proxy route. The module name and type identify the target; Artemis can additionally provide module configuration and experiment context.
12+
13+
The manager validates that the named module exists and has the requested exercise type before forwarding the request. It preserves these request headers when present:
14+
15+
- `X-Module-Config` for configuration evaluated by the module's schema provider;
16+
- `X-Experiment-ID`, `X-Module-Configuration-ID`, and `X-Run-ID` for experiment context; and
17+
- `X-Server-URL`, the Artemis/LMS base URL used by a module that needs to call back into the LMS.
18+
19+
The manager authenticates the module-to-module call separately. For programming modules it also adds the repository-authorization secret associated with the supplied LMS URL; this value is not returned to Artemis or documented as a client configuration value.
20+
21+
## 2. The module contract processes the request
22+
23+
The Athena package exposes FastAPI endpoints through decorators in `athena/athena/endpoints.py`. Operational decorators authenticate the forwarded request, merge stored metadata, persist exercises/submissions/feedback where appropriate, deserialize module configuration, and call the implementation. The configuration-schema endpoint is intentionally different, as described below.
24+
25+
| Module concern | Decorator endpoint behavior |
26+
| --- | --- |
27+
| Submission intake | `@submissions_consumer` stores input and schedules the module consumer as a background task. |
28+
| Submission selection | `@submission_selector` resolves stored submissions and returns a selected submission ID, or the manager fallback marker. |
29+
| Tutor feedback intake | `@feedback_consumer` persists incoming feedback and schedules the consumer as a background task. |
30+
| Feedback suggestions | `@feedback_provider` persists request context, invokes the provider, stores suggestions, and returns them. |
31+
| Configuration | `@config_schema_provider` exposes the module's JSON schema through unauthenticated `GET /config_schema`; operational requests use the configured or default values. |
32+
| Evaluation | `@evaluation_provider` handles the optional evaluation endpoint. |
33+
34+
The proxy wraps the module response with the resolved module name, status, data, and metadata before returning it to Artemis. A module can therefore process synchronously, schedule background work through its decorator, or implement its own documented workflow without changing the manager proxy contract.
35+
36+
## 3. LLM selection is a module decision
37+
38+
Artemis's selection of an Athena module is separate from `AiSelectionDecision`. For LLM-backed feedback providers without an explicit module configuration, the Athena decorator resolves the submitted decision within the module:
39+
40+
- `NO_AI` skips feedback-suggestion generation;
41+
- `LOCAL_AI` requires a compatible local configuration and otherwise returns an unavailable-selection response; and
42+
- other supported decisions execute in the module's AI-selection context.
43+
44+
Classical modules and explicitly configured modules do not automatically acquire this selection behavior. See the implementation READMEs for [LLM programming modules](https://github.com/ls1intum/edutelligence/tree/main/athena/modules/programming/module_programming_llm), [LLM quality modules](https://github.com/ls1intum/edutelligence/tree/main/athena/modules/programming/module_programming_quality_llm), [LLM modeling modules](https://github.com/ls1intum/edutelligence/tree/main/athena/modules/modeling/module_modeling_llm), [LLM text modules](https://github.com/ls1intum/edutelligence/tree/main/athena/modules/text/module_text_llm), and the classical module directories.
45+
46+
## 4. Programming-repository boundary
47+
48+
Programming modules receive the manager's repository-authorization header only after the module manager has associated it with the Artemis/LMS URL. Athena's repository authorization middleware keeps this internal to Athena module calls. A module uses the authenticated Artemis `AthenaInternalResource` boundary to retrieve repository data; it must not treat the original Artemis request or a client-provided URL as sufficient authorization.
49+
50+
This makes the boundary explicit: Artemis controls module selection and authenticated repository access, the manager proxies the request and credentials to the configured module, and the module owns its assessment algorithm and any applicable LLM selection.

athena/docs/sidebars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const sidebars: SidebarsConfig = {
5555
{
5656
type: 'category',
5757
label: 'Modules',
58-
items: ['dev/module/structure', 'dev/module/create'],
58+
items: ['dev/module/structure', 'dev/module/request-lifecycle', 'dev/module/create'],
5959
},
6060
{
6161
type: 'category',

0 commit comments

Comments
 (0)