QueryProcessorBase
Base Classes · AiDotNet.RetrievalAugmentedGeneration.QueryProcessors
Base class for query processor implementations with common validation logic.
Implements: IQueryProcessor
Known derived types: IdentityQueryProcessor, KeywordExtractionQueryProcessor, LemmatizationQueryProcessor, QueryExpansionProcessor, QueryRewritingProcessor<T>, SpellCheckQueryProcessor, StopWordRemovalQueryProcessor
For Beginners
This is the foundation for all query processors.
It handles the boring stuff so you can focus on the interesting parts:
- Checking that the query isn’t empty or null
- Providing a clean structure for your processing logic
- Ensuring consistent error handling
When you create a new query processor, you just need to:
- Inherit from this class
- Implement ProcessQueryCore with your custom logic
- Everything else is handled for you
How It Works
This base class provides standard validation for query processors and defines the template for implementing custom query processing logic.
Methods
| Method | Summary |
|---|---|
string ProcessQuery(string query) |
Processes the query with validation. |