From da9aa62388dccc14303b65124bf7422dec4002ec Mon Sep 17 00:00:00 2001 From: Dhruv Chawla Date: Wed, 14 Feb 2024 19:08:46 +0530 Subject: [PATCH] Update README.md --- .../llama-index-callbacks-uptrain/README.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/llama-index-integrations/callbacks/llama-index-callbacks-uptrain/README.md b/llama-index-integrations/callbacks/llama-index-callbacks-uptrain/README.md index 28ae8097c577b..f9c12773deaa9 100644 --- a/llama-index-integrations/callbacks/llama-index-callbacks-uptrain/README.md +++ b/llama-index-integrations/callbacks/llama-index-callbacks-uptrain/README.md @@ -1 +1,35 @@ # LlamaIndex Callbacks Integration: UpTrain + +UpTrain is an open-source tool to evaluate and monitor the performance of language models. It provides a set of pre-built evaluations to assess the quality of responses generated by the model. Once you add UpTrainCallbackHandler to your existing LlamaIndex pipeline, it will take care of sending the generated responses to the UpTrain Managed Service for evaluations and display the results in the output. + +Three additional evaluations for Llamaindex have been introduced, complementing existing ones. These evaluations run automatically, with results displayed in the output. More details on UpTrain's evaluations can be found [here](https://github.com/uptrain-ai/uptrain?tab=readme-ov-file#pre-built-evaluations-we-offer-). + +Selected operators from the LlamaIndex pipeline are highlighted for demonstration: + +## 1. **RAG Query Engine Evaluations**: + +The RAG query engine plays a crucial role in retrieving context and generating responses. To ensure its performance and response quality, we conduct the following evaluations: + +- **Context Relevance**: Determines if the context extracted from the query is relevant to the response. +- **Factual Accuracy**: Assesses if the LLM is hallcuinating or providing incorrect information. +- **Response Completeness**: Checks if the response contains all the information requested by the query. + +## 2. **Sub-Question Query Generation Evaluation**: + +The SubQuestionQueryGeneration operator decomposes a question into sub-questions, generating responses for each using a RAG query engine. Given the complexity, we include the previous evaluations and add: + +- **Sub Query Completeness**: Assures that the sub-questions accurately and comprehensively cover the original query. + +## 3. **Re-Ranking Evaluations**: + +Re-ranking involves reordering nodes based on relevance to the query and choosing top n nodes. Different evaluations are performed based on the number of nodes returned after re-ranking. + +a. Same Number of Nodes + +- **Context Reranking**: Checks if the order of re-ranked nodes is more relevant to the query than the original order. + +b. Different Number of Nodes: + +- **Context Conciseness**: Examines whether the reduced number of nodes still provides all the required information. + +These evaluations collectively ensure the robustness and effectiveness of the RAG query engine, SubQuestionQueryGeneration operator, and the re-ranking process in the LlamaIndex pipeline.