Spaces:
Runtime error
Runtime error
Commit History
-
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 -
refactor(pipeline): metadata-driven coverage, per-topic scroll, pure gap fnβ
sourabh gupta- gap.py: pure compute_gaps(signals, coverage_counts) β no embedder/repo - models.py: Chunk.topics field (preserves tag_topics.py payload) - vector_qdrant.py: scroll_by_topic(topic) with payload index filter - ports.py: drop count_above_threshold - constants.py: anchor weather β calculator - build_graph.py: TOPICS/SAMPLE env vars, per-topic scroll, full pipeline - gap_report.py: metadata coverage, no similarity search - tests: updated to pure compute_gaps signature3c2c4aa -
feat(kg): COVERED_BY edges, wipe script, scroll_all, docs_for_topicβ
sourabh gupta- graph_neo4j: add wipe(), link_coverage(), docs_for_topic() - vector_qdrant: add scroll_all() via Qdrant scroll API - build_graph: wire scroll + link_coverage after gap build, print sample - wipe_graph: new standalone script for destructive resetcf1f646
-
feat(kb): Solid Gartner KB β cross-industry Wikidata seed, Wikidata-native relationships, 7-day signal cacheβ
sourabh gupta1. Rewrite data/seed_topics_wikidata.py β cross-industry SPARQL (disciplines/tech/industry/vendors) with sitelinks quality gate; fetch P279 BROADER_THAN + P452 OPERATES_IN in second POST query 2. Refactor graph_neo4j.py β remove spaCy NER entirely, add seed_from_file(), scope DETACH DELETE to Topics only, update queries to use OPERATES_IN 3. Update scripts/build_graph.py β new build() signature, wire seed_from_file() after every build 4. Add scripts/update_topics_csv.py β rebuild topics.csv from Wikidata seed labels (vendor cat excluded) 5. Rebuild packages/vantage_core/seeds/topics.csv β 448 cross-industry Wikidata topic keywords replacing 66 noisy manual terms 6. Change SIGNAL_TTL_HOURS 6 β 168 in constants.py β 7-day stable cache for case study runs Result: 449 topics + 252 entities + 236 BROADER_THAN + 34 OPERATES_IN in Neo4j; 438 signals fetcheda82d0a6 -
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(graph): implement lean Neo4j Knowledge Graph build with spaCy NERβ
sourabh gupta- packages/vantage_core/adapters/__init__.py: Export Neo4jGraphRepo - packages/vantage_core/adapters/graph_neo4j.py: Create lean GraphRepo storing Topics, Entities, and RELATED_TO edges - scripts/build_graph.py: Add CLI to build the Neo4j graph end-to-endcc01889