< Summary

Information
Class: EHonda.KicktippAi.Core.ReconstructedMatchPredictionPrompt
Assembly: EHonda.KicktippAi.Core
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Core/MatchPromptReconstruction.cs
Line coverage
72%
Covered lines: 8
Uncovered lines: 3
Coverable lines: 11
Total lines: 69
Line coverage: 72.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Core/MatchPromptReconstruction.cs

#LineLine coverage
 1namespace EHonda.KicktippAi.Core;
 2
 3/// <summary>
 4/// Stable metadata for a context document version resolved during prompt reconstruction.
 5/// </summary>
 6public record ResolvedContextDocumentVersion(
 7    string DocumentName,
 8    int Version,
 9    DateTimeOffset CreatedAt,
 10    string Content);
 11
 12/// <summary>
 13/// Reconstructed match prompt inputs for a historical prediction.
 14/// </summary>
 115public record ReconstructedMatchPredictionPrompt(
 016    Match Match,
 017    string Model,
 018    string CommunityContext,
 119    bool IncludeJustification,
 120    DateTimeOffset PromptTimestamp,
 121    string PromptTemplatePath,
 122    string SystemPrompt,
 123    string MatchJson,
 124    IReadOnlyList<string> ContextDocumentNames,
 125    IReadOnlyList<ResolvedContextDocumentVersion> ResolvedContextDocuments);
 26
 27/// <summary>
 28/// Reconstructs prompt inputs for historical match predictions.
 29/// </summary>
 30public interface IMatchPromptReconstructionService
 31{
 32    /// <summary>
 33    /// Reconstructs the prompt inputs used for a stored match prediction.
 34    /// </summary>
 35    /// <param name="match">The match whose historical prediction should be reconstructed.</param>
 36    /// <param name="model">The model that was used for the stored prediction.</param>
 37    /// <param name="communityContext">The community context used for the stored prediction.</param>
 38    /// <param name="includeJustification">Whether to reconstruct the justification prompt variant.</param>
 39    /// <param name="cancellationToken">Cancellation token.</param>
 40    /// <returns>The reconstructed prompt inputs if the prediction exists; otherwise <c>null</c>.</returns>
 41    Task<ReconstructedMatchPredictionPrompt?> ReconstructMatchPredictionPromptAsync(
 42        Match match,
 43        string model,
 44        string communityContext,
 45        bool includeJustification = false,
 46        CancellationToken cancellationToken = default);
 47
 48    /// <summary>
 49    /// Reconstructs the prompt inputs for a match at an explicit evaluation timestamp.
 50    /// </summary>
 51    /// <param name="match">The match whose prompt should be reconstructed.</param>
 52    /// <param name="model">The model whose template should be used.</param>
 53    /// <param name="communityContext">The community context used for document resolution.</param>
 54    /// <param name="promptTimestamp">The exact timestamp to use when resolving versioned context documents.</param>
 55    /// <param name="requiredContextDocumentNames">Context documents that must exist at the supplied timestamp.</param>
 56    /// <param name="optionalContextDocumentNames">Context documents that should be included when available.</param>
 57    /// <param name="includeJustification">Whether to reconstruct the justification prompt variant.</param>
 58    /// <param name="cancellationToken">Cancellation token.</param>
 59    /// <returns>The reconstructed prompt inputs.</returns>
 60    Task<ReconstructedMatchPredictionPrompt> ReconstructMatchPredictionPromptAtTimestampAsync(
 61        Match match,
 62        string model,
 63        string communityContext,
 64        DateTimeOffset promptTimestamp,
 65        IReadOnlyList<string> requiredContextDocumentNames,
 66        IReadOnlyList<string>? optionalContextDocumentNames = null,
 67        bool includeJustification = false,
 68        CancellationToken cancellationToken = default);
 69}