ragway
The way to build RAG.
Install
pip install ragway
Quickstart
from ragway import RAG
import asyncio, pathlib
pathlib.Path("example_docs").mkdir(exist_ok=True); pathlib.Path("example_docs/intro.md").write_text("# RAG\nRetrieval-Augmented Generation combines retrieval with generation.", encoding="utf-8")
rag = RAG(llm="openai", api_key="YOUR_OPENAI_KEY")
print(asyncio.run(rag.ingest("example_docs")), asyncio.run(rag.query("What is RAG?")))
Why ragway
- Compared to LangChain: smaller public surface, fewer framework abstractions, explicit config and component wiring.
- Compared to LlamaIndex: direct control over retrieval/rerank/vectorstore choices without committing to one indexing model.
- For production code: you can start simple with
RAG(...), then move to YAML config and provider-specific tuning without rewriting app code.
What You Can Swap
| Component | Options |
|---|---|
| LLM | anthropic, openai, mistral, groq, llama, local |
| Vectorstore | faiss, chroma, pinecone, weaviate |
| Retrieval | vector, bm25, hybrid, multi_query, parent_document |
| Reranker | cohere, bge, cross_encoder (or None) |
| Chunking | fixed, recursive, semantic, sliding_window, hierarchical |
| Pipeline | naive, hybrid, self, long_context, agentic |
Install Options
# Base package
pip install ragway
# Provider extras
pip install ragway[anthropic]
pip install ragway[openai]
pip install ragway[mistral]
pip install ragway[groq]
pip install ragway[cohere]
pip install ragway[pinecone]
pip install ragway[weaviate]
pip install ragway[faiss]
pip install ragway[chroma]
pip install ragway[llama]
pip install ragway[bge]
# Bundles
pip install ragway[all-cloud]
pip install ragway[all-local]
pip install ragway[all]
pip install ragway[dev]
Config File Example
version: "1.0"
pipeline: hybrid
plugins:
llm:
provider: groq
model: llama-3.1-8b-instant
api_key: ${GROQ_API_KEY}
temperature: 0.2
max_tokens: 512
embedding:
provider: openai
model: text-embedding-3-small
api_key: ${OPENAI_API_KEY}
batch_size: 32
vectorstore:
provider: faiss
index_name: rag-lab
top_k: 5
retrieval:
strategy: hybrid
top_k: 5
rrf_k: 60
reranker:
enabled: true
provider: cohere
api_key: ${COHERE_API_KEY}
top_k: 3
chunking:
strategy: recursive
chunk_size: 512
overlap: 50
from ragway import RAG
import asyncio
rag = RAG.from_config("rag.yaml")
print(asyncio.run(rag.query("Summarize the key idea.")))
Links
Metadata
Release files for ragway 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 | |
|---|---|---|---|
| ragway-0.1.0.tar.gz | 2.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ragway-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.5 MB
Release files / ragway-0.1.0.tar.gz
| Download URL | ragway-0.1.0.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
072aba6b134aecce9df0d05cbcd1dae4615f91b16fd78ec3ef05a6b8bdb38167
|
|
BLAKE2b-256 checksum How to use checksums |
328b189bfbe9d870a9b3effe5edf197c8f48bdb47bb8a8a642f162f2ff9897d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / ragway-0.1.0-py3-none-any.whl
| Download URL | ragway-0.1.0-py3-none-any.whl |
|---|---|
| Size | 114.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5a9d1fe5002c2872c986102f297b79a23a1e19fe3894e3abe575f93da0657b9
|
|
BLAKE2b-256 checksum How to use checksums |
b7359df8cf9e1ac2c4ffc1320de0e3fca674eaac8e3cb74fa64bbb34cdf93e6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|