🚀 RagUp
Build semantic search, AI-powered question answering, and FastAPI APIs from your documents in just a few lines of Python.
RagUp is an opinionated Python library that lets you turn documents into searchable AI knowledge bases with almost no setup.
✨ Features
- 📄 Supports PDF, TXT and JSON documents
- 🧠 Local embeddings using Sentence Transformers
- 🔍 Semantic Search
- 🤖 AI-powered Question Answering (Gemini)
- ⚡ FastAPI server with automatic Swagger UI
- 💾 Persistent indexing (no re-indexing if nothing changes)
- 🐍 Simple Python API
📦 Installation
pip install ragup
⚡ Quick Start
from ragup import Document
doc = Document("policy.pdf")
# Build the index
doc.ragup()
# Semantic Search
results = doc.search(
"refund policy"
)
print(results)
# AI Question Answering
answer = doc.ask(
"What is the refund policy?",
api_key="YOUR_GEMINI_API_KEY"
)
print(answer)
# Launch FastAPI
doc.serve(
api_key="YOUR_GEMINI_API_KEY"
)
Open
http://localhost:8085/docs
to access the interactive Swagger UI.
📚 Supported Documents
| Format | Supported |
|---|---|
| ✅ | |
| TXT | ✅ |
| JSON | ✅ |
🔍 Semantic Search
results = doc.search(
"shipping charges",
top_k=3
)
Returns the most relevant chunks from your document.
🤖 AI Question Answering
answer = doc.ask(
"Summarize this document",
api_key="YOUR_GEMINI_API_KEY"
)
RagUp retrieves relevant chunks and asks Gemini to answer using only the document context.
🌐 FastAPI Server
doc.serve(
api_key="YOUR_GEMINI_API_KEY"
)
Available endpoints
POST /search
POST /ask
GET /health
GET /docs
If no API key is supplied,
doc.serve()
the /ask endpoint is automatically disabled.
💾 Persistent Indexing
The first time you call
doc.ragup()
RagUp creates a local index.
Subsequent calls reuse the cached index automatically if the document hasn't changed, making startup almost instantaneous.
🛣 Roadmap
v0.1.0
- ✅ PDF Support
- ✅ TXT Support
- ✅ JSON Support
- ✅ Semantic Search
- ✅ Gemini Question Answering
- ✅ FastAPI Server
- ✅ Persistent Indexing
Upcoming
- DOCX Support
- Markdown Support
- HTML Support
- Multi-document collections
- Multiple LLM providers
- Better chunking strategies
- CLI Support
🤝 Contributing
Contributions, feature requests and bug reports are welcome.
Feel free to open an issue or submit a pull request.
📄 License
MIT License
🧠 Built by the brain of Mehul Dewan. Powered by caffeine.
Metadata
Release files for ragup 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ragup-0.1.0.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ragup-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.3 kB
Release files / ragup-0.1.0.tar.gz
| Download URL | ragup-0.1.0.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcf46db122c9108c26a391e46a86fd66efa845535cbe4e7db7d85eaf8638cb8f
|
|
BLAKE2b-256 checksum How to use checksums |
2edc64f7cd205acd6fd7ed1ec5ab7c100a50787f95e4e87d7bd2b23a64d82120
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Release files / ragup-0.1.0-py3-none-any.whl
| Download URL | ragup-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3bfbbaa11a8c532cf0afd8878862f794fb2c9153aacd97451f12dc075a302d2
|
|
BLAKE2b-256 checksum How to use checksums |
5a9f40301a42bc3b216e864df377d6c0433c94a91165661f4a1a93fbd19f4f6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|