Spaces:
Runtime error
Runtime error
Commit History
-
feat: update API routers, dashboard, graph panel, and gap table UI
sourabh gupta477675d -
add: Docker deployment for HF Spaces demo
sourabh guptaSingle-container image (FastAPI + React static files, baked ML models). Serves API and frontend on port 7860. Secrets injected at runtime.3da409a
-
Add Langfuse observability via LangChain CallbackHandler
sourabh guptaWire LangfuseHandler into every agent.stream() call so all LLM calls, tool invocations, latency, and token usage are traced automatically. Add rag.retrieve and rag.generate sub-spans in the RAG pipeline using the v3 start_as_current_observation() context manager. Session grouping via langfuse_session_id in config metadata. Bump langfuse dep to >=3.0 and align env var name to LANGFUSE_BASE_URL.b7884a3 -
feat(pipeline): RAG quality gate, live coverage, streaming API, recursion limit
sourabh guptaRAG quality gate (rag.py + constants.py): - COVERAGE_RELEVANCE_FLOOR = -5.0: reranker scores are absolute/cross-query-comparable so a floor correctly gates garbage retrieval (APAC → top score -6.85 → no coverage) - LLM sentinel detection: if LLM emits the no-coverage string, drop sources rather than returning contradictory "No coverage found... Sources: NFL Fumbles" Live coverage (coverage.py): - count_coverage(): hybrid retrieve + rerank → count chunks above the relevance floor Reuses the RAG pipeline so coverage = "what RAG would consider relevant" API streaming (chat.py): - agent.invoke → agent.stream(stream_mode='updates') via shared trace.log_step - ChatResponse gains sources: list[str] collected structurally from rag_search results - recursion_limit 10 → 50 Scripts: - demo_queries.py: recursion_limit 10 → 50 - build_graph.py, ingest.py: minor pipeline improvements - build_gartner_seeds.py, tag_topics.py: topic seeding tooling Docs: MVP_IMPLEMENTATION_PLAN.md addedc24f0b6 -
fix(agent): rank gaps by score, fuzzy topic filter, stream in web API
sourabh guptaThree issues surfaced from query logs against live data: 1. gap_analysis returned 0 rows. top_gaps gated on quadrant='priority_gap', but no topic qualifies (all 316 are 'watch', 3 'well_covered' — none reach the demand>=0.5 threshold for a priority label). Dropped the quadrant gate: now MATCH all topics with a gap_score, ORDER BY gap_score DESC. The score already encodes demand×(1−coverage); label is descriptive, not a filter. Fixes both gap_analysis and the /api/gaps endpoint. 2. trending_topics(filter='AI healthcare') returned 'drainage', 'mountains', 'airports' — because 'ai' substring-matched them. Replaced CONTAINS-word filtering with a Neo4j full-text index + fuzzy Lucene query (tokenised, so 'ai' no longer matches 'drainage'; fuzzy ~ tolerates typos: 'imigration' → immigration). New _fulltext_query() + ensure_fulltext_index() (asserted on every build()). Note: the vocabulary has no AI/healthcare/tariff topics, so those filters correctly return …bb5095f
-
feat(agent): implement comprehensive logging and fix recursion loop
sourabh gupta- Create 'vantage_core/log.py' logging utility with timed/timeit helpers. - Instrument adapters, domain layer, agent tools, scripts, and API. - Fix topic-blindness in gap_analysis tool and top_gaps Neo4j query. - Enforce recursion_limit=10 on LangGraph agent invocations. - Add behavioral STOP CONDITION to agent system prompt.1743c95 -
feat(api): implement FastAPI read-side layer with 4 endpoints and OpenAPI contract
sourabh gupta- apps/api/main.py: FastAPI app with lifespan agent singleton and CORS middleware - apps/api/routers/chat.py: POST /api/chat — async agent invocation with thread_id sessions - apps/api/routers/gaps.py: GET /api/gaps — ranked GapScore results from Neo4j - apps/api/routers/graph.py: GET /api/graph/{topic} — entity lookup from KG - apps/api/routers/signals.py: GET /api/signals — sorted external momentum signals - scripts/export_openapi.py: static offline OpenAPI YAML export (no server required) - contracts/openapi.yaml: generated API contract (SSOT for P10 TS client) - start.sh / stop.sh: local uvicorn lifecycle scripts - Makefile: add api, stop-api, openapi targets; fix python3.11 executable6930676
-
feat(phase-1): bootstrap project scaffold and connectivity layer
sourabh gupta1. Add vantage_core package (config, constants, pyproject.toml, domain + adapters stubs) 2. Add root environment.yaml for conda Python 3.11 environment 3. Add .env.example with all nine required environment variable keys 4. Add Makefile with install, healthcheck, seed, eval, and clean targets 5. Add scripts/healthcheck.py — four-service connectivity gate (Qdrant, Neo4j, OpenAI, Langfuse) 6. Add folder skeleton for apps/, contracts/, and eval/ with .gitkeep72fa63d