Skip to content

A one-shot LLM-based (Embeddings, RAG) NACE classification module, with possibilities of leveraging the hierarchical structure of the nomenclature.

License

Notifications You must be signed in to change notification settings

InseeFrLab/codif-ape-graph-rag

Repository files navigation

codif-ape-graph-rag

Local run 🏛️

You need to install to first install uv, using for instance pip install uv if applicable.

Please reach out to us to get our Neo4J graph database's password. Then run the following commands to locally launch the API:

. setup.sh
export NEO4J_API_KEY=[NEO4J PASSWORD]
cd src
uv run uvicorn api.main:app --host 0.0.0.0 --port 5000

To locally launch the web application, run the following command, on another terminal:

cd src
uv run streamlit run main.py

Deployment 🚀

The web application is available here, and the API swagger there.

We used:

  • supervisord for double deployment of the API and the web application, on two different custom ports 🖇️
  • Docker for conteneurization 🐳 (find the image repo here)
  • GitHub Actions for continous integration ♾️
  • and ArgoCD for continous deployment 🚀

We used our datalab powered by Onyxia and a Kubernetes cluster to deploy the application.

Evaluation

In order to run evaluation of different methods you can execute the following commands:

export MLFLOW_TRACKING_URI=https://projet-ape-mlflow.user.lab.sspcloud.fr
uv run evaluate.py --num_samples 1000 --entry_point all

About

A one-shot LLM-based (Embeddings, RAG) NACE classification module, with possibilities of leveraging the hierarchical structure of the nomenclature.

Resources

License

Stars

Watchers

Forks

Packages

No packages published