Skip to main content

A Naive RAG SDK using Gemini for embeddings, Qdrant for retrieval, and document loaders for building RAG piplines from scratch.

Project description

LugaCore

License:MIT Release Status LLM VectorDB

A lightweight, modular Retrieval-Augmented-Generation (RAG) system built from fundamental python libraries for efficient, verifiable Q&A.

📘 Overview

This project is a RAG framework built without reliance on high-level orchestration libraries. it demonstrates a ground-up implementation of the key RAG components.

✨ Features

Custom Document Processing:

  • Self-implemented Text Splitter: Recursive,semantic text splitting with token awareness logic for optimal chunk boundaries.
  • Custom Document Loader: Direct .docx parsing via python-docx, preserving paragraphs.

Intelligent Retrieval:

  • Hybrid Search Engine: combines dense semantic and sparse keyword retrieval within Qdrant for flexible query resolution.
  • Qdrant Integration: Native support for:
    • Vector indexing and collection management
    • Batch upserts and attribute-based payload filtering
    • Hybrid retrieval experimentation (dense + sparse)

Gemini LLM Integration

  • LLM-Driven Generation: Uses Gemini exclusively for answer synthesis, summarization, and context-aware responses.
  • Context injection: Dynamically augments user queries with retrieved context chunks.
  • Conversation Flow: Uses Gemini chat SDK for multi-turn conversations keeping track of user queries and RAG responses to improve relevance.

Modular & Transparent

  • 100% open and debuggable - designed for learning, research, and low-level RAG experimentation.

🚀 Installation & Quick Start

Follow these steps to install LangCore from PyPI and start using your RAG powered by Gemini.

1. Create project directory (if not already created)

# setup
mkdir my_project
cd my_project

2. Create and activate Virtual environment

# create a virtual environment
python -m venv virt

#Activate it (windows)
source virt/scripts/activate

3. Install LugaCore from PyPI

 pip install lugacore

4. Verify Installation

pip list | grep lugacore

5. Quick Start Example

from lugacore import LugaCore

#Initialize RAG pipeline
rag = LugaCore(
  qdrant_api_key="YOUR_QDRANT_API_KEY",
  gemini_api_key="YOUR_GEMINI_API_KEY",
  qdrant_url="YOUR_QDRANT_URL"
)

# Ingest documents
rag.load_document(filepath_or_buffer="path/to/your/file.docx")

#Query your knowledge base
response = rag.ask("What is physics?")
print(response)

🧩 Planed Features

  • Re-ranking.
  • Knowledge Graph
  • Caching layer
  • Multimodal support (images,audio, video).
  • Agentic pipelines
  • Async & Sync support

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

lugacore-0.1.0a1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

lugacore-0.1.0a1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file lugacore-0.1.0a1.tar.gz.

File metadata

  • Download URL: lugacore-0.1.0a1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lugacore-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 9b9d95b736170471f4bf652a6e6abc63df42bb1df24ff4635a9f74b4e52bebaa
MD5 7d8954eb2ce3ff8a6a47a3de0e95bf8f
BLAKE2b-256 0e3bf0e70c8d2d4e3894e47bb1328fd8b5aa49109f2a66edc887794802502987

See more details on using hashes here.

File details

Details for the file lugacore-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: lugacore-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lugacore-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d3a801242d1627e41958ece36358912f21ecbc74b8f65e40e18b7284f65a7eb
MD5 a0c4b8666610e3848c4bd5e7c6ff6076
BLAKE2b-256 dc6492875c63f75648eee7c229d45b2e6edb320f9b79e91bb7aa43dda7cf9bad

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