Building Blocks
Before you begin building your RAG system using our SDK, let us introduce its building blocks.
Tutorials for the items we describe here are available in the Tutorials section of this documentation. Feel free to come here whenever you get lost!
Pipeline Diagram
This diagram shows the positioning of each components in the system. The components involved in this diagram are described below:
⚙ Guardrail Enforcer
Guardrail
Coming Soon!
⚙ Router
Semantic Router
gllm-misc | Involves LM | Involves EM | Tutorial: Routing| Use Case: Implement Semantic Routing | API Reference
Decides which processing path to take, given user instruction/question.
⚙ Data Ingestion
Data Store
gllm-datastore | Related tutorials: Index Your Data with Vector Data Store Your First RAG Pipeline | API Reference
Place to store knowledge a.k.a. the knowledge base.
Document Processing Orchestrator
gllm-docproc | Related tutorials: Simple DPO Pipeline (Loader) | API Reference
Orchestrates the processing of the documents from ingestion until data store.
⚙ Retrieval
Query Transformer
gllm-retrieval | Involves LM | Tutorial : Query Transformation | Use Case: Query Transformation | API Reference
Converts natural language into better retrieval queries using Language Model.
Multimodal Transformer
Coming Soon!
Retrieval Parameter Extractor
gllm-retrieval| Involves LM | Tutorial: Retrieval Parameter Extractor | API Reference
Determines optimal search parameters for retrieval operations given a query.
Retriever
gllm-retrieval | Involves EM | Tutorial: Retriever | Use Case: Create the Retriever | API Reference
Searches through the knowledge base to find relevant information.
Chunk Processor
gllm-retrieval | Tutorial: Chunk Processor | API Reference
Processes and optimizes retrieved chunks for better context handling.
Reranker
gllm-retrieval | Involves EM | Tutorial: Reranker | API Reference
Reorders retrieved results by relevance and importance.
⚙ Generation
Compressor
gllm-generation | Tutorial: Compressor | API Reference
Reduces context size while preserving essential information.
Context Enricher
gllm-generation | Tutorial: Context Enricher | API Reference
Enhances context with additional metadata and information.
Reference Formatter
gllm-generation | Involves EM | Involves LM | Tutorial: Reference Formatter | Use Case: Adding Document References | API Reference
Formats citations and sources in generated responses.
Relevance Filter
gllm-generation| Involves EM | Involves LM | Tutorial: Relevance Filter | API Reference
Removes irrelevant information from retrieved context.
Repacker
gllm-generation | Tutorial: Repacker | Use Case: Your First RAG Pipeline | API Reference
Packages retrieved chunks into formats optimized for LLM understanding.
Response Synthesizer
gllm-generation | Involves LM | Tutorial: Response Synthesizer | Use Case: Create the Response Synthesizer | API Reference
Generates final responses by combining query, context, and history.
⚙ Conversation History, Cache, and Memory Manager
Chat History Manager
gllm-misc | Involves LM | Related tutorials: Chat History | API Reference
Manages conversation history for consistent and contextual responses.
Cache Manager
gllm-misc | Involves LM | Related tutorials: Caching Implementation | Use Case: Caching| API Reference
Caches frequently accessed information for improved response speed.
⚙ Inference
Some components may involve language or embedding models—marked with tag Involves LM or Involves EM. These are the key components that enable seamless inference process:
LM Request Processor
gllm-inference | Tutorial: LM Request Processor (LMRP) | Use Case: Utilize Language Model Request Processor | API Reference
Provides unified interface for LLM interactions.
Catalog
gllm-inference | Tutorial: Catalog | API Reference
Stores and creates LM request processors or prompt builders from external data sources.
Prompt Builder
gllm-inference | Tutorial: Prompt Builder| Use Case: Utilize Language Model Request Processor | API Reference
Constructs prompts from templates and dynamic content.
LM Invoker
gllm-inference | Tutorial: Language Model (LM) Invoker| Use Case: Utilize Language Model Request Processor | API Reference
Provides unified interface for interacting with multiple LM providers.
Output Parser
gllm-inference | Tutorial: Output Parser| Use Case: Produce Consistent Output from LM| API Reference
Extracts structured information from LM responses.
EM Invoker
gllm-inference | Tutorial: Embedding Model (EM) Invoker | Use Case: Your First RAG Pipeline| API Reference
Provides unified interface for interacting with multiple EM providers.
⚙️ Orchestration
Pipeline
gllm-pipeline | Tutorial: Pipeline| Use Case: Build End-to-End RAG PipelineExecute a Pipeline| API Reference
Sequences and manages the execution of the components in our SDK.
Steps
gllm-pipeline | Tutorial: Steps| Use Case: Build End-to-End RAG Pipeline| API Reference
The building block of a Pipeline: reads from the state, performs an operation, and writes results back.
Last updated