Commit Graph

8 Commits

Author SHA1 Message Date
lasta
bdbc074adc Add Phase 5 + Phase 7 integration tests
- test_duplicate_entities_merged_before_rag: Validates entity deduplication
- test_semantic_query_finds_relevant_context: Validates semantic context retrieval
- test_end_to_end_entity_resolution_pipeline: Full pipeline test
- All 8 integration tests passing

Total Phase 5 test coverage: 74 tests 
2026-05-14 13:26:53 +09:00
lasta
4bef188a19 Phase 5.1: 의미 기반 부분그래프 검색 + API 엔드포인트 완성
구현 사항:
1. SubgraphRetriever.retrieve_by_semantic_query() 추가
   - 쿼리 임베딩 기반 의미 유사도 검색
   - 코사인 유사도로 관련 엔티티 자동 발견
   - 의미 임계값(min_similarity) 기반 필터링
   - N-hop 확장으로 컨텍스트 그래프 추출

2. Phase 5 GraphRAG API 엔드포인트 완성 (phase5_app.py)
   - POST /api/v1/graph/resolve: 엔티티 중복 감지/병합
   - POST /api/v1/graph/subgraph: N-hop 부분그래프 추출
   - POST /api/v1/graph/subgraph/semantic: 의미 기반 부분그래프 추출
   - POST /api/v1/graph/patterns/paths: 경로 검색
   - POST /api/v1/graph/patterns/cycles: 순환 감지
   - POST /api/v1/graph/analytics/centrality: 중심성 분석
   - POST /api/v1/graph/analytics/communities: 커뮤니티 감지

3. 종합 테스트 스위트 작성
   - test_entity_resolver.py: 24개 테스트 
   - test_subgraph_retriever.py: 15개 테스트 
   - test_phase5_app.py: 25개 테스트 
   - test_rdf_converter.py: 2개 테스트 
   - 총 66개 테스트, 모두 통과

성능 목표:
- 벡터 임베딩: 10K 엔티티 5초 내
- 의미 검색: 상위 K개 매칭 < 200ms
- 부분그래프 추출: 2-hop 쿼리 < 200ms

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-14 13:25:06 +09:00
lasta
987afeb07c Phase 5.0: Entity Resolver 테스트 및 datetime 경고 수정
- Entity Resolver (벡터 + Jaro-Winkler 유사도) 테스트 구현 완료
- 24개 유닛 테스트 모두 통과
- TestEntityNormalization: 라벨 정규화 테스트 (4개)
- TestJaroWinklerSimilarity: 텍스트 유사도 테스트 (4개)
- TestTextSimilarity: 텍스트 유사도 계산 테스트 (4개)
- TestEntityResolverInit: 초기화 테스트 (3개)
- TestDuplicateDetection: 중복 감지 테스트 (4개, 비동기)
- TestClusterResolution: 클러스터 병합 테스트 (2개, 비동기)
- TestResolutionReport: 리포트 생성 테스트 (3개)
- entity_resolver.py datetime.utcnow() → datetime.now(UTC) 변환
- textdistance>=4.6.0 의존성 추가

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-14 13:18:37 +09:00
lasta
47a710a8b9 Fix datetime deprecation warnings in Phase 8 modules
- Update all datetime.utcnow() to datetime.now(UTC) for Python 3.12+ compatibility
- Update all datetime.utcfromtimestamp() to datetime.fromtimestamp(..., UTC)
- Fix dataclass default_factory to use lambda: datetime.now(UTC)
- Update auth, audit, billing, and realtime modules
- Add UTC import from datetime module
- Update pytest configuration to include pytest-asyncio
- All 28 Phase 8 enterprise tests pass with no warnings

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-14 11:50:23 +09:00
LASTA_DEV01\lasta
9e88f4c7ad ontology 2026-05-13 19:57:34 +09:00
LASTA_DEV01\lasta
2e9204243d 참고소스 수정본 2026-05-12 19:40:31 +09:00
LASTA_DEV01\lasta
3663734781 [버그수정] 2026-05-11 13:02:11 +09:00
LASTA_DEV01\lasta
4158789869 [crawler] 2026-05-08 17:41:15 +09:00