{"id":21376217,"url":"https://github.com/gurpreetkaurjethra/rag-evaluator","last_synced_at":"2025-10-05T04:15:43.050Z","repository":{"id":241084622,"uuid":"804268845","full_name":"GURPREETKAURJETHRA/RAG-Evaluator","owner":"GURPREETKAURJETHRA","description":"A library for evaluating Retrieval-Augmented Generation (RAG) systems","archived":false,"fork":false,"pushed_at":"2024-05-22T09:35:28.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T20:36:44.053Z","etag":null,"topics":["bert","bleu-score","diversity","evaluation-metrics","generative-ai","library","llm","metrics","perplexity","python-3","racial-bias","rag","rouge-metric","streamlit"],"latest_commit_sha":null,"homepage":"https://github.com/GURPREETKAURJETHRA/END-TO-END-GENERATIVE-AI-PROJECTS","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GURPREETKAURJETHRA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-22T09:19:41.000Z","updated_at":"2025-01-03T14:30:56.000Z","dependencies_parsed_at":"2024-05-22T10:54:04.593Z","dependency_job_id":null,"html_url":"https://github.com/GURPREETKAURJETHRA/RAG-Evaluator","commit_stats":null,"previous_names":["gurpreetkaurjethra/rag-evaluator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GURPREETKAURJETHRA/RAG-Evaluator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GURPREETKAURJETHRA%2FRAG-Evaluator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GURPREETKAURJETHRA%2FRAG-Evaluator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GURPREETKAURJETHRA%2FRAG-Evaluator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GURPREETKAURJETHRA%2FRAG-Evaluator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GURPREETKAURJETHRA","download_url":"https://codeload.github.com/GURPREETKAURJETHRA/RAG-Evaluator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GURPREETKAURJETHRA%2FRAG-Evaluator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278406903,"owners_count":25981708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bert","bleu-score","diversity","evaluation-metrics","generative-ai","library","llm","metrics","perplexity","python-3","racial-bias","rag","rouge-metric","streamlit"],"created_at":"2024-11-22T09:14:31.478Z","updated_at":"2025-10-05T04:15:43.004Z","avatar_url":"https://github.com/GURPREETKAURJETHRA.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RAG Evaluator\n\n## Overview\n\nRAG Evaluator is a Python library for evaluating Retrieval-Augmented Generation (RAG) systems. It provides various metrics to evaluate the quality of generated text against reference text.\n\n## Installation\n\nYou can install the library using pip:\n\n```bash\npip install rag-evaluator\n```\n\n## Usage\n\nHere's how to use the RAG Evaluator library:\n\n```python\nfrom rag_evaluator import RAGEvaluator\n\n# Initialize the evaluator\nevaluator = RAGEvaluator()\n\n# Input data\nquestion = \"What are the causes of climate change?\"\nresponse = \"Climate change is caused by human activities.\"\nreference = \"Human activities such as burning fossil fuels cause climate change.\"\n\n# Evaluate the response\nmetrics = evaluator.evaluate_all(question, response, reference)\n\n# Print the results\nprint(metrics)\n```\n\n## Streamlit Web App\n\nTo run the web app:\n\n- cd into streamlit app folder.\n- Create a virtual env\n- Activate\n- Install all dependencies\n- and run\n```\nstreamlit run app.py\n```\n\n## Metrics\n\nThe following metrics are provided by the library:\n\n- **BLEU**: Measures the overlap between the generated output and reference text based on n-grams.\n- **ROUGE-1**: Measures the overlap of unigrams between the generated output and reference text.\n- **BERT Score**: Evaluates the semantic similarity between the generated output and reference text using BERT embeddings.\n- **Perplexity**: Measures how well a language model predicts the text.\n- **Diversity**: Measures the uniqueness of bigrams in the generated output.\n- **Racial Bias**: Detects the presence of biased language in the generated output.\n\n## Testing\n\nTo run the tests, use the following command:\n\n```\npython -m unittest discover -s rag_evaluator -p \"test_*.py\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgurpreetkaurjethra%2Frag-evaluator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgurpreetkaurjethra%2Frag-evaluator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgurpreetkaurjethra%2Frag-evaluator/lists"}