The inline provider runs Ragas evaluation directly within the Llama Stack server process. This is the simplest deployment option and is ideal for development, testing, and lightweight production scenarios.
The inline provider architecture is straightforward, running everything within the Llama Stack server process:
graph TB
A[Client Request] --> B[Llama Stack Server]
subgraph LSS ["🟦 Llama Stack Server"]
style LSS stroke-dasharray: 5 5
B --> C[Inline Ragas Provider]
C --> D[RAGAS Engine]
D --> E[Direct Memory Processing]
E --> F[Results]
F --> B
end
B --> A
The main server process that handles all requests and coordinates between different providers.
The provider implementation that handles RAGAS evaluation requests directly within the server process.
-
Request Reception: Client requests are received by the Llama Stack server
-
Provider Selection: Server routes evaluation requests to the inline RAGAS provider
-
Direct Processing: Provider loads data and runs evaluation in the same process
-
Result Return: Results are immediately available and returned to the client
-
Python 3.12 or later
-
uv package manager
-
Running this command will start a Llama Stack server with the Ragas provider installed, and use the minimal distribution that is the
distributiondirectory. -
Note that we are asking for the
[distro]dependency group (more info below). -
Also note that, for this one-liner to work, you will need to have your environment variables set up (see [_environment_variables]).
uv run --with llama-stack-provider-ragas[distro] llama stack run distribution/run-inline.yamlTo get started with uv, create a virtual environment and install from PyPI:
uv venv --python=3.12
source .venv/bin/activate
uv pip install llama-stack-provider-ragasIf you’re planning to contribute and make modifications to the code, ensure that you clone the repository and set it up as an editable install:
git clone https://github.com/trustyai-explainability/llama-stack-provider-ragas
cd llama-stack-provider-ragas
uv pip install -e .The package includes several optional dependency groups:
| Group | Description |
|---|---|
|
Development dependencies including testing tools, linting, and type checking |
|
Dependencies to use the provided minimal Llama Stack distribution under |
The inline provider requires minimal configuration beyond the standard Llama Stack setup.
The repository includes a sample Llama Stack distribution configuration that uses Ollama as a provider for inference and embeddings.
The inline provider is setup in the following lines of the run-inline.yaml:
eval:
- provider_id: trustyai_ragas_inline
provider_type: inline::trustyai_ragas
module: llama_stack_provider_ragas.inline
config:
embedding_model: ${env.EMBEDDING_MODEL}