Skip to main content

DATA 533 RAG Engine project with ingestion, indexing, retrieval, and CI

Project description

DataSage ๐Ÿง™โ€โ™‚๏ธ

A lightweight, modular Python package for building Retrieval-Augmented Generation (RAG) systems. DataSage enables you to query your documents using natural language by combining semantic search with large language models (LLMs).

๐ŸŒŸ Features

  • Document Ingestion: Support for multiple file formats (CSV, XLSX, PDF, TXT).
  • Efficient Chunking: Configurable text splitting with overlap for context preservation.
  • Vector Storage: ChromaDB-backed vector database for efficient similarity search.
  • Semantic Search: HuggingFace embeddings for accurate document retrieval.
  • LLM Integration: Local LLM support via Ollama for answer generation.
  • Modular Architecture: Easy to extend and customize components.

๐Ÿ—๏ธ Architecture

DataSage
โ”œโ”€โ”€ Ingestion Layer     โ†’ Load and chunk documents
โ”œโ”€โ”€ Indexing Layer      โ†’ Embed and store in vector database
โ”œโ”€โ”€ Query Layer         โ†’ Retrieve relevant context and generate answers
โ””โ”€โ”€ RAG Pipeline        โ†’ End-to-end question answering system

๐Ÿ“‹ Prerequisites

  • Python 3.8+
  • Ollama (for local LLM inference)

๐Ÿš€ Installation

1. Clone the repository

git clone https://github.com/mzikkhan/datasage.git
cd datasage

2. Install dependencies

pip install -r requirements.txt

3. Install Ollama

Download and install Ollama from ollama.com.

Once installed, in a separate terminal do the following:

Pull a model:

ollama pull llama3.1

Verify installation:

ollama run llama3.1

Supported File Formats

  • CSV: Loaded with metadata for each row
  • PDF: Extracted page by page
  • TXT: Loaded as single document
  • XLSX: Extracted sheet by sheet

๐ŸŽฏ Use Cases

  • Document Q&A: Query large documents using natural language
  • Knowledge Base Search: Build searchable knowledge bases
  • Customer Support: Answer questions from documentation
  • Research Assistant: Extract information from academic papers
  • Code Documentation: Query codebases and technical docs

Contributors

Yihang Wang

  • Sub-package: ingestion
  • Modules: loaders.py, chunker.py

Aaron Sukare

  • Sub-package: indexing
  • Modules: embedder.py, vector_store.py, index_engine.py

Zaed Khan

  • Sub-package: retrieval
  • Modules: rag_engine/init.py, generator.py, retriever.py, data_models.py

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ™ Acknowledgments

๐Ÿ“ง Contact

For questions or support, please open an issue on GitHub.


Made with โค๏ธ by the DataSage Team

datasage_data533_step_3
โ”œโ”€ .DS_Store
โ”œโ”€ coverage.json
โ”œโ”€ datasage_store
โ”‚  โ””โ”€ chroma.sqlite3
โ”œโ”€ main.py
โ”œโ”€ project_description.pdf
โ”œโ”€ rag_engine
โ”‚  โ”œโ”€ .DS_Store
โ”‚  โ”œโ”€ indexing
โ”‚  โ”‚  โ”œโ”€ embedder.py
โ”‚  โ”‚  โ”œโ”€ indexing_documentation_updated.md
โ”‚  โ”‚  โ”œโ”€ index_engine.py
โ”‚  โ”‚  โ”œโ”€ testing_readme.md
โ”‚  โ”‚  โ””โ”€ vector_store.py
โ”‚  โ”œโ”€ ingestion
โ”‚  โ”‚  โ”œโ”€ chunker.py
โ”‚  โ”‚  โ”œโ”€ coverage_ingestion
โ”‚  โ”‚  โ”‚  โ”œโ”€ coveragehtml_ingestion.png
โ”‚  โ”‚  โ”‚  โ””โ”€ coverage_ingestion.png
โ”‚  โ”‚  โ”œโ”€ documentation.md
โ”‚  โ”‚  โ”œโ”€ loaders.py
โ”‚  โ”‚  โ”œโ”€ README.md
โ”‚  โ”‚  โ””โ”€ __init__.py
โ”‚  โ”œโ”€ retrieval
โ”‚  โ”‚  โ”œโ”€ data_models.py
โ”‚  โ”‚  โ”œโ”€ documentation.md
โ”‚  โ”‚  โ”œโ”€ generator.py
โ”‚  โ”‚  โ”œโ”€ README.md
โ”‚  โ”‚  โ”œโ”€ retriever.py
โ”‚  โ”‚  โ””โ”€ __init__.py
โ”‚  โ”œโ”€ tests
โ”‚  โ”‚  โ”œโ”€ coverage_report.png
โ”‚  โ”‚  โ”œโ”€ test_csv_loader.py
โ”‚  โ”‚  โ”œโ”€ test_data_models.py
โ”‚  โ”‚  โ”œโ”€ test_embedder.py
โ”‚  โ”‚  โ”œโ”€ test_generator.py
โ”‚  โ”‚  โ”œโ”€ test_index_engine.py
โ”‚  โ”‚  โ”œโ”€ test_pdf_loader.py
โ”‚  โ”‚  โ”œโ”€ test_retriever.py
โ”‚  โ”‚  โ”œโ”€ test_text_chunker.py
โ”‚  โ”‚  โ”œโ”€ test_txt_loader.py
โ”‚  โ”‚  โ”œโ”€ test_vector_store.py
โ”‚  โ”‚  โ””โ”€ __init__.py
โ”‚  โ””โ”€ __init__.py
โ”œโ”€ readme.md
โ”œโ”€ requirements.txt
โ”œโ”€ search_test.txt
โ”œโ”€ test_data.csv
โ””โ”€ utils_test.txt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasage_mds-0.0.1.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasage_mds-0.0.1-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file datasage_mds-0.0.1.tar.gz.

File metadata

  • Download URL: datasage_mds-0.0.1.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for datasage_mds-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c8e5de422ff548cb0214d7a28493c8e11ab20d8928ab2794e156ae323c6641b8
MD5 d1b86b4386054d74020e643800642d4a
BLAKE2b-256 ff00dbed0ae2bfe052eaf88dbcb5afed3af60e0f7116b4737ff2c57806f35ea3

See more details on using hashes here.

File details

Details for the file datasage_mds-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: datasage_mds-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for datasage_mds-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ae6e242ded71967b64993b2d0c868153a03a2cd4ea61b8e5c832997ae2c0d50
MD5 cbb7f2e0e8c7288e3e5ded34a136900d
BLAKE2b-256 afd10cdbda75a10126c31d293ea24dc83f17332b47ac0edb5e8ab1a028e1cd8a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page