Files
AI/.claude/settings.local.json
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

50 lines
3.8 KiB
JSON

{
"permissions": {
"allow": [
"Bash(Get-ChildItem -Force)",
"Bash(Select-Object Name, Mode)",
"Bash(Format-Table)",
"Bash(pip install *)",
"Bash(python -c \"import ont_platform; print\\('✓ 패키지 임포트 성공'\\)\")",
"Bash(python -c \"import ont_platform; print\\('OK'\\)\")",
"Bash(python ../test_phase0_extraction.py https://example.com)",
"Bash(python test_phase0_extraction.py https://example.com)",
"Bash(python test_extraction.py https://example.com)",
"PowerShell(cd \"$env:USERPROFILE\\\\MyProject\\\\AI\\\\.claude\\\\worktrees\\\\infallible-mayer-01d511\"; python test_extraction.py https://example.com)",
"Bash(Start-Sleep -Seconds 3)",
"Bash(curl -X POST \"http://127.0.0.1:8000/api/v1/extract/url?url=https://example.com\" -H \"Content-Type: application/json\")",
"Bash(ConvertFrom-Json)",
"Bash(ConvertTo-Json)",
"Bash(curl -s -X POST \"http://127.0.0.1:8000/api/v1/extract/url?url=https://example.com\" -H \"Content-Type: application/json\")",
"Bash(curl -s -X POST \"http://127.0.0.1:8000/api/v1/extract/url?url=https://example.com\")",
"Bash(curl -v http://127.0.0.1:8000/health)",
"Bash(curl -s http://127.0.0.1:8000/health)",
"Bash(curl -s -X POST \"http://127.0.0.1:8000/api/v1/extract/url?url=https://en.wikipedia.org/wiki/Python_\\(programming_language\\)\" -H \"Content-Type: application/json\")",
"Bash(python -m json.tool)",
"Bash(python)",
"Bash(python -c \"import crawl4ai; print\\(f'Crawl4AI {crawl4ai.__version__} installed'\\)\")",
"Bash(python -c \"import sys, json; data=json.load\\(sys.stdin\\); print\\(f'URL: {data[\\\\\"url\\\\\"]}'\\); print\\(f'Title: {data[\\\\\"title\\\\\"]}'\\); print\\(f'Profile: {data[\\\\\"profile_used\\\\\"]}'\\); print\\(f'Entities: {data[\\\\\"entity_count\\\\\"]}'\\); print\\(f'Time: {data[\\\\\"extraction_time_sec\\\\\"]}s'\\)\")",
"Bash(python -c \"import guardrails; print\\(f'Guardrails {guardrails.__version__} installed'\\)\")",
"Bash(pip search *)",
"Bash(python -c \"import sys, json; data=json.load\\(sys.stdin\\); print\\(f'Validation passed: {data[\\\\\"validation_passed\\\\\"]}'\\); print\\(f'Entities: {data[\\\\\"entity_count\\\\\"]}'\\); print\\(f'Relations: {data[\\\\\"relation_count\\\\\"]}'\\); print\\(f'Warnings: {len\\(data[\\\\\"warnings\\\\\"]\\)}'\\)\")",
"Bash(python -c \"import sentence_transformers, neo4j; print\\(f'sentence-transformers {sentence_transformers.__version__} OK'\\); print\\(f'neo4j {neo4j.__version__} OK'\\)\")",
"Bash(docker-compose -f docker-compose.neo4j.yml up -d)",
"Bash(python test_phase4_integration.py)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(python test_phase5_entity_resolver.py)",
"Bash(cd /d C:\\\\Users\\\\lasta\\\\MyProject\\\\AI\\\\.claude\\\\worktrees\\\\infallible-mayer-01d511)",
"Bash(python test_phase5_subgraph_retriever.py)",
"Bash(python -m pytest tests/test_phase7_llm_integration.py -v --tb=short)",
"Bash(python -m pytest tests/test_phase7_llm_integration.py -v --tb=line)",
"Bash(python -m pytest tests/test_phase8_enterprise.py -v --tb=short)",
"Bash(python -m pytest tests/test_phase8_enterprise.py -v --tb=line)",
"Bash(python -m pytest tests/core/graph/test_entity_resolver.py -v --tb=short)",
"Bash(python -m pytest tests/core/graph/test_entity_resolver.py -v --tb=line)",
"Bash(python -m pytest tests/api/test_phase5_app.py -v --tb=short)",
"Bash(python -m pytest tests/core/graph/test_subgraph_retriever.py -v --tb=short)",
"Bash(python -m pytest tests/core/graph/test_entity_resolver.py tests/core/graph/test_subgraph_retriever.py tests/core/graph/test_rdf_converter.py tests/api/test_phase5_app.py -v --tb=line)"
]
}
}