get started

From pip to first answer in five minutes

A Python library: install it, bring two free API keys, index a PDF, ask a question.

installation

Install via pip

One command. Python 3.11+, any OS.

install
$pip install prod-rag

Requires Python 3.11+. Compatible with Windows, macOS, and Linux.

api keys

Bring two free-tier keys

Embeddings and generation both run on generous free tiers — no credit card required.

1. Jina AI — embeddings

Converts text into vector representations for semantic search.

1M tokens/month freeFast inference
Get a Jina AI key →
Sign up → Dashboard → API Keys → Create

2. Groq — generation

Generates answers from retrieved context, with citations.

30 req/min freeFastest LLM API
Get a Groq key →
Sign up → API Keys → Create new key
quick start

Your first pipeline in 30 seconds

Index a document, ask a question. That’s the whole loop.

from rag_core import RAGPipeline
from rag_core.config import EmbeddingSettings, LLMSettings

# Configure with your API keys
pipeline = RAGPipeline(
    embedding_settings=EmbeddingSettings(
        api_key="your-jina-key",
        provider="jina"
    ),
    llm_settings=LLMSettings(
        api_key="your-groq-key",
        base_url="https://api.groq.com/openai/v1",
        model="openai/gpt-oss-20b"
    )
)

# Index a document
result = pipeline.index_document("research-paper.pdf")
print(f"Indexed {result.indexed_chunks} chunks")

# Ask a question
answer = pipeline.query("What are the main findings?")

if answer.refused:
    print(f"No answer: {answer.answer}")
else:
    print(f"Answer: {answer.answer}")
    for src in answer.sources:
        print(f"  [{src.filename}] page {src.page_number}")
use cases

What you can build

Research assistant

Index academic papers, ask questions, get cited answers with page references.

pipeline.query('What methodology did they use?')

Legal document search

Search contracts and legal docs with semantic understanding, not just keywords.

pipeline.query('What are the termination clauses?')

Internal knowledge base

Company docs, wikis, and manuals — searchable and question-answerable.

pipeline.query('How do I deploy to production?')

Customer support bot

Answer customer questions from product documentation with real citations.

pipeline.query('How do I reset my password?')
next steps

Dive deeper