# xishhh/adaptive-rag-evaluation-system architecture

> Architecture diagram of the GitHub repository xishhh/adaptive-rag-evaluation-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xishhh/adaptive-rag-evaluation-system
- Repository: https://github.com/xishhh/adaptive-rag-evaluation-system

## Overview

1. **Overall shape**
   This repo is a two-part application: a FastAPI backend that implements adaptive RAG and document ingestion, and a separate Vite/React UI that provides chat, upload, and source inspection. The backend owns all retrieval, LLM orchestration, vector storage, and evaluation logic; the UI is a thin client over HTTP and SSE.

2. **Request entry points**
   The backend entrypoint is `app/main.py`, which wires together the API routers under `app/api/*`. The exposed surface is centered on health, upload/status, query, streaming query, evaluation, and session cleanup endpoints. `app/api/dependencies.py` likely provides shared service instances and configuration injection across handlers.

3. **Query serving path**
   User questions flow from `/query` or `/query/stream` into `AdaptiveRAGService` and `RAGService`. Before retrieval, the system classifies the query via `QueryClassifier` into direct LLM answers versus knowledge-grounded answers. Knowledge queries then enter the retrieval pipeline; direct queries bypass vector search and go to the LLM path.

4. **Adaptive retrieval loop**
   The retrieval subsystem in `app/retrievers/*` is the core differentiator. `HybridRetriever` performs document lookup against the vector store, `ConfidenceEvaluator` scores whether the retrieved context is good enough, and `QueryRewriter` reformulates low-confidence queries for another retrieval pass. This creates an iterative loop: retrieve, score, possibly rewrite, then retrieve again before answering.

5. **LLM orchestration and fallback**
   `app/utils/llm_factory.py` and the services layer manage model selection and fallback behavior. The README indicates a primary-plus-fallback model strategy with retry/backoff on API errors or rate limits. This means the LLM is not a single hard dependency; it is a resilient external boundary with graceful degradation.

6. **Document ingestion pipeline**
   Uploads go through `app/api/upload.py` into `IngestionService`. The ingestion path uses `loaders.py` for format-specific parsing and `chunker.py` for splitting documents into retrievable segments. Processing is asynchronous: upload returns a job id immediately, while the file is indexed in the background and tracked via job status polling.

7. **Vector storage boundary**
   `app/vectorstore/chroma_manager.py` encapsulates ChromaDB, which is the persistence layer for embeddings and document chunks. The README’s idempotent re-upload behavior implies the store supports replacement semantics keyed by document identity, so the vector store is not just append-only. This is the main durable data store for RAG context.

8. **Session and lifecycle management**
   `SessionService` and the `/session` endpoint provide a hard reset boundary for the system. Clearing a session removes uploaded files, ingestion jobs, and Chroma data, and the README notes auto-cleanup on server shutdown. This makes the app effectively stateful per session while still supporting full teardown.

9. **Answer composition and citations**
   `CitationService` is the presentation-layer bridge between retrieved chunks and the final answer. It likely attaches source references to responses so the UI can render provenance in a side panel. This is important architecturally because the retrieval layer’s output is not just context for the model; it is also exposed as user-facing evidence.

10. **Evaluation subsystem**
   The `app/evaluators/*` package is a separate offline/ops-oriented pipeline. `eval_dataset_generator.py` builds evaluation sets using real retrieval contexts and system outputs, `ragas_evaluator.py` runs RAGAS metrics, and `metrics_tracker.py` stores or summarizes results. This subsystem is invoked through `/evaluate` and `/evaluate/results`, and is distinct from live query serving.

11. **Data models and contracts**
   `app/models/requests.py`, `responses.py`, and `documents.py` define the API and internal schema boundary. These Pydantic models normalize documents, upload jobs, query inputs, streaming responses, and evaluation payloads so the rest of the system can remain service-oriented rather than ad hoc JSON-driven.

12. **Frontend interaction model**
   The `ui/src` tree contains a chat-centric interface with file upload, sidebar, and source panel components. `ui/src/api/client.ts` and `sse.ts` show two backend interaction modes: standard request/response for uploads and queries, and SSE for token streaming. `ChatContext` and `DocumentContext` indicate the UI maintains conversational state and document/job state separately.

13. **Operational concerns and verification**
   The repo includes a Dockerfile for containerized deployment and pytest coverage for health, ingestion, and vector store behavior. That suggests the most important correctness boundaries are service availability, ingestion/indexing behavior, and persistence semantics rather than UI rendering. The tests are focused where architectural regressions would be most costly.

14. **Key architecture takeaway**
   The system is organized around one central loop: ingest documents into ChromaDB, classify incoming questions, retrieve and score context adaptively, then answer with an LLM and citations. The main boundaries are API vs services, services vs vector store, and backend vs UI; the adaptive retrieval and async ingestion paths are the two distinctive flows that should be highlighted in any architecture diagram.

Main entry points: [`ui/src/pages/ChatPage.tsx`](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/pages/ChatPage.tsx) (Chat page), [`app/main.py`](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/main.py) (API app), [`app/ingestion/ingestion_service.py`](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/ingestion/ingestion_service.py) (Ingestion), [`app/services/rag_service.py`](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/rag_service.py) (RAG service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Backend"]
  node_main["API app<br/>FastAPI entrypoint<br/>[main.py]"]
  node_api_health["Health<br/>API route<br/>[health.py]"]
  node_api_upload["Upload API<br/>API route<br/>[upload.py]"]
  node_api_query["Query API<br/>API route<br/>[query.py]"]
  node_api_evaluate["Eval API<br/>API route<br/>[evaluate.py]"]
  node_api_session["Session API<br/>API route<br/>[session.py]"]
  node_dependencies["Dependencies<br/>service wiring<br/>[dependencies.py]"]
  node_ingestion_service["Ingestion<br/>pipeline service"]
  node_loaders["Loaders<br/>parsers<br/>[loaders.py]"]
  node_chunker["Chunker<br/>text split<br/>[chunker.py]"]
  node_tracker["Ingestion tracker<br/>job state"]
  node_adaptive_rag["Adaptive RAG<br/>orchestrator"]
  node_rag_service["RAG service<br/>answer pipeline<br/>[rag_service.py]"]
  node_classifier["Query classifier<br/>query routing"]
  node_hybrid_retriever["Hybrid retriever<br/>retrieval"]
  node_confidence["Confidence eval<br/>ranking"]
  node_rewriter["Query rewriter<br/>query transform<br/>[query_rewriter.py]"]
  node_citation["Citations<br/>response enrichment"]
  node_eval_dataset["Eval dataset<br/>evaluation prep"]
  node_ragas["RAGAS eval<br/>metrics runner<br/>[ragas_evaluator.py]"]
  node_metrics["Metrics tracker<br/>results store<br/>[metrics_tracker.py]"]
end

subgraph group_ui["UI"]
  node_ui_app["UI app<br/>React entrypoint<br/>[App.tsx]"]
  node_chat_page["Chat page<br/>screen<br/>[ChatPage.tsx]"]
  node_chat_ctx["Chat state<br/>client state<br/>[ChatContext.tsx]"]
  node_doc_ctx["Document state<br/>client state"]
  node_client["API client<br/>HTTP client<br/>[client.ts]"]
  node_sse["SSE client<br/>stream client<br/>[sse.ts]"]
  node_uploader["Uploader<br/>upload control<br/>[FileUploader.tsx]"]
  node_source_panel["Source panel<br/>evidence view<br/>[SourcePanel.tsx]"]
end

subgraph group_ops["Ops"]
  node_llm_factory["LLM factory<br/>model boundary<br/>[llm_factory.py]"]
  node_chroma[("Chroma store<br/>vector database<br/>[chroma_manager.py]")]
end

node_main -->|"mounts"| node_api_health
node_main -->|"mounts"| node_api_upload
node_main -->|"mounts"| node_api_query
node_main -->|"mounts"| node_api_evaluate
node_main -->|"mounts"| node_api_session
node_api_upload -->|"uses"| node_dependencies
node_api_query -->|"uses"| node_dependencies
node_api_evaluate -->|"uses"| node_dependencies
node_api_session -->|"uses"| node_dependencies
node_api_upload -->|"starts"| node_ingestion_service
node_ingestion_service -->|"parses"| node_loaders
node_ingestion_service -->|"splits"| node_chunker
node_ingestion_service -->|"tracks"| node_tracker
node_ingestion_service -->|"indexes"| node_chroma
node_api_query -->|"calls"| node_adaptive_rag
node_adaptive_rag -->|"routes"| node_classifier
node_adaptive_rag -->|"delegates"| node_rag_service
node_rag_service -->|"retrieves"| node_hybrid_retriever
node_hybrid_retriever -->|"queries"| node_chroma
node_rag_service -->|"scores"| node_confidence
node_confidence -->|"triggers"| node_rewriter
node_rewriter -->|"rewrites for"| node_hybrid_retriever
node_rag_service -->|"uses"| node_llm_factory
node_rag_service -->|"enriches"| node_citation
node_api_evaluate -->|"generates"| node_eval_dataset
node_api_evaluate -->|"runs"| node_ragas
node_ragas -->|"stores"| node_metrics
node_ui_app -->|"renders"| node_chat_page
node_chat_page -->|"uses"| node_chat_ctx
node_chat_page -->|"uses"| node_doc_ctx
node_chat_page -->|"requests"| node_client
node_chat_page -->|"streams"| node_sse
node_chat_page -->|"uploads"| node_uploader
node_chat_page -->|"shows"| node_source_panel
node_client -->|"calls"| node_api_upload
node_client -->|"calls"| node_api_query
node_client -->|"calls"| node_api_evaluate
node_client -->|"calls"| node_api_session
node_sse -->|"subscribes"| node_api_query

click node_main "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/main.py"
click node_api_health "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/health.py"
click node_api_upload "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/upload.py"
click node_api_query "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/query.py"
click node_api_evaluate "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/evaluate.py"
click node_api_session "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/session.py"
click node_dependencies "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/dependencies.py"
click node_ingestion_service "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/ingestion/ingestion_service.py"
click node_loaders "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/ingestion/loaders.py"
click node_chunker "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/ingestion/chunker.py"
click node_tracker "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/ingestion_tracker.py"
click node_adaptive_rag "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/adaptive_rag_service.py"
click node_rag_service "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/rag_service.py"
click node_classifier "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/retrievers/query_classifier.py"
click node_hybrid_retriever "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/retrievers/hybrid_retriever.py"
click node_confidence "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/retrievers/confidence_evaluator.py"
click node_rewriter "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/retrievers/query_rewriter.py"
click node_citation "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/citation_service.py"
click node_llm_factory "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/utils/llm_factory.py"
click node_chroma "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/vectorstore/chroma_manager.py"
click node_eval_dataset "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/evaluators/eval_dataset_generator.py"
click node_ragas "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/evaluators/ragas_evaluator.py"
click node_metrics "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/evaluators/metrics_tracker.py"
click node_ui_app "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/App.tsx"
click node_chat_page "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/pages/ChatPage.tsx"
click node_chat_ctx "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/context/ChatContext.tsx"
click node_doc_ctx "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/context/DocumentContext.tsx"
click node_client "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/api/client.ts"
click node_sse "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/api/sse.ts"
click node_uploader "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/components/FileUploader.tsx"
click node_source_panel "https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/components/SourcePanel.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_api_health,node_api_upload,node_api_query,node_api_evaluate,node_api_session,node_dependencies,node_ingestion_service,node_loaders,node_chunker,node_tracker,node_adaptive_rag,node_rag_service,node_classifier,node_hybrid_retriever,node_confidence,node_rewriter,node_citation,node_eval_dataset,node_ragas,node_metrics toneBlue
class node_ui_app,node_chat_page,node_chat_ctx,node_doc_ctx,node_client,node_sse,node_uploader,node_source_panel toneAmber
class node_llm_factory,node_chroma toneMint
```

## Components

### Backend

FastAPI app for ingestion, adaptive RAG, and evaluation.

- [API app](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/main.py): FastAPI entrypoint · Wires routers, dependencies, and app startup. · `app/main.py`
- [Health](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/health.py): API route · Liveness and readiness surface. · `app/api/health.py`
- [Upload API](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/upload.py): API route · Starts ingestion jobs for uploaded documents. · `app/api/upload.py`
- [Query API](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/query.py): API route · Handles synchronous and streaming question answering. · `app/api/query.py`
- [Eval API](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/evaluate.py): API route · Triggers evaluation runs and exposes results. · `app/api/evaluate.py`
- [Session API](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/session.py): API route · Resets session state and cleanup boundaries. · `app/api/session.py`
- [Dependencies](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/api/dependencies.py): service wiring · Shared service and config injection for API handlers. · `app/api/dependencies.py`
- [Ingestion](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/ingestion/ingestion_service.py): pipeline service · Coordinates upload processing and background indexing. · `app/ingestion/ingestion_service.py`
- [Loaders](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/ingestion/loaders.py): parsers · Format-specific document loading and normalization. · `app/ingestion/loaders.py`
- [Chunker](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/ingestion/chunker.py): text split · Splits documents into retrievable segments. · `app/ingestion/chunker.py`
- [Ingestion tracker](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/ingestion_tracker.py): job state · Tracks asynchronous upload and indexing status. · `app/services/ingestion_tracker.py`
- [Adaptive RAG](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/adaptive_rag_service.py): orchestrator · Runs the retrieve-score-rewrite-answer loop. · `app/services/adaptive_rag_service.py`
- [RAG service](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/rag_service.py): answer pipeline · Builds grounded answers from retrieved context. · `app/services/rag_service.py`
- [Query classifier](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/retrievers/query_classifier.py): query routing · Splits direct questions from knowledge-grounded ones. · `app/retrievers/query_classifier.py`
- [Hybrid retriever](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/retrievers/hybrid_retriever.py): retrieval · Fetches candidate chunks from vector storage. · `app/retrievers/hybrid_retriever.py`
- [Confidence eval](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/retrievers/confidence_evaluator.py): ranking · Scores whether retrieved context is sufficient. · `app/retrievers/confidence_evaluator.py`
- [Query rewriter](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/retrievers/query_rewriter.py): query transform · Rephrases weak queries for another retrieval pass. · `app/retrievers/query_rewriter.py`
- [Citations](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/services/citation_service.py): response enrichment · Attaches source references to final answers. · `app/services/citation_service.py`
- [Eval dataset](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/evaluators/eval_dataset_generator.py): evaluation prep · Builds datasets from real retrieval and answer traces. · `app/evaluators/eval_dataset_generator.py`
- [RAGAS eval](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/evaluators/ragas_evaluator.py): metrics runner · Computes RAG evaluation metrics. · `app/evaluators/ragas_evaluator.py`
- [Metrics tracker](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/evaluators/metrics_tracker.py): results store · Collects and summarizes evaluation outputs. · `app/evaluators/metrics_tracker.py`

### UI

Vite/React client for chat, uploads, and source inspection.

- [UI app](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/App.tsx): React entrypoint · Bootstraps the client application. · `ui/src/App.tsx`
- [Chat page](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/pages/ChatPage.tsx): screen · Main conversational workspace with upload and sources. · `ui/src/pages/ChatPage.tsx`
- [Chat state](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/context/ChatContext.tsx): client state · Manages conversation and streaming answer state. · `ui/src/context/ChatContext.tsx`
- [Document state](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/context/DocumentContext.tsx): client state · Tracks uploads, jobs, and source documents. · `ui/src/context/DocumentContext.tsx`
- [API client](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/api/client.ts): HTTP client · Handles standard backend requests. · `ui/src/api/client.ts`
- [SSE client](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/api/sse.ts): stream client · Consumes token streaming responses. · `ui/src/api/sse.ts`
- [Uploader](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/components/FileUploader.tsx): upload control · Starts document upload flows from the UI. · `ui/src/components/FileUploader.tsx`
- [Source panel](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/ui/src/components/SourcePanel.tsx): evidence view · Displays retrieved sources and citations. · `ui/src/components/SourcePanel.tsx`

### Ops

Shared runtime, storage, and deployment boundaries.

- [LLM factory](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/utils/llm_factory.py): model boundary · Selects primary and fallback model clients. · `app/utils/llm_factory.py`
- [Chroma store](https://github.com/xishhh/adaptive-rag-evaluation-system/blob/main/app/vectorstore/chroma_manager.py): vector database · Persists embeddings and document chunks. · `app/vectorstore/chroma_manager.py`

## Connections

- API app → Health: mounts · Registers health endpoints.
- API app → Upload API: mounts · Registers upload endpoints.
- API app → Query API: mounts · Registers query endpoints.
- API app → Eval API: mounts · Registers evaluation endpoints.
- API app → Session API: mounts · Registers session endpoints.
- Upload API → Dependencies: uses · Resolves shared ingestion services.
- Query API → Dependencies: uses · Resolves shared query services.
- Eval API → Dependencies: uses · Resolves evaluation services.
- Session API → Dependencies: uses · Resolves session cleanup services.
- Upload API → Ingestion: starts · Creates background ingestion jobs.
- Ingestion → Loaders: parses · Loads uploaded files into documents.
- Ingestion → Chunker: splits · Chunks content for retrieval.
- Ingestion → Ingestion tracker: tracks · Updates job progress and status.
- Ingestion → Chroma store: indexes · Persists chunks and embeddings.
- Query API → Adaptive RAG: calls · Routes questions into the answer pipeline.
- Adaptive RAG → Query classifier: routes · Decides direct vs grounded answering.
- Adaptive RAG → RAG service: delegates · Hands off grounded answering flow.
- RAG service → Hybrid retriever: retrieves · Fetches relevant context from storage.
- Hybrid retriever → Chroma store: queries · Searches indexed chunks.
- RAG service → Confidence eval: scores · Evaluates retrieval quality.
- Confidence eval → Query rewriter: triggers · Requests another retrieval attempt.
- Query rewriter → Hybrid retriever: rewrites for · Feeds reformulated query back to retrieval.
- RAG service → LLM factory: uses · Obtains primary or fallback model clients.
- RAG service → Citations: enriches · Adds source references to answers.
- Eval API → Eval dataset: generates · Builds evaluation inputs from system traces.
- Eval API → RAGAS eval: runs · Executes RAG evaluation metrics.
- RAGAS eval → Metrics tracker: stores · Persists evaluation results.
- UI app → Chat page: renders · Hosts the main chat experience.
- Chat page → Chat state: uses · Reads and updates conversation state.
- Chat page → Document state: uses · Reads upload and source state.
- Chat page → API client: requests · Sends normal API calls.
- Chat page → SSE client: streams · Consumes streaming answers.
- Chat page → Uploader: uploads · Starts document ingestion from the UI.
- Chat page → Source panel: shows · Displays citations and retrieved evidence.
- API client → Upload API: calls · Submits uploads and polls job status.
- API client → Query API: calls · Sends chat questions.
- API client → Eval API: calls · Triggers evaluation actions.
- API client → Session API: calls · Requests session reset.
- SSE client → Query API: subscribes · Consumes streamed query responses.
