Skip to main content

RAQA

Retrieval-Augmented Question-Answering

Retrieval-augmented, pip-installable, CLI-based question answering over arbitrary document collections.

Usage

Installation

pip install raqa

Locally

pip install -e .

Run

BASH via Python interpreter

  1. Build DB

    python cli.py build DATABASE_NAME PATH/TO/FOLDER/WITH/MARKDOWNS

  2. Chat

    python cli.py chat DATABASE_NAME

  3. One-shot retrieval

    python cli.py search DATABASE_NAME "what is retrieval augmented generation?"

  4. Rebuild and chat

    python cli.py rebuild-and-chat DATABASE_NAME PATH/TO/FOLDER/WITH/MARKDOWNS

  5. Get stats

    python cli.py stats

  6. List databases

    python cli.py list

BASH natively

raqa build DATABASE_NAME PATH/TO/FOLDER/WITH/MARKDOWNS
raqa chat DATABASE_NAME
raqa search DATABASE_NAME "what is RAG?"
raqa list (DATABASE_NAME)
raqa stats (DATABASE_NAME)
raqa rebuild-and-chat DATABASE_NAME PATH/TO/FOLDER/WITH/MARKDOWNS

Python

Build database

from db import VectorDB
from config import MARKDOWN_ROOT

db = VectorDB()
db.build(MARKDOWN_ROOT)

Run

from agent import RAGAgent

agent = RAGAgent()
agent.chat()

Build instructions

  1. If any changes are made, update pyproject.toml.
  2. Building the package before uploading: cd raqa; python -m build.
  3. Upload the package to pypi: python -m twine upload --repository {pypi|testpypi} dist/*

Steps 2 and 3 can be done automatically by running make publish.

Related or comparable projects

  1. PyRAG difference: focuses on SingleStore.
  2. ragger-simple difference: uses Qdrant and requires a Qdrant API key, in addition to an LLM API key. RAQA only requires the latter and uses an open-source tech stack for the rest.

Next steps

Real tool-calling (instead of implicit RAG)

Define OpenAI tool:

{
  "name": "search_docs",
  "description": "...",
  "parameters": { "query": "string" }
}

Hybrid search

Combine BM25 (rank-bm25) + embeddings

Metadata

Release files for raqa 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for raqa 3.0.1
File Size Uploaded Provenance Actions
raqa-3.0.1.tar.gz 9.1 kB Without provenance Details for raqa-3.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for raqa 3.0.1
File Interpreter ABI Platform Actions
raqa-3.0.1-py3-none-any.whl Python 3 none any Details for raqa-3.0.1-py3-none-any.whl

Total release size: 17.7 kB

Release files / raqa-3.0.1.tar.gz

Download URL raqa-3.0.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2fe49284259241596f8ac9981d9ef1740edd8cd7896a5832f68c94540d35bffa
BLAKE2b-256 checksum
How to use checksums
b09c6f42950f608af5dc22073fe24e3c09ada10ec21df091ac9c037350d8048d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / raqa-3.0.1-py3-none-any.whl

Download URL raqa-3.0.1-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc8f41559509aeca6a3d4c9c1f4e102e84400a80ad9f58b061408f2753709630
BLAKE2b-256 checksum
How to use checksums
b3b70b9629ca7ca5528f2d7e05cb31c3ff2bdb694168a067878570117c0dd71d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for raqa 3.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page