Table of Contents

Class RagProcessedQuery

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

The output of IRagPipeline.ProcessAsync โ€” contains the transient request message content ready for the LLM, along with the original query and retrieved references.

public class RagProcessedQuery
Inheritance
RagProcessedQuery
Inherited Members

Constructors

RagProcessedQuery(string, string, IReadOnlyList<VectorSearchResult>, IReadOnlyList<VectorSearchResult>, RagQueryDiagnostics)

public RagProcessedQuery(string originalQuery, string requestMessageContent, IReadOnlyList<VectorSearchResult> references, IReadOnlyList<VectorSearchResult> retrievalCandidates, RagQueryDiagnostics diagnostics)

Parameters

originalQuery string
requestMessageContent string
references IReadOnlyList<VectorSearchResult>
retrievalCandidates IReadOnlyList<VectorSearchResult>
diagnostics RagQueryDiagnostics

Properties

Diagnostics

Processing diagnostics for this query.

public RagQueryDiagnostics Diagnostics { get; set; }

Property Value

RagQueryDiagnostics

HasReferences

Whether the query returned any references from the vector store. When false, RequestMessageContent contains the original query unchanged.

public bool HasReferences { get; }

Property Value

bool

OriginalQuery

The original user query.

public string OriginalQuery { get; set; }

Property Value

string

References

The retrieved search results used to build the context.

public IReadOnlyList<VectorSearchResult> References { get; set; }

Property Value

IReadOnlyList<VectorSearchResult>

RequestMessageContent

The request-only user input assembled from retrieval context and the query. This value is intended for transient LLM request transport and should not be persisted back into conversation history.

public string RequestMessageContent { get; set; }

Property Value

string

RerankedCandidates

All results after re-ranking (re-scored and reordered) but before final selection (topK + minScore). When no reranker is configured this is null.

public IReadOnlyList<VectorSearchResult>? RerankedCandidates { get; set; }

Property Value

IReadOnlyList<VectorSearchResult>

RetrievalCandidates

The raw retrieval candidates returned before re-ranking was applied. When no reranker is configured this matches References.

public IReadOnlyList<VectorSearchResult> RetrievalCandidates { get; set; }

Property Value

IReadOnlyList<VectorSearchResult>

RewriteResult

The raw result from the query rewriter, or null if no rewriter was invoked. This can include a rewritten semantic query, retrieval-oriented keywords, and the search gate decision.

public QueryRewriteResult? RewriteResult { get; set; }

Property Value

QueryRewriteResult

RewrittenQuery

The rewritten semantic query produced by IQueryRewriter, or null if no rewriting occurred. When set, this standalone query was used for embedding/vector retrieval instead of OriginalQuery.

public string? RewrittenQuery { get; set; }

Property Value

string

SearchKeywords

Retrieval-oriented keywords extracted by the query rewriter for the text/keyword search leg of hybrid search. When set, hybrid search uses these shaped terms instead of the raw query, helping lexical retrieval handle language-particle and formatting mismatches. Null when no keyword shaping was produced or no rewriter was invoked.

public IReadOnlyList<string>? SearchKeywords { get; set; }

Property Value

IReadOnlyList<string>

SearchSkipped

Whether the search gate determined that document search was not needed for this query. When true, the RAG pipeline was skipped entirely (no embedding, no vector search).

public bool SearchSkipped { get; set; }

Property Value

bool