🔋Generator
What is a Generator?
The generator
is a core component designed to generate responses. Besides generating responses you can evaluate your pipeline as well from within the generator. Generator function utilizes the retriever and llm to generate a response. It puts everything together to answer the user query.
Parameters
User query : The question from the user.
System Prompt Optional[str] : The system prompt that directs the responses of llm.
Retriever : The retriever which will fetch relevant information from the knowledge base based on the user query.
LLM [default: Gemini model] : The Language model to generate the response based on the information fetched by the retriever.
Code Snippet
Call
Once the pipeline is setup we use the call function to return the generated response from LLM that acts as Generator in RAG.
Evaluation
Evaluation is an integral part of BeyondLLM as it circles out the pain points in the pipeline. Generator lets you evaluate the pipeline on list of important benchmarks. For more information kindly refer to : Evaluation
Last updated