How bhaskrr/information-retrieval works
This repository is a personal Information Retrieval learning workspace, not a production application. Its architecture is centered on documentation-first learning, with a small amount of executable code used to demonstrate core IR algorithms.
1. Top-level purpose
- The repo is organized as a structured knowledge base for IR concepts, progressing from basics to advanced topics.
- The main “system” is the learning path itself: notes, examples, notebooks, and a progress log.
2. Documentation layer
- notes/ is the primary content layer.
- It is split into curriculum phases: basics, text processing, indexing, ranking models, evaluation, neural IR, and advanced topics.
- Each topic is decomposed into small markdown files, so the architecture is topic-centric rather than application-centric.
3. Conceptual knowledge backbone
- glossary.md acts as a shared terminology reference across the repo.
- progress-log.md tracks learning progress over time and functions as a lightweight project history.
4. Executable examples
- The main code artifact visible in the tree is notes/01-basics/03-retrieval-models/01-boolean-retrieval/boolean-retrieval.py.
- This suggests the repo includes small, topic-scoped implementations directly beside the explanation material, rather than a centralized library.
5. Notebook / experimentation layer
- code/notebooks/ contains Jupyter notebooks for hands-on exploration.
- The notebooks are grouped by IR stage, especially text processing and indexing:
- tokenization
- normalization
- stopword removal
- stemming/lemmatization
- inverted index construction
- This layer is the interactive counterpart to the notes.
6. Data access boundary
- datasets/data_loader.py appears to be a shared utility for loading example data used by notebooks or code snippets.
- The repo does not show a full dataset management pipeline; instead, data access is centralized in a small helper module.
7. Core IR pipeline represented in the repo
- The learning flow is consistent with a classic IR architecture:
- raw text input
- text preprocessing
- index construction
- retrieval model
- ranking/evaluation
- The notebooks and notes together model this pipeline from preprocessing through retrieval.
8. Indexing subsystem
- notes/03-indexing/ and the related notebook on inverted indexes show that indexing is treated as a major subsystem.
- The inverted index is the key structural bridge between text processing and retrieval.
9. Retrieval and ranking subsystem
- notes/01-basics/03-retrieval-models/ covers boolean retrieval as the first implemented model.
- notes/04-ranking-models/ expands the architecture from exact-match retrieval to scored ranking approaches such as TF-IDF and BM25.
10. Evaluation subsystem
- notes/05-evaluation/ is a separate conceptual layer focused on measuring retrieval quality.
- Metrics like precision, recall, MAP, MRR, and NDCG indicate that evaluation is treated as its own stage after retrieval/ranking.
11. Neural and advanced research layers
- notes/06-neural-ir/ and notes/07-advanced/ are mostly conceptual research areas in this repo.
- These sections extend the architecture from classical IR into dense retrieval, reranking, hybrid search, ColBERT, and RAG, but no corresponding implementation tree is visible here.
12. Organizational pattern
- Most topics follow the same structure: markdown notes first, then optional notebook or code examples.
- This makes the repo easy to diagram as a layered knowledge system: concepts at the top, experiments in the middle, and small implementation artifacts at the bottom.
13. Important architectural boundary
- There is no evidence of a web server, API service, database, or production deployment.
- The repo boundary is educational and research-oriented: documentation and experimentation, not runtime infrastructure.
14. Best diagram framing
- Model this repository as three interacting zones:
- Knowledge/content: notes/, glossary.md, progress-log.md
- Interactive experiments: code/notebooks/
- Reusable helpers / sample implementations: datasets/data_loader.py, boolean-retrieval.py
- The main data flow is from conceptual notes into notebooks and small code examples, with datasets feeding the experiments.
Main entry points: 01-basics Basics · glossary.md Glossary · 04-ranking-models Ranking models · notebooks Notebooks
Components 16
Knowledge / content
Markdown-first curriculum, shared terminology, and learning history.
- README · Top-level entry point for the learning workspace.
README.md - Glossary · Shared IR vocabulary across the repo.
glossary.md - Progress log · Lightweight history of learning progress.
progress-log.md - Basics · Foundations: what IR is, taxonomy, and first retrieval models.
notes/01-basics - Text processing · Tokenization, normalization, stopwords, stemming, and lemmatization.
notes/02-text-processing - Indexing · Inverted index, construction, and compression.
notes/03-indexing - Ranking models · Boolean, vector-space, TF-IDF, and BM25 ranking.
notes/04-ranking-models - Evaluation · Retrieval metrics and test collections.
notes/05-evaluation - Neural IR · Dense retrieval, bi-encoders, cross-encoders, and SPLADE.
notes/06-neural-ir - Advanced · Reranking, hybrid search, ColBERT, and RAG.
notes/07-advanced
Interactive experiments
Jupyter notebooks used to explore IR stages hands-on.
- Notebooks · Hands-on exploration of core IR stages.
code/notebooks - Text notebooks · Notebook exercises for tokenization and normalization steps.
code/notebooks/02-text-processing - Index notebook · Interactive inverted-index construction exercise.
code/notebooks/03-indexing
Reusable helpers / examples
Small code artifacts and data-loading support used by the experiments.
- Data loader · Shared dataset access used by notebooks and examples.
datasets/data_loader.py - Boolean retrieval · Topic-scoped retrieval implementation beside the notes.
notes/01-basics/03-retrieval-models/01-boolean-retrieval/boolean-retrieval.py - Boolean notes · Guidance for the boolean retrieval example.
notes/01-basics/03-retrieval-models/01-boolean-retrieval/README.md
Connections 22
- README → Basics: starts · Introduces the learning path.
- README → Glossary: references · Shared terminology anchor.
- README → Progress log: tracks · Records learning progress.
- Basics → Text processing: leads to · Foundation moves into preprocessing.
- Text processing → Indexing: enables · Preprocessing feeds indexing.
- Indexing → Ranking models: supports · Index structure underpins retrieval models.
- Ranking models → Evaluation: measured by · Ranking quality is evaluated with metrics.
- Ranking models → Neural IR: extends to · Classical retrieval expands into neural methods.
- Neural IR → Advanced: extends to · Advanced research topics build on neural IR.
- Basics → Boolean notes: documents · Example-focused explanation for boolean retrieval.
- Boolean notes → Boolean retrieval: describes · The executable example lives beside the notes.
- Text processing → Notebooks: explores · Notebook experiments mirror the preprocessing curriculum.
- Indexing → Notebooks: explores · Notebook experiments mirror indexing concepts.
- Notebooks → Text notebooks: contains · Text-processing notebook set.
- Notebooks → Index notebook: contains · Indexing notebook set.
- Text notebooks → Data loader: loads · Notebooks use shared example data.
- Index notebook → Data loader: loads · Notebooks use shared example data.
- Boolean retrieval → Data loader: can use · Example code may share the same loader boundary.
- Glossary → Basics: supports · Terminology anchors the curriculum.
- Glossary → Ranking models: supports · Terminology anchors the curriculum.
- Glossary → Evaluation: supports · Terminology anchors the curriculum.
- Progress log → Basics: reflects · Learning history follows the curriculum.