How antmedellin/researchrag works
Local ResearcherRAG ingests Digital Measures faculty data by department, builds and reconciles research records, then serves scoped portfolio search, evidence, structured answers, and faculty/team matching. Neo4j is the graph source of truth; Qdrant supports hybrid dense/BM25 retrieval. The README also documents OpenAlex enrichment. Edges reflect excerpts, SOURCE INDEX references, or README statements; unsampled implementation details and some integrations are not asserted.
Main entry points: run_department.py Department sync · app.py Research API · build_ledger.py Ledger builder · search.py Hybrid retrieval
Components 26
Department ingestion
- Department config
config/departments - Department sync
src/research_portfolio/run_department.py - Faculty discovery
src/research_portfolio/ledger/discover_faculty.py - Profile fetching
src/research_portfolio/ledger/fetch_profiles.py - Ledger builder
src/research_portfolio/ledger/build_ledger.py - Profile parser
src/research_portfolio/ledger/dm_parse.py - Record merging
src/research_portfolio/ledger/merge.py - Shared data helpers
src/research_portfolio/common.py
Identity and enrichment
- Entity dedup
src/research_portfolio/resolve/dedup.py - Person identity
src/research_portfolio/resolve/person_identity.py - OpenAlex enrichment
src/research_portfolio/enrichment/openalex.py - Enrichment apply
src/research_portfolio/enrichment/apply_enrichment.py
Research stores
- Neo4j graph
src/research_portfolio/graph/store.py - Qdrant indexing
src/research_portfolio/index/qdrant_store.py
Search and matching
- Hybrid retrieval
src/research_portfolio/retrieval/search.py - Structured records
src/research_portfolio/retrieval/structured.py - Faculty matching
src/research_portfolio/matching/faculty_match.py - Person matching
src/research_portfolio/person_match.py
API and models
- Research API
src/research_portfolio/web/app.py - Answer and evidence
src/research_portfolio/answer_guard.py - LLM transport
src/research_portfolio/llm_client.py - Model endpoints
src/research_portfolio/llm_endpoints.py
Other components
- Department operator
- Digital Measures
- Qdrant
- LLM gateway
Connections 32
- Department operator → Department sync: runs department
src/research_portfolio/run_department.py - Department sync → Department config: loads config
src/research_portfolio/run_department.py - Department sync → Faculty discovery: discovers faculty
src/research_portfolio/run_department.py - Faculty discovery → Digital Measures: fetches roster
- Department sync → Profile fetching: fetches profiles
src/research_portfolio/run_department.py - Profile fetching → Digital Measures: fetches profiles
- Department sync → Ledger builder: builds ledger
src/research_portfolio/run_department.py - Ledger builder → Profile parser: parses records
src/research_portfolio/ledger/build_ledger.py - Ledger builder → Record merging: merges records
src/research_portfolio/ledger/build_ledger.py - Profile parser → Person identity: checks identity
src/research_portfolio/ledger/dm_parse.py - Department sync → Entity dedup: resolves entities
src/research_portfolio/run_department.py - Entity dedup → Record merging: merges matches
src/research_portfolio/resolve/dedup.py - Department sync → Neo4j graph: syncs graph
src/research_portfolio/run_department.py - Department sync → Qdrant indexing: indexes records
src/research_portfolio/run_department.py - Qdrant indexing → Neo4j graph: reads graph
src/research_portfolio/index/qdrant_store.py - Qdrant indexing → Qdrant: writes vectors
src/research_portfolio/index/qdrant_store.py - Department operator → Research API: queries portfolio
- Research API → Hybrid retrieval: searches evidence
src/research_portfolio/web/app.py - Research API → Structured records: queries records
- Research API → Faculty matching: matches faculty
src/research_portfolio/web/app.py - Research API → Person matching: resolves people
src/research_portfolio/web/app.py - Research API → Answer and evidence: guards answers
src/research_portfolio/web/app.py - Hybrid retrieval → Qdrant: queries candidates
src/research_portfolio/retrieval/search.py - Hybrid retrieval → Neo4j graph: looks up people
- Faculty matching → Hybrid retrieval: reranks evidence
src/research_portfolio/matching/faculty_match.py - Faculty matching → Neo4j graph: reads collaborations
- Answer and evidence → LLM transport: requests answer
src/research_portfolio/answer_guard.py - LLM transport → Model endpoints: uses endpoints
src/research_portfolio/llm_client.py - Model endpoints → LLM gateway: configures routes
src/research_portfolio/llm_endpoints.py - Department sync → OpenAlex enrichment: enriches research
- OpenAlex enrichment → Enrichment apply: applies metadata
- Ledger builder → Shared data helpers: uses shared helpers
src/research_portfolio/ledger/build_ledger.py