ITextGenerator
Interfaces · AiDotNet.Interfaces
A minimal, numeric-type-agnostic text generator: turns a prompt into generated text.
Known implementations: IGenerator<T>
For Beginners
it’s the “give it a prompt, get back text” part of a language model, with no other baggage — so the string-only RAG helpers can use a real LLM.
How It Works
Several RAG helpers (query expansion, multi-query generation, LLM reranking, context compression)
only need “prompt in, text out” and do not care about the numeric type T used for scoring.
This non-generic contract lets them accept any real generator — including any
IGenerator (which extends this) backed by a live chat model — instead of running
lexical heuristics with unused API credentials.
Methods
| Method | Summary |
|---|---|
string Generate(string prompt) |
Generates text for the given prompt. |