Skip to main content

1. Install and set up

pip install "ragrails[url,voyage,qdrant]"
docker run -p 6333:6333 qdrant/qdrant
from ragrails import RagRails

rag = RagRails()
rag.setup_url()   # one-time browser install

2. Ingest, chunk, embed, and store

result = rag.ingest(
    urls="https://example.com",
    ingestion={"mode": "full", "max_depth": 3, "max_pages": 200},
    embedding={"provider": "voyage", "model": "voyage-3"},
    storage={"vector_db": "qdrant", "collection": "website", "url": "http://localhost:6333"},
)

print(f"Stored {result.stored} chunks from {result.sources} pages")

3. Query

result = rag.query(
    "What does the site say about pricing?",
    embedding={"provider": "voyage", "model": "voyage-3"},
    retrieval={"vector_db": "qdrant", "collection": "website", "url": "http://localhost:6333", "top_k": 5},
)

for chunk in result.items:
    print(chunk.text[:200])