10BC0 GitHub - margitantal68/rag_paper: RAG Evaluation using RAGAS
[go: up one dir, main page]

Skip to content

margitantal68/rag_paper

Repository files navigation

RAG Evaluation using RAGAS

This is a repository for paper: Evaluating Open-Source LLMs in RAG Systems: A Benchmark on Diploma Theses Abstracts Using RAGAS

📚 Antal, M., Buza, K. Evaluating Open-Source LLMs in RAG Systems: A Benchmark on Diploma Theses Abstracts Using Ragas. Acta Univ. Sapientiae Inform. 17, 5 (2025). https://doi.org/10.1007/s44427-025-00006-3

🎯 Presentation Slides

🎯 Presentation Slides (PDF)

Installation

Prerequisites

  1. Python 3.11 or higher
  2. Git
  3. OpenAI API key

Steps

  1. Clone the repository

    git clone https://github.com/margitantal68/rag_paper
  2. Navigate to the project directory

    cd rag_paper
  3. Create and activate a virtual environment

    • On Linux/macOS:

      python3 -m venv venv
      source venv/bin/activate
    • On Windows:

      python -m venv venv
      venv\Scripts\activate
  4. Set Up Elasticsearch

    • Install Elasticsearch using Docker:
      docker run -d -p 9200:9200 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:8.9.0
  5. Set Up Ollama

    • Install Ollama and pull the required models
  6. Install dependencies

    pip install -r requirements.txt

Usage

This project requires an OpenAI API key. Follow these steps to set it up:

  1. Obtain your OpenAI API key from OpenAI's website.

  2. Copy the .env.example file in the project directory:

    cp .env.example .env
  3. Set the API key in the .env file:

    OPENAI_API_KEY=your_api_key_here
  4. Run the scripts in the following order:

  • Create the Elasticsearch index
    python theses_create_index.py
  • Evaluate the Retriever
    python theses_retrieval_evaluation.py
  • Evaluate the Generation
    python theses_rag_evaluation.py

⚠️ Do not run the script for testset creation theses_testset_creation_ragas_single_hop.py as it is not needed for the evaluation. The testset is already created and included in the repository theses\TESTSET\test_dataset.csv.

⚠️ Do not run the script for question classification theses_testset_question_classification.py as it is not needed for the evaluation. The classification is already done and included in the repository theses\TESTSET\test_dataset.csv.

About

RAG Evaluation using RAGAS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0