A friendly AI assistant that understands machine learning, science fiction, and the cosmos. It can answer questions, perform calculations, and search Wikipedia — all directly from your terminal.
# Clone and enter the project
git clone https://github.com/bniladridas/rag.git
cd rag
# Setup (virtual environment)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e ".[test,dev]"
# Run tests
pytest --cov=src --cov-report=term-missingOr run with Docker:
docker build -f container/Dockerfile -t rag .
docker run -it ragWith API keys:
docker run -it -e TMDB_API_KEY=your_key -e NASA_API_KEY=your_key rag- Knowledge Areas: Machine learning, sci-fi, and space science
- Built-in Tools: Calculator, Wikipedia search, time/date
- Interface: Simple CLI and TUI modes
- Design: Modular, extensible, and fast (FAISS-powered search)
ragrag-tuiExamples:
What is deep learning?
Tell me about Interstellar
WIKI: Quantum Computing
CALC: sqrt(144)
TIME:
rag-collectFetches data from:
- Machine learning documentation
- TMDB (sci-fi movies)
- NASA (space/astronomy)
Create a .env file:
TMDB_API_KEY=your_tmdb_api_key
NASA_API_KEY=your_nasa_api_keyOr pass via Docker:
docker run -it -e TMDB_API_KEY=your_key -e NASA_API_KEY=your_key ragAPI keys:
# Lint and format
black . && isort . && flake8 && mypy .
# Run tests
pytest
# Local CI / lint scripts
./scripts/run_ci.sh
./scripts/fix_lint.sh
# Build package
python setup.py sdist bdist_wheelOptional setup:
./scripts/setup_dev.shsrc/rag/
├── __main__.py → CLI entry
├── config.py → Configuration and API keys
├── data_fetcher.py → Data collection
├── rag_engine.py → Core logic
├── tools.py → Utilities (calc, wiki, etc.)
└── ui/tui.py → Text-based UI
- Fork and branch off
main - Implement changes
- Run tests and linters
- Submit a pull request
Refer to:
cp scripts/commit-msg .git/hooks/
chmod +x .git/hooks/commit-msgCommit format:
feat: add feature
fix: resolve issue
docs: update readme
- Dependabot: Keeps dependencies updated
- GitHub Actions: Handles testing and releases
- Release Webpage: release-webpage/index.html
- Licensed under Apache 2.0 — see LICENSE
- For vulnerabilities, see Security Policy
For help or questions, please open an issue on GitHub.