Skip to main content

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

Project description

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

PyPI: https://pypi.org/project/datasage-mds/

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.10 or higher
  • Ollama (for local LLM inference)

๐Ÿš€ Installation

1. Install from PyPI (recommended)

Package is published on PyPI:
https://pypi.org/project/datasage-mds/

pip install datasage-mds



### 2. Install Ollama

Download and install Ollama from [ollama.com](https://ollama.com/download). 

Once installed, in a separate terminal do the following:

Pull a model:
```bash
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
โ”‚  โ”œโ”€ rag_engine.py  
โ”‚  โ””โ”€ __init__.py
โ”œโ”€ README.md
โ”œโ”€ pyproject.toml
โ”œโ”€ 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.2.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.2-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: datasage_mds-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 7767c9f57565624230d74c5d8bcafc44baed220b359b7617c265445c3ec74fc7
MD5 913318028ffbe10f4f92dfc94ade7a7e
BLAKE2b-256 38164066492b7f7c5fa8e9851b88bc6476081c4b4af3fd8220b730afcc52e528

See more details on using hashes here.

File details

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

File metadata

  • Download URL: datasage_mds-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 153adffc0aff8fa8d75718a89eb79dcfe10f0f53d7497989d7b0ef1d4a2b6554
MD5 0eded7674b300406da4336e2dc0911c3
BLAKE2b-256 c762b76fc8f84f2e4c643f7c810c86823d4183f0be672ba5f34b5d378094bf0c

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