Skip to content

Add Real-World Project: Build a Re-Ranking Pipeline #280

Description

@abderrahim-lectures

Scope

  • Lesson: docs/projects/reranking-pipeline/index.md (no-LLM skeleton per the codebase-knowledge-graph template) + _category_.json (label RerankingPipeline, position 24)
  • Example: examples/reranking-pipeline/ with a single CLI main.py, pyproject.toml, uv.lock, .gitignore, .python-version, README.md, and a notebook.ipynb (14 cells, corpus embedded inline, pandas benchmark table)
  • Bundled data: data/corpus/*.txt (25 short passages with deliberate same-word-different-meaning traps) + data/test_queries.json (12 labeled test queries)
  • Registration: first entry in src/data/projects.ts, docs/projects/index.mdx, and the homepage card in src/pages/index.tsx
  • Badges (Colab/Kaggle/Binder) pointing at the main notebook path + ready-made notebook paragraph, per house style

Framing note

A two-stage retrieval demo with an honest benchmark: a milliseconds-fast pure-Python keyword stage retrieves a top-5 shortlist, then a sentence-transformers cross-encoder (cross-encoder/ms-marco-MiniLM-L-6-v2, ~80MB one-time download) re-ranks it. Measures whether re-ranking actually improves precision@1/@3 and prints the timing cost (~2 orders of magnitude). No API key, no .env, no LLM. Lesson makes the compute/quality tradeoff and the 're-ranking can only fix ordering, not retrieval misses' limitation explicit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:capstoneCapstone project content, examples, or architectureprojectBacklog: a candidate Real-World Project ideatopic:ragRAG, vector search & knowledge graph projectstype:content

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions