-
Notifications
You must be signed in to change notification settings - Fork 1
Architecture
Aludel is arranged as a disciplined workshop: LiveView at the surface, contexts as the hands of the craft, and behaviour-based interfaces where the system meets outside forces.
flowchart LR
UI[LiveView UI]
C[Contexts]
I[Interfaces]
X[External Services]
DB[(PostgreSQL)]
UI --> C
C --> I
C --> DB
I --> X
| Context | Responsibility |
|---|---|
Prompts |
Templates, prompt versions, and projects |
Runs |
Prompt execution across one or more providers |
Evals |
Test suites, assertions, and evaluation orchestration |
Providers |
Provider configuration and model selection |
Stats |
Aggregated metrics such as latency, cost, and success rate |
The interface layer keeps provider-specific logic out of the contexts, so new integrations can be introduced like new metals in the crucible, without recasting the rest of the system.
@callback call(config :: map(), prompt :: String.t()) ::
{:ok, response :: String.t()} | {:error, term()}Current implementations:
OpenAIAnthropicOllama
@callback convert(source :: String.t(), format :: String.t()) ::
{:ok, path :: String.t()} | {:error, term()}Current implementation:
-
ImageMagickfor document-to-image conversion such as PDF to PNG
This is the main path from intent to result: a prompt is shaped in the UI, handed to the run engine, translated through a provider adapter, and returned with enough telemetry to judge its worth.
sequenceDiagram
participant U as User
participant LV as LiveView
participant R as Runs
participant L as LLM Behaviour
participant P as Provider API
participant DB as PostgreSQL
U->>LV: Submit prompt variables and providers
LV->>R: execute_run/2
R->>L: call/2 for each provider
L->>P: HTTP request
P-->>L: Model response
L-->>R: Normalized result
R->>DB: Persist run and run_results
R-->>LV: Return execution status and metrics
Suite execution repeats that same fire under controlled conditions, so prompts can be tested as instruments rather than admired as artifacts.
flowchart TD
A[LiveView starts suite run]
B[Evals.run_suite/2]
C[Iterate test cases]
D[Create run]
E[Execute prompt via Runs]
F[Validate assertions]
G[Aggregate results]
H[Persist suite_run]
A --> B --> C --> D --> E --> F --> C
C -->|all test cases processed| G --> H
- Standalone: self-contained Phoenix application
- Embedded: packaged into a host application and mounted in its router while sharing repo and config
- Add an LLM provider by implementing
Aludel.Interfaces.LLM.Behaviour - Add a document converter by implementing
Aludel.Interfaces.DocumentConverter.Behaviour
See Data Model for entity relationships and storage details.
- Prompts
- Providers
- Runs and Execution
- Evaluation Suites
- Regex Assertions
- Metric Context
- Evaluator Execution Details
- Rubric Judges
- Judge Catalog
- Repeated Sampling
- Quality Policies
- ExUnit Evaluations
- File-Based Suites
- Evaluation Reporters
- Datasets
- Red-Team Datasets
- Generated Red-Team Cases
- Analytics and Prompt Evolution
- Exports and CI
- Documents and Storage
- Embedding and Access