v0.1.0 — now on PyPI

The way to
build RAG

Modular RAG library for Python. Swap any component — LLM, vectorstore, reranker — with one line in a YAML file. No code changes. Just config.

installpip install ragway
quickstart.py
from ragway import RAG
import asyncio

# load config — swap anything via yaml
rag = RAG.from_config("rag.yaml")

async def main():
    # ingest your documents
    count = await rag.ingest("./docs/")
    print(f"ingested {count} chunks")

    answer = await rag.query(
        "What is in my documents?"
    )
    print(answer)

    # switch LLM — one line, no re-ingest
    fast = rag.switch(llm="groq")
    answer2 = await fast.query(
        "same question, faster"
    )
    print(answer2)

asyncio.run(main())
how it works

One YAML file.
Everything configured.

Pick a provider for each component. Add your API key. ragway wires it all together — no Python changes needed.

version: "1.0"
pipeline: hybrid

plugins:
  llm:
    provider: groq
    model: llama-3.3-70b-versatile
    api_key: ${GROQ_API_KEY}

  embedding:
    provider: bge
    model: BAAI/bge-large-en-v1.5

  vectorstore:
    provider: qdrant
    index_path: .ragway/index

  reranker:
    enabled: true
    provider: bge

  chunking:
    strategy: recursive
    chunk_size: 512
config builder

Build your rag.yaml

Select one from each category. Your config generates live. Download and drop it straight into your project.

Pipeline
LLM provider
Embedding
Vectorstore
Retrieval
Reranker
Chunking
generated config
pipeline: naivellm: groqembedding: bgevectorstore: faissretrieval: vectorreranker: nonechunking: recursive
version: "1.0"
pipeline: naive

plugins:
  llm:
    provider: groq
    model: llama-3.3-70b-versatile
    api_key: ${GROQ_API_KEY}
    temperature: 0.2
    max_tokens: 1024

  embedding:
    provider: bge
    model: BAAI/bge-large-en-v1.5
    batch_size: 32

  vectorstore:
    provider: faiss
    index_path: .ragway/index

  retrieval:
    strategy: vector
    top_k: 5

    reranker:
    enabled: false

  chunking:
    strategy: recursive
    chunk_size: 512
    overlap: 50
faq

Common questions

How is ragway different from LangChain?+
Do I need all providers installed?+
Can I use ragway without any API keys?+
Can I switch providers without re-ingesting?+
What document types can ragway ingest?+