Tree


.gitignorecommits | blame
CHANGELOG.mdcommits | blame
LICENSEcommits | blame
README.mdcommits | blame
configuration.pycommits | blame
rag_backend.pycommits | blame
rag_indexer.pycommits | blame
rag_interface.pycommits | blame
requirements.txtcommits | blame
templates/

README.md

# RAGged Scribe

The Ragged Scribe is a RAG AI bot that will use indexed documents to help
you query and contents. 

## Installation

- **Install [Ollama](https://ollama.com)**
  - `ollama pull nomic-embed-text`
  - `ollama pull llama3` (or the model you prefer)
    > modify `OllamaLLM(model="llama3")` accordingly!
- **Start Ollama**
- Put some PDF and/or TXT documents into [static/files](static/files)
> We assume you are working in the `ragged-scribe` directory from here on.
- **Setup python environment**
  - Create a virtual environment
    - `python -m venv venv`
    - `. ./venv/activate`
  - Install dependencies
    - `pip install -r requirements.txt`
  - Index the newly added files:
    >   It may be required to create a `chroma` directory first!
    - `python ./rag_indexer.py --db chroma static/files`
    > The indexer will scan for PDF, text, and markdown documents, parse them

    > and will add it in batches to the chroma db. Then you are ready!
- **Start the bot backend**
  - `python ./rag_interface.py`
    > If you need a different host or port, use `--host <host>` and `--port <number>`
    > or FLASK_HOST/FLASK_PORT environment variables
  - **Query your documents**
    - https://localhost:5000/

----
# LICENSE (MIT)

See [LICENSE](LICENSE) for details.

Roughly based on https://github.com/pixegami/rag-tutorial-v2