Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
MentorRagResult record
The MentorRagResult record of Novior.MentorAgent.Abstractions.Models: A single result from a RAG (Retrieval-Augmented Generation) search. Used both for…
On this page
A single result from a RAG (Retrieval-Augmented Generation) search. Used both for injecting context into the AI prompt and for rendering citation chips in the RagSourcePanel component.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.
public sealed record MentorRagResult : IEquatable<MentorRagResult>
dotnet add package Novior.MentorAgent.AbstractionsConstructors
Section titled “Constructors”public MentorRagResult(string Content, string? SourceUrl, string? Title, float Score)
A single result from a RAG (Retrieval-Augmented Generation) search. Used both for injecting context into the AI prompt and for rendering citation chips in the RagSourcePanel component.
Parameters
Content: The retrieved document content injected into the system prompt.SourceUrl: Optional URL of the source document (used as link in citation chips).Title: Optional display title for the citation chip (falls back to SourceUrl).Score: Relevance score (higher = more relevant). Informational only.
Properties
Section titled “Properties”Content
Section titled “Content”public string Content { get; init; }
The retrieved document content injected into the system prompt.
Metadata
Section titled “Metadata”public IReadOnlyDictionary<string, string>? Metadata { get; init; }
Facts about the document that the model should weigh with its content — an author, a date, a version, the product it applies to. Shown to the model next to the document's title, one key: value per entry, so "the 2025 price list" can be told from the 2026 one. null or empty: nothing is added.
An init property rather than a constructor parameter, so every source written for the four positional values keeps compiling. Like the content, it also travels with the citation chips to the client.
new MentorRagResult(text, url, title, score)
{
Metadata = new Dictionary<string, string> { ["valid from"] = "2026-01-01" },
}public float Score { get; init; }
Relevance score (higher = more relevant). Informational only.
SourceUrl
Section titled “SourceUrl”public string? SourceUrl { get; init; }
Optional URL of the source document (used as link in citation chips).
public string? Title { get; init; }
Optional display title for the citation chip (falls back to SourceUrl).
