Commit graph

7 commits

Author SHA1 Message Date
michael
5e41ae4326 Fix background GraphRAG init blocking Hypercorn event loop
Replace asyncio.ensure_future() with a daemon thread for GraphRAG
initialization. The Neo4j driver and NetworkX calls are synchronous
and were starving Hypercorn of CPU time on the shared event loop.
A separate thread with its own event loop isolates the blocking work
so the server accepts connections immediately after Phase 1 completes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-23 17:56:26 -06:00
michael
5554aa043f Add GraphRAG startup optimization: triple caching and background init
- Cache extracted triples to disk (neo4j_triples.pickle) so Neo4j can be
  repopulated without expensive LLM re-extraction on cold starts
- Split initialization into two phases: fast vector-only (~1-2 min) and
  background GraphRAG, so the server serves requests while GraphRAG loads
- Add GraphRAG status flags to shared_state for monitoring readiness
- Update /status endpoint to expose graphrag_ready/initializing/error
- Restructure main.py to use single event loop for background task support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-23 17:45:05 -06:00
michael
86fb3e047d Add APOC plugin to Neo4j Docker config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:58:37 -06:00
michael
797924bcb9 Add Docker Compose config for Neo4j with auto-restart
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:56:14 -06:00
michael
11494060e8 Fix OpenAI model names to valid gpt-4.1 and gpt-4.1-mini
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:01:11 -06:00
michael
bfe37f5be8 Update OpenAI model references to gpt-5.2 and gpt-5-mini
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 08:42:55 -06:00
michael
594f749d4c Initial commit: HP Marketing Materials GraphRAG Chatbot
Full-stack GraphRAG chatbot for HP marketing materials with:
- Python/Flask backend with custom ReAct agent (LlamaIndex)
- Neo4j knowledge graph + vector search hybrid retrieval
- LlamaParse multimodal document processing (text + images)
- React/Vite frontend with conversation management
- MongoDB conversation persistence
- MSAL authentication support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 08:37:58 -06:00