eduardo-alvarez commited on
Commit
91aad50
·
verified ·
1 Parent(s): 3f7746e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +93 -24
README.md CHANGED
@@ -7,19 +7,97 @@ sdk: streamlit
7
  pinned: false
8
  license: apache-2.0
9
  ---
10
-
11
  # fun dialogues
12
  A library of datasets, LLM tooling, and open source models that can be used for training and inference for prototyping purposes. The project began as a collection of fictitious dialogues that can be used to train language models or augment prompts for prototyping and educational purposes. It has now grown to include tooling for LLM application development purposes and open source models.
13
 
14
- ![fun_dialogues_logo2](https://github.com/eduand-alvarez/fun-dialogues/assets/57263404/1d8ce401-b595-442f-980c-8ae06ed9d4b2)
 
 
 
15
 
16
- # Benchmark Datasets
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
- ## OpenGeoQuery: coming soon!
 
19
 
20
- # Models
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- ## Coming soon!
23
 
24
  # Dialogues
25
  - Customer Service
@@ -33,15 +111,16 @@ A library of datasets, LLM tooling, and open source models that can be used for
33
  - Sports
34
  - Basketball Coach: 100 fictitious examples of dialogues between a basketball coach and the players on the court during a game.
35
 
36
- ## How to Load Dialogues
 
 
37
  Loading dialogues can be accomplished using the fun dialogues library or Hugging Face datasets library.
38
 
39
- ## Load using fun dialogues
40
 
41
- 1. Install fun dialogues package
42
- `pip install fundialogues`
43
 
44
- 2. Use loader utility to load dataset as pandas dataframe. Further processing might be required for use.
45
  ```
46
  from fundialogues import dialoader
47
 
@@ -49,9 +128,9 @@ from fundialogues import dialoader
49
  physics_office_hours = dialoader("FunDialogues/academia-physics-office-hours")
50
  ```
51
 
52
- ## Loading using Hugging Face datasets
53
 
54
- 1. Install datasets package
55
 
56
  2. Load using datasets
57
  ```
@@ -68,14 +147,4 @@ Please be aware that the utilization of fictitious data in these datasets may in
68
 
69
  It is crucial to emphasize that none of the scenarios described in the fun dialogues dataset should be relied upon to provide advice or guidance to humans. These scenarios are purely fictitious and are intended solely for demonstration purposes. Any resemblance to real-world situations or individuals is entirely coincidental.
70
 
71
- The responsibility for the usage and application of these datasets rests solely with the individual or entity employing them. By accessing and utilizing these dialogues and all contents of the repository, you acknowledge that you have read and understood this disclaimer, and you agree to use them at your own discretion and risk.
72
-
73
- # Disclaimer
74
-
75
- The dialogues contained in this repository are provided for experimental purposes only. It is important to note that these dialogues are assumed to be original work by a human and are entirely fictitious, despite the possibility of some examples including factually correct information. The primary intention behind these dialogues is to serve as a tool for language modeling experimentation and should not be used for designing real-world products beyond non-production prototyping.
76
-
77
- Please be aware that the utilization of fictitious data in these datasets may increase the likelihood of language model artifacts, such as hallucinations or unrealistic responses. Therefore, it is essential to exercise caution and discretion when employing these datasets for any purpose.
78
-
79
- It is crucial to emphasize that none of the scenarios described in the fun dialogues dataset should be relied upon to provide advice or guidance to humans. These scenarios are purely fictitious and are intended solely for demonstration purposes. Any resemblance to real-world situations or individuals is entirely coincidental.
80
-
81
- The responsibility for the usage and application of these datasets rests solely with the individual or entity employing them. By accessing and utilizing these dialogues and all contents of the repository, you acknowledge that you have read and understood this disclaimer, and you agree to use them at your own discretion and risk.
 
7
  pinned: false
8
  license: apache-2.0
9
  ---
 
10
  # fun dialogues
11
  A library of datasets, LLM tooling, and open source models that can be used for training and inference for prototyping purposes. The project began as a collection of fictitious dialogues that can be used to train language models or augment prompts for prototyping and educational purposes. It has now grown to include tooling for LLM application development purposes and open source models.
12
 
13
+ ### Key components of fun dialogues:
14
+ - **JudgyRAG**: RAG eval tool
15
+ - **Benchmark Datasets**: custom benchmark datasets
16
+ - **Dialogues**: fictitious dialogue datasets for fun, experimentation, and testing.
17
 
18
+ You can install fun dialogues using pip: `pip install fundialogues`
19
+
20
+ <div align="center">
21
+ <img src="https://github.com/eduand-alvarez/fun-dialogues/assets/57263404/1d8ce401-b595-442f-980c-8ae06ed9d4b2" alt="Fun Dialogues Logo" width="750"/>
22
+ </div>
23
+
24
+ # JudgyRAG
25
+
26
+ JudgyRAG is a component of the FunDialogues Python library focused on evaluating the performance of Retrieval-Augmented Generation (RAG) systems. It facilitates this by creating synthetic datasets based on custom datasets, enabling a unique assessment of a RAG system's question-answering capabilities in a zero-shot Q&A context. Initially, JudgyRAG's primary functionality is the automatic generation of custom multiple-choice Q&A datasets. Future iterations will introduce further automation to seamlessly integrate with popular frameworks, enhancing testing and benchmarking processes.
27
+
28
+ ### Workflow
29
+
30
+ The workflow for JudgyRAG includes:
31
+
32
+ 1. **Scraping PDFs**: Information is extracted from PDFs into structured text formats.
33
+ 2. **Chunking Data**: Extracted data is chunked similarly to vector database embeddings for RAG, simulating data breakdown and storage.
34
+ 3. **Question Generation**: Each chunk acts as a knowledge base, with custom prompts instructing supported models (currently LLaMA 7B and 13B chat) to generate multiple-choice questions.
35
+ 4. **Iterative Parsing**: Chunks are processed iteratively, generating a multiple-choice question for each.
36
+ 5. **Quality Checks**: Poor-quality chunks leading to failed question generation are flagged for user review.
37
+ 6. **Benchmark Compilation**: The final document includes multiple-choice questions, correct answers, and source knowledge chunks.
38
+ 7. **RAG System Evaluation**: The synthetic benchmark dataset can be used to assess a RAG system, with automation for this process planned for future updates.
39
+
40
+ ### Environment Setup
41
+
42
+ Follow these steps to set up your environment for JudgyRAG:
43
+
44
+ #### Step 1
45
+ Install Visual Studio 2022 Community Edition with the “Desktop development with C++” workload.
46
+
47
+ #### Step 2
48
+ Update to the latest GPU driver.
49
+
50
+ #### Step 3
51
+ Install the Intel® oneAPI Base Toolkit 2024.0.
52
+
53
+ #### Step 4
54
+ Download the necessary wheels:
55
+
56
+ ```bash
57
+ wget https://intel-extension-for-pytorch.s3.amazonaws.com/ipex_stable/xpu/torch-2.1.0a0%2Bcxx11.abi-cp39-cp39-win_amd64.whl
58
+ wget https://intel-extension-for-pytorch.s3.amazonaws.com/ipex_stable/xpu/torchvision-0.16.0a0%2Bcxx11.abi-cp39-cp39-win_amd64.whl
59
+ wget https://intel-extension-for-pytorch.s3.amazonaws.com/ipex_stable/xpu/intel_extension_for_pytorch-2.1.10%2Bxpu-cp39-cp39-win_amd64.whl
60
+ ```
61
+
62
+ #### Step 5
63
+
64
+ Install the downloaded packages and BigDL LLM:
65
+
66
+ ```bash
67
+ pip install torch-2.1.0a0+cxx11.abi-cp39-cp39-win_amd64.whl
68
+ pip install torchvision-0.16.0a0+cxx11.abi-cp39-cp39-win_amd64.whl
69
+ pip install intel_extension_for_pytorch-2.1.10+xpu-cp39-cp39-win_amd64.whl
70
+ pip install --pre --upgrade bigdl-llm[xpu]
71
+ conda install libuv
72
+ ```
73
 
74
+ #### Step 6
75
+ Activate the Intel oneAPI environment:
76
 
77
+ ```bash
78
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
79
+ ```
80
+
81
+ For the latest setup instructions for BigDL LLM inference, visit [BigDL Documentation](https://bigdl.readthedocs.io/en/latest/doc/LLM/Overview/install_gpu.html)
82
+
83
+ ### Example Usage of JudgyRAG
84
+
85
+ ```python
86
+ from fundialogues import benchgen, judgypdf
87
+
88
+ folder_path = ""
89
+ output_directory = ""
90
+ chunk_file = ""
91
+ benchmark_output_directory = ""
92
+
93
+ judgypdf(folder_path, output_directory)
94
+ benchgen(chunk_file, benchmark_output_directory)
95
+ ```
96
+ # Benchmark Datasets
97
+
98
+ ### opengeoquery-v1
99
+ OpenGeoQuery-v1 is the first edition of a benchmark dataset composed of statements associated with the geosciences. The content of the dataset touches on topics like geophysics, petrology, minerology, seismology, geomorphology, etc. The purpose of this dataset is to use as a benchmark and for fine-tuning small geoscience LLMs (coming soon).
100
 
 
101
 
102
  # Dialogues
103
  - Customer Service
 
111
  - Sports
112
  - Basketball Coach: 100 fictitious examples of dialogues between a basketball coach and the players on the court during a game.
113
 
114
+
115
+ ### How to Load Dialogues
116
+
117
  Loading dialogues can be accomplished using the fun dialogues library or Hugging Face datasets library.
118
 
119
+ ### Load using fun dialogues
120
 
121
+ Assuming you've already installed fundialogues.
 
122
 
123
+ Use loader utility to load dataset as pandas dataframe. Further processing might be required for use.
124
  ```
125
  from fundialogues import dialoader
126
 
 
128
  physics_office_hours = dialoader("FunDialogues/academia-physics-office-hours")
129
  ```
130
 
131
+ ### Loading using Hugging Face datasets
132
 
133
+ 1. Install datasets package `pip install datasets`
134
 
135
  2. Load using datasets
136
  ```
 
147
 
148
  It is crucial to emphasize that none of the scenarios described in the fun dialogues dataset should be relied upon to provide advice or guidance to humans. These scenarios are purely fictitious and are intended solely for demonstration purposes. Any resemblance to real-world situations or individuals is entirely coincidental.
149
 
150
+ The responsibility for the usage and application of these datasets, tools, and codes rests solely with the individual or entity employing them. By accessing and utilizing these assets and all contents of the repository, you acknowledge that you have read and understood this disclaimer, and you agree to use them at your own discretion and risk.