Skip to content

fraunhofer-iais/chunking-strategies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chunking-strategies

Installation

Steps

  1. Create a virtual environment:

    python3.10 -m venv venv
  2. Activate the virtual environment:

    • On macOS and Linux:

      source venv/bin/activate
    • On Windows:

      .\venv\Scripts\activate
  3. Install the required packages:

    pip install -r requirements.txt

This will set up a virtual environment using Python 3.10 and install all the dependencies listed in the requirements.txt file.

  1. Set up environment variables:

    Create a .env file in the root directory of your project and add the following lines, replacing the placeholder values with your actual keys:

    # keys
    CUDA_VISIBLE_DEVICES=3,4
    OPENAI_API_KEY=your_openai_api_key
    HF_TOKEN=your_huggingface_token
    HF_HOME=/path/to/your/huggingface/cache

Data

Inspection

To visibly check whether the RAG questions of a dataset can be answered by the corresponding context, run the following command:

python3 -m src.inspect.inspect_spans -d <dataset_name> -m <max_samples>

The dataset names can be found in the file itself.
The file can be used for every dataset that outputs the common EvalSample format.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages