Skip to content

Repository files navigation

HUDOC Researcher — ECtHR Case-Law Search & RAG

License: PolyForm Noncommercial DOI

Tools for searching and analysing European Court of Human Rights (ECtHR) case-law at the paragraph level — a public dashboard plus a semantic retrieval (RAG) system anchored on the Court's official Case-Law Guides.

Live dashboard: https://lszoszk.github.io/ECHR-Dashboard/

Corpus: 20,010 judgments · 3.30 M segmented rows · cut-off 23 July 2026. That date is a harvest boundary, not today: new judgments arrive by a monthly ingest, HUDOC renders their source documents some weeks after delivery, and the semantic index is rebuilt separately. So the last weeks before the cut-off are thinner than they will become, and anything decided after it is absent.

Developed by Łukasz Szoszkiewicz and Sebastian Marcisz.


Repository layout

Path What it is
docs/ The live GitHub Pages dashboard (HTML/CSS/JS). Auto-deployed from this folder on main (.github/workflows/deploy-pages.yml). Calls the API for live search.
api/ Backend API (FastAPI) powering the dashboard's search — runs in Docker on the VM (echr-api).
rag/ The semantic retrieval system (main research contribution): the search app, the embedding/index pipeline, and the evaluation benchmark. → rag/README.md
scripts/ Corpus extraction, data-pipeline and audit scripts.
deploy/ Deployment helpers (deploy.sh, nginx config, docker-compose.yml).
legacy/ Archived earlier prototype (old Flask dashboard). Reference only.
notes-internal/ Working notes & methodology (sensitive audits are git-ignored).
data/ Local & VM data (corpus DB, raw JSONL…). Git-ignored — rebuilt by the scripts, never committed.

The RAG system in one paragraph

Query → voyage-4-large embedding → FAISS (compressed SQ8) over 1.32 M ECtHR paragraphsrerank-2.5 on the top 100 → authority boost (HUDOC "importance") → results grouped into cases. Evaluated against the Court's 41 official Case-Law Guides. Full method, accuracy and how-to-run in rag/README.md.

Quick start — RAG search app

cd rag/app
pip install -r requirements.txt          # fastapi uvicorn faiss-cpu numpy certifi
echo "YOUR_VOYAGE_KEY" > voyage_key       # https://dashboard.voyageai.com (free tier ok)
# put the prebuilt index under rag/app/data/  (build it via rag/pipeline/ — see rag/README.md)
python rag_api.py                         # → http://127.0.0.1:8000

Data & reproducibility

Large artifacts — the corpus DB, the ~1.3 GB FAISS index, the 5 GB embeddings — are not in git (git-ignored). They are rebuildable from rag/pipeline/ and scripts/. Curated benchmark data is intended for separate release (e.g. HuggingFace). The corpus is a point-in-time snapshot of English ECtHR judgments.

Licensing / attribution

  • Dashboard, API, pipeline, and RAG code: PolyForm Noncommercial 1.0.0; research, education, non-profit, and personal use are permitted. See LICENSE.
  • ECtHR judgments & Case-Law Guides are © Council of Europe / ECtHR, reused under HUDOC terms and are not re-licensed by this project. See NOTICE. This project is not affiliated with or endorsed by the Court.
  • The search tool is a research aid, not legal advice.

Citation

Szoszkiewicz, Ł., & Marcisz, S. (2026). HUDOC Researcher — ECtHR Case-Law Search & RAG (Version 1.0.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.21319703

GitHub exposes machine-readable metadata from CITATION.cff. When citing a legal proposition or judgment paragraph, cite the authoritative HUDOC record and paragraph in addition to the software used to locate it.

About

HUDOC Researcher — paragraph-level structural and semantic search, citation analytics, and source-first reading for ECtHR case law

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages