quivr/backend/core
Jacopo Chevallard ef90e8e672
feat: introducing configurable retrieval workflows (#3227)
# Description

Major PR which, among other things, introduces the possibility of easily
customizing the retrieval workflows. Workflows are based on LangGraph,
and can be customized using a [yaml configuration
file](core/tests/test_llm_endpoint.py), and adding the implementation of
the nodes logic into
[quivr_rag_langgraph.py](1a0c98437a/backend/core/quivr_core/quivr_rag_langgraph.py)

This is a first, simple implementation that will significantly evolve in
the coming weeks to enable more complex workflows (for instance, with
conditional nodes). We also plan to adopt a similar approach for the
ingestion part, i.e. to enable user to easily customize the ingestion
pipeline.

Closes CORE-195, CORE-203, CORE-204

## Checklist before requesting a review

Please delete options that are not relevant.

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my code
- [X] I have commented hard-to-understand areas
- [X] I have ideally added tests that prove my fix is effective or that
my feature works
- [X] New and existing unit tests pass locally with my changes
- [X] Any dependent changes have been merged

## Screenshots (if appropriate):
2024-09-23 09:11:06 -07:00
..
examples feat: introducing configurable retrieval workflows (#3227) 2024-09-23 09:11:06 -07:00
MegaParse feat: introducing configurable retrieval workflows (#3227) 2024-09-23 09:11:06 -07:00
quivr_core feat: introducing configurable retrieval workflows (#3227) 2024-09-23 09:11:06 -07:00
scripts fix: quivr core fix tests (#2935) 2024-08-01 06:54:43 -07:00
tests feat: introducing configurable retrieval workflows (#3227) 2024-09-23 09:11:06 -07:00
.gitignore feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
.python-version feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
CHANGELOG.md chore(main): release core 0.0.16 (#3218) 2024-09-17 15:18:00 -07:00
Dockerfile.test fix: quivr core fix tests (#2935) 2024-08-01 06:54:43 -07:00
pyproject.toml feat: introducing configurable retrieval workflows (#3227) 2024-09-23 09:11:06 -07:00
README.md feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
tox.ini feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00

quivr-core package

The RAG of Quivr.com

Contributors

Requirements

  1. Install poetry. Recommand the pipx install
  2. (Optional) Install (uv)[https://github.com/astral-sh/uv]
  3. git clone quivr
git clone git@github.com:QuivrHQ/quivr.git
cd quivr/backend/core
  1. Create virtual environement with your preferred tool

    uv venv
    
  2. Install base quivr-core environment

    poetry install -E base --with dev,test
    
  3. Install pre-commit

    pre-commit install
    
  4. Run example

    python examples/simple_question.py
    

Backend

  1. Install poetry. Recommand the pipx install
  2. (Optional) Install (uv)[https://github.com/astral-sh/uv]
  3. Clone quivr
cd quivr/backend/
  1. Create virtual environement with your preferred tool

    uv venv
    
  2. Install quivr-core monorepo

    poetry install
    
  3. Copy .env.example to .env and modify env variables : step 2 : (https://docs.quivr.app/install#60-seconds-installation)

  4. Run backend-api

LOG_LEVEL=debug uvicorn quivr_api.main:app --log-level debug --reload --host 0.0.0.0 --port 5050 --workers 1