Metadata-Version: 2.4
Name: pystreamdocuments
Version: 0.3.2
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: requests>=2.31.0
Requires-Dist: pydantic>=2.0
Requires-Dist: anthropic>=0.25.0
Requires-Dist: google-auth>=2.25.0
Requires-Dist: google-cloud-storage>=2.10.0
Requires-Dist: boto3>=1.28.0
Requires-Dist: pptx>=0.6.21
Requires-Dist: python-docx>=0.8.11
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: pytest>=7.4.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0 ; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0 ; extra == 'dev'
Requires-Dist: black>=23.0.0 ; extra == 'dev'
Requires-Dist: ruff>=0.1.0 ; extra == 'dev'
Requires-Dist: mypy>=1.5.0 ; extra == 'dev'
Requires-Dist: fastapi>=0.104.0 ; extra == 'server'
Requires-Dist: uvicorn>=0.24.0 ; extra == 'server'
Requires-Dist: pydantic-settings>=2.0.0 ; extra == 'server'
Provides-Extra: dev
Provides-Extra: server
License-File: LICENSE
Summary: Smart context provider for LLMs. Minimal, most-relevant knowledge based on query anticipation and semantic understanding. Structure-aware retrieval.
Keywords: rag,knowledge-extraction,document-intelligence,semantic-search,metadata-indexing
Author-email: Georgi Mammen Mullassery <mullassery@gmail.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Bug Tracker, https://github.com/Mullassery/pystreamdocuments/issues
Project-URL: Documentation, https://github.com/Mullassery/pystreamdocuments#readme
Project-URL: Homepage, https://github.com/Mullassery/pystreamdocuments
Project-URL: Repository, https://github.com/Mullassery/pystreamdocuments

# PyStreamDocuments

> **Smart context provider for LLMs.** Minimal, relevant knowledge based on query anticipation and semantic understanding.

![Status](https://img.shields.io/badge/Status-Production--Ready-brightgreen.svg)
![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)
![Tests](https://img.shields.io/badge/Tests-100%20Passing-brightgreen.svg)
![Distribution](https://img.shields.io/badge/Distribution-Wheels--Only-blue.svg)
![License](https://img.shields.io/badge/License-Proprietary-red.svg)

---

## Product Overview

**PyStreamDocuments** is a proprietary, production-grade knowledge retrieval system. Send only the minimal, highest-value context to LLMs based on deep semantic understanding.

### Why RAG Teams Choose This

**The Problem**:
- RAG systems send too much context to LLMs
- Query intent isn't understood before retrieval
- Irrelevant chunks waste tokens and degrade quality

**The Solution**:
- Query intent prediction
- Semantic context selection
- Continuous reranking
- Structure-aware retrieval

**Result**: Better answers, fewer tokens, lower costs.

---

## Installation

```bash
pip install pystreamdocuments
# or with uv
uv pip install pystreamdocuments
```

### Requirements
- Python 3.10+
- Precompiled wheels

### Distribution Model

**Proprietary-first distribution**:
- ✅ Wheels-only via PyPI (no source code)
- ✅ Production-optimized retrieval
- ✅ 100 comprehensive tests
- ✅ Used in production systems

---

## Quick Start

```python
from pystreamdocuments import SmartRetrieval

# Initialize with your documents
retrieval = SmartRetrieval(documents=docs)

# Retrieve with semantic understanding
context = retrieval.retrieve(
    query="How do I set up authentication?",
    anticipate_follow_ups=True,
    max_tokens=500,
)

# Use with LLM
response = llm.generate(
    query="How do I set up authentication?",
    context=context,  # Minimal, relevant chunks
)
```

---

## Features

- **Query Anticipation**: Predict intent before retrieval
- **Semantic Selection**: Deep understanding of relevance
- **Continuous Reranking**: Rank as you go
- **Structure-Aware**: Understands document hierarchy
- **Minimal Context**: Only essential chunks
- **Production Ready**: 100 tests

---

## Quality & Testing

- **100 tests** passing
- **Production-grade** — used in RAG systems
- **Semantic understanding** — deep relevance scoring

---

## Support

For production deployments: **mullassery@gmail.com**

---

**Version**: 0.3.0  
**License**: Proprietary  
**Distribution**: Wheels-only via PyPI  
**Python**: 3.10+  

Built for smart document retrieval.

