Skip to content

Commit 6141a99

Browse files
committed
Retrieval-Augmented Generation and Semantic Chunking
All files for configuration, code, and all else needed to reproduce the topics I presented at "The 2024 IARIA Annual Congress on Frontiers in Science, Technology, Services, and Applications." Please follow the instructions in the README.
1 parent eb894af commit 6141a99

File tree

7 files changed

+1744
-0
lines changed

7 files changed

+1744
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.swp
2+
__pycache__
3+
.DS_Store
4+
.ipynb_checkpoints

CITATION.cff

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This CITATION.cff file was generated with cffinit.
2+
# Visit https://bit.ly/cffinit to generate yours today!
3+
4+
cff-version: 1.2.0
5+
title: RAG Fundamentals and Semantic Chunking
6+
message: >-
7+
If you reference this repository, please cite it as
8+
indicated.
9+
type: software
10+
authors:
11+
- given-names: Dalmo
12+
family-names: Cirne
13+
orcid: 'https://orcid.org/0009-0005-6354-0041'
14+
repository-code: 'https://github.com/dcirne/rag_fundamentals'
15+
repository: 'https://dalmocirne.com'
16+
abstract: >-
17+
The material in this repository was initially prepared for
18+
a lecture I gave at The 2024 IARIA Annual Congress on
19+
Frontiers in Science, Technology, Services, and
20+
Applications, on the topics of Retrieval-Augmented
21+
Generation (RAG) and Semantic Chunking.
22+
23+
24+
RAG is a technique used to optimize the output of a Large
25+
Language Model (LLM). The expectation is that In-Context
26+
Learning (ICL) takes place, leading the LLM to produce
27+
better results.
28+
29+
30+
RAG can be more effective when semantic chunking is used.
31+
The basic idea is to retrieve and compile small "chunks"
32+
of data to augment the prompt to be sent to an LLM, rather
33+
than inserting entire documents that contain the topic of
34+
interest, but also information that is not relevant to the
35+
user interaction.
36+
keywords:
37+
- rag
38+
- semantic-chunking
39+
license: Apache-2.0
40+
version: 1.0.0
41+
date-released: '2024-06-18'

Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM python:3.11-bookworm
2+
3+
# Set bash as shell
4+
SHELL ["/bin/bash", "-c"]
5+
6+
# Create the deployment and other directories
7+
RUN mkdir -p /workspace
8+
9+
# Working directory
10+
WORKDIR /workspace
11+
12+
# Update system and install required dependencies
13+
RUN apt-get update && \
14+
apt-get -y upgrade
15+
16+
# Copy necessary files
17+
COPY requirements.txt /workspace/
18+
19+
# Install packages and tools
20+
RUN set -eux && \
21+
apt-get install -y --no-install-recommends \
22+
build-essential && \
23+
pip install --upgrade pip
24+
25+
RUN pip install --no-cache-dir -r requirements.txt
26+
27+
# Exposes connection port
28+
EXPOSE 8024
29+
30+
# Run the Jupyter Notebook
31+
CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8024", "--no-browser", "--allow-root"]

0 commit comments

Comments
 (0)