Class RagPrompts
The two pure functions the whole recipe rests on, and the three default prompts.
public static class RagPrompts
- Inheritance
-
RagPrompts
- Inherited Members
Fields
- ContextHeading
The block's first line, above
RagOptions.ContextPrompt.
- DefaultCitationsPrompt
The default citation instruction. Names the marker shape the middleware resolves.
- DefaultContextPrompt
The default instruction prefix. Untrusted retrieved text follows it, as a user message.
- DefaultNoContextAnswer
What the turn answers when retrieval returned nothing and no model was called.
- TruncationSuffix
Appended to a clamped chunk, so a reader can see the model was shown less than the whole thing.
Methods
- Format(IReadOnlyList<RagSource>, RagOptions)
Numbers, clamps, orders and renders the block. Pure - the tier-1 golden-string target.
- Rank(IReadOnlyList<RagSource>)
Normalises to best-first without inventing a number: a Distance list is ordered ascending, a Relevance list descending. Nothing is rescaled, because there is no defensible scale to rescale onto.