How kulikovka/graph-rag-news-analytics-system works
GraphRAG News Analytics collects Telegram news, converts it into searchable graph and vector knowledge, and serves fact checks, relationship analysis, and digests through a Telegram bot. Airflow runs scheduled updates and new-channel processing; PostgreSQL tracks news and channel state. The README also documents web-search fallback and observability integrations. Some retrieval, infrastructure, and bot wiring is only partly sampled, so those links rely on documented capabilities where indicated; unsampled implementation details are not inferred.
Main entry points: query_service.py Hybrid search and analysis · extraction_service.py Entity and relation extraction · bot_service.py Telegram bot · daily_update_dag.py Daily channel update
Components 23
News ingestion
- PostgreSQL
- Daily channel update
dags/daily_update_dag.py - New-channel processing
dags/process_channel_dag.py - Telegram scraper
src/scraper/tg_api_scraper.py - News and channel records
src/common/models.py
Knowledge processing
- Entity and relation extraction
src/processor/extraction_service.py - Text normalization
src/processor/text_utils.py - Neo4j graph
- Qdrant vectors
Search and analysis
- Hybrid search and analysis
src/processor/query_service.py - LLM model settings
src/config/config_models.py - Retrieval settings
src/config/config_retrieval.py
Bot interface
- Telegram bot
src/bot/bot_service.py - Bot menus
src/bot/keyboards.py
Monitoring
- LLM metrics
src/common/telemetry.py - Prometheus
prometheus.yml - Grafana dashboards
grafana/dashboards/llm_analytics.json
Other components
- Telegram user
- Airflow
- Telegram API
- Gemini / Gemma
- Tavily search
- MLflow
Connections 31
- Telegram user → Telegram bot: asks questions
README.md - Telegram bot → Hybrid search and analysis: routes queries
src/bot/bot_service.py - Telegram bot → Bot menus: renders menus
src/bot/bot_service.py - Telegram bot → Telegram API: sends responses
README.md - Airflow → Daily channel update: runs daily
dags/daily_update_dag.py - Airflow → New-channel processing: runs on demand
dags/process_channel_dag.py - Daily channel update → Telegram scraper: scrapes channels
dags/daily_update_dag.py - New-channel processing → Telegram scraper: scrapes channel
dags/process_channel_dag.py - Telegram scraper → Telegram API: fetches messages
src/scraper/tg_api_scraper.py - Telegram scraper → PostgreSQL: stores news
src/scraper/tg_api_scraper.py - Daily channel update → Entity and relation extraction: processes new news
dags/daily_update_dag.py - New-channel processing → Entity and relation extraction: processes news
dags/process_channel_dag.py - Daily channel update → PostgreSQL: updates channel state
dags/daily_update_dag.py - New-channel processing → PostgreSQL: updates channel state
dags/process_channel_dag.py - Entity and relation extraction → Gemini / Gemma: extracts knowledge
README.md - Entity and relation extraction → Neo4j graph: writes graph
src/processor/extraction_service.py - Entity and relation extraction → Qdrant vectors: indexes chunks
src/processor/extraction_service.py - Entity and relation extraction → PostgreSQL: tracks processing
src/processor/extraction_service.py - Entity and relation extraction → Text normalization: normalizes entities
src/processor/extraction_service.py - Hybrid search and analysis → Qdrant vectors: retrieves chunks
src/processor/query_service.py - Hybrid search and analysis → Neo4j graph: searches graph
src/processor/query_service.py - Hybrid search and analysis → Gemini / Gemma: synthesizes answers
README.md - Hybrid search and analysis → Tavily search: web fallback
README.md - Hybrid search and analysis → LLM model settings: uses model settings
src/processor/query_service.py - Hybrid search and analysis → Retrieval settings: uses retrieval limits
src/processor/query_service.py - Telegram bot → PostgreSQL: manages channels
src/bot/bot_service.py - Hybrid search and analysis → LLM metrics: records requests
src/processor/query_service.py - Entity and relation extraction → LLM metrics: records usage
src/processor/extraction_service.py - LLM metrics → Prometheus: exposes metrics
README.md - Prometheus → Grafana dashboards: feeds dashboards
README.md - Hybrid search and analysis → MLflow: logs analysis
README.md