Skip to main content

Framework-agnostic RAG pipeline SDK. Plug in any component, swap any stage, configure everything in YAML

Project description

NexRAG

Framework-agnostic RAG pipeline SDK. Plug in any component, swap any stage, configure everything in YAML.

PyPI version Python 3.12+ License


What is NexRAG?

NexRAG is a production-grade RAG (Retrieval-Augmented Generation) pipeline SDK for Python.

NexRAG owns the pipeline shape. You own the components.

Every stage — loading, chunking, embedding, retrieval, generation — is a clean interface. NexRAG ships default implementations for each. You can swap any of them by implementing the interface and declaring it in YAML. No framework lock-in. No magic. No hidden behavior.


Quickstart

Note: NexRAG v1.0 is under active development. This section will be updated on first release.

from nexrag import NexRAG

pipeline = NexRAG.from_config("nexrag.yaml")

# Ingest documents
pipeline.ingest("docs/contracts/")

# Query
result = pipeline.query("What are the termination clauses?")
print(result.answer)
print(result.source_chunks)
# nexrag.yaml
nexrag:
  version: "1.0"

ingestion:
  chunker:
    strategy: recursive
    chunk_size: 512
  embedder:
    provider: openai
    model: text-embedding-3-small
  vector_db:
    provider: chroma
    default_collection: contracts

query:
  llm:
    provider: openai
    model: gpt-4o

Installation

# Core only
pip install nexrag

# With OpenAI support
pip install "nexrag[openai]"

# With everything
pip install "nexrag[all]"

Design Principles

Principle What it means
Interface-first Every stage is a contract. Implementation is secondary.
Config-driven YAML configures the pipeline. Code defines the logic.
Zero lock-in Core has no dependency on LangChain, LlamaIndex, or any AI SDK.
Explicit over implicit No hidden defaults. Every behavior is declared or documented.
Extensible by design New components plug in without touching core.

Architecture

NexRAG has two independent pipelines:

INGESTION  →  Loader → Sanitizer → Chunker → Embedder → VectorDB
QUERY      →  Embedder → Retriever → PromptBuilder → LLM → PipelineResult

See Architecture Documentation for full pipeline diagrams.


Supported Providers (V1)

Category Providers
Embedders OpenAI, HuggingFace, Ollama
Vector DBs ChromaDB (local + remote)
LLMs OpenAI, Anthropic, Ollama
Loaders PDF, TXT/MD, Word, Excel, JSON, HTML, Code

Contributing

NexRAG is in early development. Contribution guidelines will be published with v1.0.


Changelog

See CHANGELOG.md.

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

nexrag-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

nexrag-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file nexrag-0.1.0.tar.gz.

File metadata

  • Download URL: nexrag-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nexrag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d597f053429996339b553fc196b52a7851ec4469fccd5e06bbdc0cc9e2791f5e
MD5 83183ddf3fbc0dff4e1274eab0f7ff5f
BLAKE2b-256 e8e6a5ade3ba5e0baa5fab60edc679fc17707e0357eefa04724733fb781537cc

See more details on using hashes here.

File details

Details for the file nexrag-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nexrag-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nexrag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 965c27af0f77884190abe9af94062a889e8329e037b620d911d407e12a01938e
MD5 cb0217adf9221dde3ff4c242d3dd1352
BLAKE2b-256 c2285eba196fa7c2c93faa31e97ff8060c2764039f669b61232a6c13ca0328bd

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