UpTrain Callback for performing evaluations on the LlamaIndex pipeline
Project description
LlamaIndex Callbacks Integration: UpTrain
UpTrain (github || website || docs) is an open-source platform to evaluate and improve Generative AI applications. It provides grades for 20+ preconfigured checks (covering language, code, embedding use cases), performs root cause analysis on failure cases and gives insights on how to resolve them. Once you add UpTrainCallbackHandler to your existing LlamaIndex pipeline, it will automatically capture the right data, run evaluations and display the results in the output.
More details on UpTrain's evaluations can be found here.
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 hallucinating 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. To evaluate the performance of SubQuery module, we add another check as well as run the above three for all the sub-queries:
- 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 the 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llama_index_callbacks_uptrain-0.4.0.tar.gz
.
File metadata
- Download URL: llama_index_callbacks_uptrain-0.4.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d0b74803fe4ee8c133f1e422e3ddea2057b710798801f032ec443c51ebe0165 |
|
MD5 | ceb7d564f49eb93f530e1a63704a5d77 |
|
BLAKE2b-256 | ca2a137043b6a9f1be5deb06543c0691c3206f95e891da5835bb7a59f575df78 |
File details
Details for the file llama_index_callbacks_uptrain-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_callbacks_uptrain-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ccaf0213d4c77553e68e07432e97ecba39591f69806b0b9f8869268fe6e6305 |
|
MD5 | 295e4b38cbd306ccfc6820d11bb2fea6 |
|
BLAKE2b-256 | bbbc3df749eb7d8d1baa4378ac75901d88dbc6b606f5aec5c7fc569f2a0d4447 |