Table of Contents

Interface IRagPipeline

Namespace
Mythosia.AI.Rag
Assembly
Mythosia.AI.Rag.Abstractions.dll

Core RAG pipeline interface. Processes a user query through the retrieval-augmented generation pipeline. This is the key abstraction that allows swapping the entire RAG strategy (e.g., simple retrieval, multi-step, function-calling based RAG) without touching AIService code.

public interface IRagPipeline

Methods

ProcessAsync(string, RagQueryOptions?, CancellationToken)

Processes the user query with per-request query overrides.

Task<RagProcessedQuery> ProcessAsync(string query, RagQueryOptions? options, CancellationToken cancellationToken = default)

Parameters

query string

The original user query.

options RagQueryOptions

Per-request query overrides (TopK, MinScore, StoreFilter).

cancellationToken CancellationToken

Cancellation token.

Returns

Task<RagProcessedQuery>

The processed query with request message content and references.

ProcessAsync(string, CancellationToken)

Processes the user query: embed โ†’ search โ†’ build context โ†’ return request message content.

Task<RagProcessedQuery> ProcessAsync(string query, CancellationToken cancellationToken = default)

Parameters

query string

The original user query.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<RagProcessedQuery>

The processed query with request message content and references.