iris-vector-rag 0.5.3__tar.gz → 0.5.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/PKG-INFO +18 -3
  2. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/README.md +2 -0
  3. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/__init__.py +1 -1
  4. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/iris_dbapi_connector.py +3 -3
  5. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/config/default_config.yaml +112 -1
  6. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/dspy_modules/batch_entity_extraction.py +26 -3
  7. iris_vector_rag-0.5.8/iris_vector_rag/exceptions.py +188 -0
  8. iris_vector_rag-0.5.8/iris_vector_rag/monitoring/__init__.py +58 -0
  9. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/graphrag.py +2 -2
  10. iris_vector_rag-0.5.8/iris_vector_rag/security/__init__.py +34 -0
  11. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/services/batch_entity_processor.py +18 -0
  12. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/services/entity_extraction.py +57 -4
  13. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/services/storage.py +106 -0
  14. iris_vector_rag-0.5.8/iris_vector_rag/storage/constants.py +70 -0
  15. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag.egg-info/PKG-INFO +18 -3
  16. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag.egg-info/SOURCES.txt +4 -0
  17. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag.egg-info/requires.txt +17 -2
  18. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/pyproject.toml +19 -4
  19. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/LICENSE +0 -0
  20. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/__init__.py +0 -0
  21. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/cleanup_job.py +0 -0
  22. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/cli.py +0 -0
  23. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/main.py +0 -0
  24. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/mcp_routes.py +0 -0
  25. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/middleware/__init__.py +0 -0
  26. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/middleware/auth.py +0 -0
  27. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/middleware/logging.py +0 -0
  28. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/middleware/rate_limit.py +0 -0
  29. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/__init__.py +0 -0
  30. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/auth.py +0 -0
  31. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/errors.py +0 -0
  32. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/health.py +0 -0
  33. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/pipeline.py +0 -0
  34. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/quota.py +0 -0
  35. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/request.py +0 -0
  36. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/response.py +0 -0
  37. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/upload.py +0 -0
  38. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/models/websocket.py +0 -0
  39. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/routes/__init__.py +0 -0
  40. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/routes/document.py +0 -0
  41. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/routes/health.py +0 -0
  42. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/routes/pipeline.py +0 -0
  43. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/routes/query.py +0 -0
  44. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/services/__init__.py +0 -0
  45. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/services/auth_service.py +0 -0
  46. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/services/document_service.py +0 -0
  47. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/services/pipeline_manager.py +0 -0
  48. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/websocket/__init__.py +0 -0
  49. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/websocket/connection.py +0 -0
  50. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/websocket/handlers.py +0 -0
  51. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/api/websocket/routes.py +0 -0
  52. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/__init__.py +0 -0
  53. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/batch_utils.py +0 -0
  54. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/config.py +0 -0
  55. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/connection_manager.py +0 -0
  56. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/connection_pool.py +0 -0
  57. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/database.py +0 -0
  58. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/database_schema_manager.py +0 -0
  59. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/db_init_with_indexes.py +0 -0
  60. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/db_vector_utils.py +0 -0
  61. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/environment_manager.py +0 -0
  62. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/huggingface_utils.py +0 -0
  63. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/iris_client.py +0 -0
  64. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/iris_connection_manager.py +0 -0
  65. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/iris_connection_pool.py +0 -0
  66. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/iris_connector.py +0 -0
  67. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/iris_index_utils.py +0 -0
  68. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/iris_sql_utils.py +0 -0
  69. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/iris_stream_reader.py +0 -0
  70. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/llm_cache_config.py +0 -0
  71. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/llm_cache_iris.py +0 -0
  72. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/llm_cache_manager.py +0 -0
  73. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/utils.py +0 -0
  74. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/common/vector_sql_utils.py +0 -0
  75. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/config/__init__.py +0 -0
  76. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/config/backend_modes.py +0 -0
  77. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/config/embedding_config.py +0 -0
  78. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/config/entities.py +0 -0
  79. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/config/manager.py +0 -0
  80. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/config/pipeline_config_service.py +0 -0
  81. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/config/validators.py +0 -0
  82. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/__init__.py +0 -0
  83. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/base.py +0 -0
  84. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/connection.py +0 -0
  85. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/exceptions.py +0 -0
  86. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/models.py +0 -0
  87. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/response_standardizer.py +0 -0
  88. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/validators.py +0 -0
  89. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/vector_store.py +0 -0
  90. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/core/vector_store_exceptions.py +0 -0
  91. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/dspy_modules/__init__.py +0 -0
  92. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/dspy_modules/entity_extraction_module.py +0 -0
  93. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/embeddings/__init__.py +0 -0
  94. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/embeddings/entity_extractor.py +0 -0
  95. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/embeddings/iris_embedding.py +0 -0
  96. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/embeddings/manager.py +0 -0
  97. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/mcp/__init__.py +0 -0
  98. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/mcp/__main__.py +0 -0
  99. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/mcp/bridge.py +0 -0
  100. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/mcp/cli.py +0 -0
  101. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/mcp/config.py +0 -0
  102. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/mcp/technique_handlers.py +0 -0
  103. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/mcp/tool_schemas.py +0 -0
  104. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/mcp/validation.py +0 -0
  105. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/memory/__init__.py +0 -0
  106. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/memory/knowledge_extractor.py +0 -0
  107. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/memory/models.py +0 -0
  108. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/memory/rag_integration.py +0 -0
  109. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/memory/temporal_manager.py +0 -0
  110. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/ontology/__init__.py +0 -0
  111. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/ontology/loader.py +0 -0
  112. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/ontology/models.py +0 -0
  113. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/ontology/plugins/__init__.py +0 -0
  114. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/ontology/plugins/general_ontology.py +0 -0
  115. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/ontology/reasoner.py +0 -0
  116. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/optimization/cache_manager.py +0 -0
  117. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/optimization/connection_pool.py +0 -0
  118. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/optimization/database_optimizer.py +0 -0
  119. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/optimization/hnsw_tuner.py +0 -0
  120. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/optimization/parallel_processor.py +0 -0
  121. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/optimization/performance_monitor.py +0 -0
  122. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/__init__.py +0 -0
  123. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/_hybrid_utils.py +0 -0
  124. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/basic.py +0 -0
  125. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/basic_rerank.py +0 -0
  126. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/colbert_pylate/__init__.py +0 -0
  127. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/colbert_pylate/pylate_pipeline.py +0 -0
  128. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/crag.py +0 -0
  129. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/factory.py +0 -0
  130. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/graphrag_merged.py +0 -0
  131. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/hybrid_graphrag.py +0 -0
  132. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/hybrid_graphrag_discovery.py +0 -0
  133. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/hybrid_graphrag_retrieval.py +0 -0
  134. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/iris_global_graphrag.py +0 -0
  135. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/pipelines/multi_query_rrf.py +0 -0
  136. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/plugins/__init__.py +0 -0
  137. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/plugins/interface.py +0 -0
  138. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/services/__init__.py +0 -0
  139. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/storage/__init__.py +0 -0
  140. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/storage/clob_handler.py +0 -0
  141. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/storage/enterprise_storage.py +0 -0
  142. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/storage/hybrid_schema_manager.py +0 -0
  143. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/storage/iris_embedding_ops.py +0 -0
  144. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/storage/schema_manager.py +0 -0
  145. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/storage/vector_store_iris.py +0 -0
  146. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/testing/__init__.py +0 -0
  147. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/testing/backend_manager.py +0 -0
  148. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/testing/connection_pool.py +0 -0
  149. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/testing/exceptions.py +0 -0
  150. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/testing/iris_devtools_bridge.py +0 -0
  151. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/testing/validators.py +0 -0
  152. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/utils/__init__.py +0 -0
  153. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/utils/module_loader.py +0 -0
  154. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/utils/project_root.py +0 -0
  155. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/utils/token_counter.py +0 -0
  156. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/validation/__init__.py +0 -0
  157. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/validation/factory.py +0 -0
  158. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/validation/orchestrator.py +0 -0
  159. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/validation/requirements.py +0 -0
  160. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag/validation/validator.py +0 -0
  161. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag.egg-info/dependency_links.txt +0 -0
  162. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag.egg-info/entry_points.txt +0 -0
  163. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/iris_vector_rag.egg-info/top_level.txt +0 -0
  164. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/setup.cfg +0 -0
  165. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_comprehensive_pipeline_validation_e2e.py +0 -0
  166. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_comprehensive_pipeline_validation_e2e_fixed.py +0 -0
  167. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_enterprise_storage.py +0 -0
  168. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_entity_extraction_service.py +0 -0
  169. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_hybrid_graphrag_functional.py +0 -0
  170. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_index_ensure.py +0 -0
  171. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_mcp_integration.py +0 -0
  172. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_mcp_server_integration.py +0 -0
  173. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_ontology_loader.py +0 -0
  174. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_ontology_support.py +0 -0
  175. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_performance_monitor_comprehensive.py +0 -0
  176. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_performance_monitor_working.py +0 -0
  177. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_pylate_colbert_pipeline.py +0 -0
  178. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_schema_manager_bugs.py +0 -0
  179. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_temporal_manager.py +0 -0
  180. {iris_vector_rag-0.5.3 → iris_vector_rag-0.5.8}/tests/test_vector_safe_helpers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris-vector-rag
3
- Version: 0.5.3
3
+ Version: 0.5.8
4
4
  Summary: Production-ready, extensible RAG framework with native IRIS vector search - unified API for basic, CRAG, GraphRAG, and ColBERT pipelines with RAGAS and DSPy integration
5
5
  Author-email: InterSystems <support@intersystems.com>
6
6
  Maintainer-email: Thomas Dyar <thomas.dyar@intersystems.com>
@@ -51,9 +51,18 @@ Requires-Dist: torch>=2.0.0
51
51
  Provides-Extra: embedding
52
52
  Requires-Dist: torch>=2.0.0; extra == "embedding"
53
53
  Requires-Dist: sentence-transformers>=2.2.0; extra == "embedding"
54
- Requires-Dist: iris-vector-graph>=1.1.1; extra == "embedding"
54
+ Requires-Dist: iris-vector-graph>=1.1.7; extra == "embedding"
55
55
  Provides-Extra: hybrid-graphrag
56
- Requires-Dist: iris-vector-graph>=1.1.1; extra == "hybrid-graphrag"
56
+ Requires-Dist: iris-vector-graph>=1.1.7; extra == "hybrid-graphrag"
57
+ Provides-Extra: monitoring
58
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == "monitoring"
59
+ Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "monitoring"
60
+ Requires-Dist: opentelemetry-exporter-otlp>=1.20.0; extra == "monitoring"
61
+ Provides-Extra: enterprise
62
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == "enterprise"
63
+ Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "enterprise"
64
+ Requires-Dist: opentelemetry-exporter-otlp>=1.20.0; extra == "enterprise"
65
+ Requires-Dist: tqdm>=4.64.0; extra == "enterprise"
57
66
  Provides-Extra: dev
58
67
  Requires-Dist: uv>=0.1.0; extra == "dev"
59
68
  Requires-Dist: pytest>=7.0.0; extra == "dev"
@@ -100,6 +109,10 @@ Requires-Dist: python-multipart>=0.0.6; extra == "all"
100
109
  Requires-Dist: redis>=5.0.0; extra == "all"
101
110
  Requires-Dist: bcrypt>=4.0.0; extra == "all"
102
111
  Requires-Dist: python-jose[cryptography]>=3.3.0; extra == "all"
112
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == "all"
113
+ Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "all"
114
+ Requires-Dist: opentelemetry-exporter-otlp>=1.20.0; extra == "all"
115
+ Requires-Dist: tqdm>=4.64.0; extra == "all"
103
116
  Dynamic: license-file
104
117
 
105
118
  # IRIS Vector RAG Templates
@@ -108,6 +121,8 @@ Dynamic: license-file
108
121
 
109
122
  Build intelligent applications that combine large language models with your enterprise data using battle-tested RAG patterns and native vector search capabilities.
110
123
 
124
+ **Author: Thomas Dyar** (thomas.dyar@intersystems.com)
125
+
111
126
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
112
127
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
113
128
  [![InterSystems IRIS](https://img.shields.io/badge/IRIS-2024.1+-purple.svg)](https://www.intersystems.com/products/intersystems-iris/)
@@ -4,6 +4,8 @@
4
4
 
5
5
  Build intelligent applications that combine large language models with your enterprise data using battle-tested RAG patterns and native vector search capabilities.
6
6
 
7
+ **Author: Thomas Dyar** (thomas.dyar@intersystems.com)
8
+
7
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
10
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
9
11
  [![InterSystems IRIS](https://img.shields.io/badge/IRIS-2024.1+-purple.svg)](https://www.intersystems.com/products/intersystems-iris/)
@@ -18,7 +18,7 @@ from .validation.requirements import get_pipeline_requirements
18
18
  from .validation.validator import PreConditionValidator
19
19
 
20
20
  # Package version
21
- __version__ = "0.5.3"
21
+ __version__ = "0.5.7"
22
22
  __author__ = "InterSystems IRIS RAG Templates Project"
23
23
  __description__ = "A comprehensive, production-ready framework for implementing Retrieval Augmented Generation (RAG) pipelines using InterSystems IRIS as the vector database backend."
24
24
 
@@ -165,11 +165,11 @@ def get_iris_dbapi_connection():
165
165
  Returns:
166
166
  A direct IRIS connection object or None if connection fails.
167
167
  """
168
- # Use direct iris import instead of DBAPI
168
+ # Use intersystems_iris DBAPI module
169
169
  try:
170
- import iris
170
+ import intersystems_iris.dbapi._DBAPI as iris
171
171
  except ImportError as e:
172
- logger.error(f"Cannot import iris module: {e}")
172
+ logger.error(f"Cannot import intersystems_iris.dbapi module: {e}")
173
173
  return None
174
174
 
175
175
  # Get connection parameters from environment with auto-detection fallback
@@ -12,6 +12,16 @@ storage:
12
12
  iris:
13
13
  table_name: "RAG.SourceDocuments"
14
14
  vector_dimension: 384
15
+ # Custom metadata filter keys for multi-tenant isolation (User Story 1 - P1)
16
+ # These fields can be used in metadata_filter parameter for queries
17
+ # Default filter keys (always enabled): document_id, source, title, author,
18
+ # created_at, updated_at, content_type, file_type, page_number, section,
19
+ # chunk_id, chunk_index, language, collection_id, metadata_hash,
20
+ # parent_document_id, version
21
+ custom_filter_keys:
22
+ - "tenant_id" # Tenant identifier for multi-tenant deployments
23
+ - "security_level" # Security clearance level (e.g., public, confidential, secret)
24
+ - "department" # Department or organizational unit
15
25
 
16
26
  # Vector index configuration for optimal HNSW performance
17
27
  vector_index:
@@ -353,4 +363,105 @@ iris_graph_core:
353
363
  # - type: "owl"
354
364
  # path: "ontologies/legal.owl"
355
365
  # - type: "skos"
356
- # path: "ontologies/general_terms.skos"
366
+ # path: "ontologies/general_terms.skos"
367
+
368
+ # =============================================================================
369
+ # Enterprise Enhancements (v0.6.0)
370
+ # =============================================================================
371
+
372
+ # Role-Based Access Control (User Story 3 - P1)
373
+ security:
374
+ rbac:
375
+ enabled: false # Enable RBAC policy enforcement
376
+ policy_class: null # Full import path to RBAC policy class (e.g., "myapp.security.MyRBACPolicy")
377
+ # Example policy classes:
378
+ # - "iris_vector_rag.security.examples.LDAPRBACPolicy"
379
+ # - "iris_vector_rag.security.examples.ClearanceLevelPolicy"
380
+ # - "mycompany.security.CustomRBACPolicy"
381
+
382
+ # OpenTelemetry Monitoring (User Story 4 - P2)
383
+ telemetry:
384
+ enabled: false # Enable OpenTelemetry instrumentation (zero overhead when disabled)
385
+ service_name: "iris-vector-rag"
386
+ endpoint: "http://localhost:4318" # OTLP HTTP endpoint
387
+ sampling_ratio: 1.0 # Sampling rate (1.0 = 100%, 0.1 = 10%)
388
+ export_protocol: "http" # Export protocol: http or grpc
389
+ export_timeout_ms: 10000 # Export timeout in milliseconds
390
+
391
+ # GenAI semantic conventions (OpenTelemetry)
392
+ genai_conventions:
393
+ enabled: true # Track LLM-specific attributes (gen.ai.*)
394
+ track_token_usage: true # Track token counts and costs
395
+ track_prompts: false # Include prompts in spans (may contain sensitive data)
396
+ track_completions: false # Include completions in spans (may contain sensitive data)
397
+
398
+ # Cost tracking
399
+ cost_tracking:
400
+ enabled: true # Calculate LLM API costs
401
+ pricing_table: # Model pricing (per 1M tokens)
402
+ openai:
403
+ gpt-4o-mini:
404
+ input: 0.15 # $0.15 per 1M input tokens
405
+ output: 0.60 # $0.60 per 1M output tokens
406
+ gpt-4o:
407
+ input: 2.50 # $2.50 per 1M input tokens
408
+ output: 10.00 # $10.00 per 1M output tokens
409
+ gpt-4-turbo:
410
+ input: 10.00
411
+ output: 30.00
412
+ anthropic:
413
+ claude-3-5-sonnet-20241022:
414
+ input: 3.00 # $3.00 per 1M input tokens
415
+ output: 15.00 # $15.00 per 1M output tokens
416
+ claude-3-opus-20240229:
417
+ input: 15.00
418
+ output: 75.00
419
+
420
+ # Bulk Document Loading (User Story 5 - P2)
421
+ batch_operations:
422
+ enabled: true # Enable batch operations (10x+ speedup)
423
+ default_batch_size: 1000 # Default batch size for bulk operations
424
+ max_batch_size: 10000 # Maximum allowed batch size
425
+ show_progress: true # Show progress bars for batch operations
426
+ error_handling: "continue" # Error handling strategy: continue, stop, rollback
427
+ max_errors_in_response: 100 # Maximum number of errors to return in response
428
+
429
+ # Performance targets
430
+ performance:
431
+ target_throughput_docs_per_sec: 1000 # Target: >=1000 docs/sec for 10K documents
432
+ target_bulk_load_time_ms: 10000 # Target: <10s for 10K documents
433
+
434
+ # Collection Management (User Story 2 - P1)
435
+ collections:
436
+ enabled: true # Enable collection lifecycle management
437
+ default_collection_id: "default"
438
+ max_collection_id_length: 128
439
+ allowed_collection_id_pattern: "^[a-zA-Z0-9_-]+$" # Alphanumeric + hyphens/underscores
440
+
441
+ # Statistics and metadata
442
+ track_statistics: true # Track document counts, sizes, timestamps
443
+ compute_size_in_bytes: true # Calculate total size of documents in collections
444
+
445
+ # Metadata Schema Discovery (User Story 6 - P3)
446
+ schema_discovery:
447
+ enabled: true # Enable metadata schema discovery
448
+ default_sample_size: 100 # Default number of documents to sample
449
+ max_sample_size: 200 # Maximum allowed sample size
450
+ min_sample_size: 10 # Minimum allowed sample size
451
+
452
+ # Type inference
453
+ type_inference:
454
+ enabled: true # Enable automatic type inference
455
+ detect_datetime: true # Detect ISO 8601 datetime strings
456
+ detect_numeric: true # Detect integers and floats
457
+ detect_boolean: true # Detect boolean values
458
+ detect_arrays: true # Detect array types
459
+
460
+ # Statistics
461
+ compute_statistics:
462
+ enabled: true # Compute min/max/avg for numeric fields
463
+ max_example_values: 5 # Maximum number of example values per field
464
+
465
+ # Performance target
466
+ performance:
467
+ target_discovery_time_ms: 5000 # Target: <5s for sample_size=200
@@ -14,6 +14,16 @@ from typing import List, Dict, Any, Optional
14
14
  logger = logging.getLogger(__name__)
15
15
 
16
16
 
17
+ # Domain-specific entity type presets
18
+ DOMAIN_PRESETS = {
19
+ "it_support": ["PRODUCT", "USER", "MODULE", "ERROR", "ACTION", "ORGANIZATION", "VERSION"],
20
+ "biomedical": ["GENE", "PROTEIN", "DISEASE", "CHEMICAL", "DRUG", "CELL_TYPE", "ORGANISM"],
21
+ "legal": ["PARTY", "JUDGE", "COURT", "LAW", "DATE", "MONETARY_AMOUNT", "JURISDICTION"],
22
+ "general": ["PERSON", "ORGANIZATION", "LOCATION", "DATE", "EVENT", "PRODUCT"],
23
+ "wikipedia": ["PERSON", "ORGANIZATION", "LOCATION", "TITLE", "ROLE", "POSITION", "EVENT"],
24
+ }
25
+
26
+
17
27
  class BatchEntityExtractionSignature(dspy.Signature):
18
28
  """Extract entities from MULTIPLE tickets in one LLM call."""
19
29
 
@@ -21,7 +31,7 @@ class BatchEntityExtractionSignature(dspy.Signature):
21
31
  desc="JSON array of tickets. Each has: ticket_id, text. Extract entities for ALL tickets."
22
32
  )
23
33
  entity_types = dspy.InputField(
24
- desc="PRODUCT, USER, MODULE, ERROR, ACTION, ORGANIZATION, VERSION"
34
+ desc="Comma-separated list of entity types to extract"
25
35
  )
26
36
 
27
37
  batch_results = dspy.OutputField(
@@ -138,16 +148,29 @@ class BatchEntityExtractionModule(dspy.Module):
138
148
 
139
149
  return None
140
150
 
141
- def forward(self, tickets: List[Dict[str, str]]) -> List[Dict[str, Any]]:
151
+ def forward(
152
+ self,
153
+ tickets: List[Dict[str, str]],
154
+ entity_types: Optional[List[str]] = None
155
+ ) -> List[Dict[str, Any]]:
142
156
  """
143
157
  Extract entities from a batch of tickets with JSON retry logic (T025).
144
158
 
145
159
  Args:
146
160
  tickets: List of dicts with 'id' and 'text' keys
161
+ entity_types: List of entity types to extract (e.g., ["PERSON", "ORG", "LOCATION"])
162
+ If None, defaults to IT support types for backward compatibility
147
163
 
148
164
  Returns:
149
165
  List of extraction results (one per ticket)
150
166
  """
167
+ # Default to IT support types for backward compatibility
168
+ if entity_types is None:
169
+ entity_types = ["PRODUCT", "USER", "MODULE", "ERROR", "ACTION", "ORGANIZATION", "VERSION"]
170
+
171
+ # Convert list to comma-separated string for DSPy
172
+ entity_types_str = ", ".join(entity_types)
173
+
151
174
  try:
152
175
  # Prepare batch input
153
176
  batch_input = json.dumps([
@@ -158,7 +181,7 @@ class BatchEntityExtractionModule(dspy.Module):
158
181
  # Single LLM call for entire batch
159
182
  prediction = self.extract(
160
183
  tickets_batch=batch_input,
161
- entity_types="PRODUCT, USER, MODULE, ERROR, ACTION, ORGANIZATION, VERSION"
184
+ entity_types=entity_types_str
162
185
  )
163
186
 
164
187
  # Parse batch results with retry logic (T025)
@@ -0,0 +1,188 @@
1
+ """
2
+ Exception classes for iris-vector-rag enterprise features.
3
+
4
+ This module defines custom exceptions for security, configuration, and
5
+ operational errors in the RAG framework.
6
+
7
+ Classes:
8
+ VectorStoreConfigurationError: Raised when vector store configuration is invalid
9
+ PermissionDeniedError: Raised when user lacks required permissions for an operation
10
+
11
+ Example:
12
+ >>> from iris_vector_rag.exceptions import VectorStoreConfigurationError
13
+ >>>
14
+ >>> # Configuration validation
15
+ >>> if invalid_filter_key:
16
+ ... raise VectorStoreConfigurationError(
17
+ ... "Invalid metadata filter key",
18
+ ... rejected_keys=["invalid_key"],
19
+ ... allowed_keys=["tenant_id", "department"]
20
+ ... )
21
+ >>>
22
+ >>> # RBAC enforcement
23
+ >>> from iris_vector_rag.exceptions import PermissionDeniedError
24
+ >>>
25
+ >>> if not has_permission(user, "read", collection):
26
+ ... raise PermissionDeniedError(
27
+ ... user=user,
28
+ ... resource=collection_id,
29
+ ... operation="read"
30
+ ... )
31
+ """
32
+
33
+ from typing import Any, Dict, List, Optional
34
+
35
+
36
+ class VectorStoreConfigurationError(Exception):
37
+ """
38
+ Exception raised when vector store configuration is invalid.
39
+
40
+ This exception is raised when attempting to use metadata filter keys
41
+ that are not in the allowed list, or when other configuration errors occur.
42
+
43
+ Attributes:
44
+ message: Human-readable error message
45
+ rejected_keys: List of rejected metadata filter keys (if applicable)
46
+ allowed_keys: List of allowed metadata filter keys (if applicable)
47
+ details: Additional error context
48
+
49
+ Example:
50
+ >>> raise VectorStoreConfigurationError(
51
+ ... "Invalid metadata filter keys",
52
+ ... rejected_keys=["invalid_field"],
53
+ ... allowed_keys=["tenant_id", "department", "security_level"]
54
+ ... )
55
+ """
56
+
57
+ def __init__(
58
+ self,
59
+ message: str,
60
+ rejected_keys: Optional[List[str]] = None,
61
+ allowed_keys: Optional[List[str]] = None,
62
+ **details: Any
63
+ ):
64
+ """
65
+ Initialize VectorStoreConfigurationError.
66
+
67
+ Args:
68
+ message: Error message describing the configuration issue
69
+ rejected_keys: Optional list of rejected metadata filter keys
70
+ allowed_keys: Optional list of allowed metadata filter keys
71
+ **details: Additional error context (e.g., field_name, rejected_value)
72
+ """
73
+ super().__init__(message)
74
+ self.message = message
75
+ self.rejected_keys = rejected_keys or []
76
+ self.allowed_keys = allowed_keys or []
77
+ self.details = details
78
+
79
+ def __str__(self) -> str:
80
+ """Format error message with context."""
81
+ parts = [self.message]
82
+
83
+ if self.rejected_keys:
84
+ parts.append(f"Rejected keys: {', '.join(self.rejected_keys)}")
85
+
86
+ if self.allowed_keys:
87
+ parts.append(f"Allowed keys: {', '.join(self.allowed_keys)}")
88
+
89
+ if self.details:
90
+ detail_str = ", ".join(f"{k}={v}" for k, v in self.details.items())
91
+ parts.append(f"Details: {detail_str}")
92
+
93
+ return " | ".join(parts)
94
+
95
+
96
+ class PermissionDeniedError(Exception):
97
+ """
98
+ Exception raised when user lacks required permissions for an operation.
99
+
100
+ This exception is raised by RBAC policy enforcement when a user attempts
101
+ to access a resource or perform an operation they are not authorized for.
102
+
103
+ Attributes:
104
+ user: User identifier (username, email, or user ID)
105
+ resource: Resource identifier (collection ID, document ID, etc.)
106
+ operation: Operation name (read, write, delete, etc.)
107
+ reason: Optional additional context explaining why permission was denied
108
+ details: Additional error context
109
+
110
+ Example:
111
+ >>> raise PermissionDeniedError(
112
+ ... user="john.doe@example.com",
113
+ ... resource="medical_records_collection",
114
+ ... operation="read",
115
+ ... reason="User does not have 'medical' clearance level"
116
+ ... )
117
+ """
118
+
119
+ def __init__(
120
+ self,
121
+ user: str,
122
+ resource: str,
123
+ operation: str,
124
+ reason: Optional[str] = None,
125
+ **details: Any
126
+ ):
127
+ """
128
+ Initialize PermissionDeniedError.
129
+
130
+ Args:
131
+ user: User identifier (username, email, or user ID)
132
+ resource: Resource identifier being accessed
133
+ operation: Operation being attempted (read, write, delete)
134
+ reason: Optional explanation for permission denial
135
+ **details: Additional error context (e.g., required_role, user_role)
136
+ """
137
+ message = (
138
+ f"Permission denied: User '{user}' cannot perform '{operation}' "
139
+ f"on resource '{resource}'"
140
+ )
141
+ if reason:
142
+ message += f" - {reason}"
143
+
144
+ super().__init__(message)
145
+ self.user = user
146
+ self.resource = resource
147
+ self.operation = operation
148
+ self.reason = reason
149
+ self.details = details
150
+
151
+ def __str__(self) -> str:
152
+ """Format error message with full context."""
153
+ parts = [
154
+ f"User: {self.user}",
155
+ f"Resource: {self.resource}",
156
+ f"Operation: {self.operation}",
157
+ ]
158
+
159
+ if self.reason:
160
+ parts.append(f"Reason: {self.reason}")
161
+
162
+ if self.details:
163
+ detail_str = ", ".join(f"{k}={v}" for k, v in self.details.items())
164
+ parts.append(f"Details: {detail_str}")
165
+
166
+ return " | ".join(parts)
167
+
168
+ def to_dict(self) -> Dict[str, Any]:
169
+ """
170
+ Convert exception to dictionary for JSON serialization.
171
+
172
+ Returns:
173
+ Dictionary with user, resource, operation, reason, and details
174
+
175
+ Example:
176
+ >>> error = PermissionDeniedError(
177
+ ... user="john", resource="docs", operation="read"
178
+ ... )
179
+ >>> error.to_dict()
180
+ {'user': 'john', 'resource': 'docs', 'operation': 'read', ...}
181
+ """
182
+ return {
183
+ "user": self.user,
184
+ "resource": self.resource,
185
+ "operation": self.operation,
186
+ "reason": self.reason,
187
+ **self.details,
188
+ }
@@ -0,0 +1,58 @@
1
+ """
2
+ Monitoring and observability module for iris-vector-rag.
3
+
4
+ This module provides OpenTelemetry integration for production observability,
5
+ including query latency tracking, token usage monitoring, and cost tracking.
6
+
7
+ Classes:
8
+ TelemetryManager: Central telemetry manager with lazy initialization
9
+
10
+ Functions:
11
+ configure_telemetry: Configure global telemetry settings
12
+ calculate_llm_cost: Calculate LLM API costs based on token usage
13
+
14
+ Features:
15
+ - Zero overhead when disabled (lazy initialization)
16
+ - <5% overhead when enabled
17
+ - OpenTelemetry GenAI semantic conventions
18
+ - OTLP export support (HTTP/gRPC)
19
+ - Automatic span context propagation
20
+ - Cost tracking for OpenAI, Anthropic models
21
+
22
+ Example:
23
+ >>> from iris_vector_rag.monitoring import configure_telemetry
24
+ >>>
25
+ >>> # Enable telemetry with OTLP export
26
+ >>> configure_telemetry(
27
+ ... enabled=True,
28
+ ... service_name="my-rag-service",
29
+ ... endpoint="http://localhost:4318",
30
+ ... sampling_ratio=1.0
31
+ ... )
32
+ >>>
33
+ >>> # Telemetry automatically instruments RAG operations
34
+ >>> pipeline = create_pipeline("basic")
35
+ >>> result = pipeline.query("What is diabetes?") # Auto-traced
36
+ >>>
37
+ >>> # Manual instrumentation
38
+ >>> from iris_vector_rag.monitoring import telemetry
39
+ >>>
40
+ >>> with telemetry.trace_operation("custom.operation") as span:
41
+ ... span.set_attribute("custom.param", "value")
42
+ ... # Your code here
43
+ ... pass
44
+ """
45
+
46
+ from iris_vector_rag.monitoring.telemetry import (
47
+ TelemetryManager,
48
+ configure_telemetry,
49
+ telemetry,
50
+ )
51
+ from iris_vector_rag.monitoring.cost_tracking import calculate_llm_cost
52
+
53
+ __all__ = [
54
+ "TelemetryManager",
55
+ "configure_telemetry",
56
+ "telemetry",
57
+ "calculate_llm_cost",
58
+ ]
@@ -181,8 +181,8 @@ class GraphRAGPipeline(RAGPipeline):
181
181
  for entity2 in entities[i+1:]:
182
182
  # Simple relationship: co-occurrence in same document
183
183
  rel = Relationship(
184
- source_entity_id=entity1.text, # Fixed: was source_entity
185
- target_entity_id=entity2.text, # Fixed: was target_entity
184
+ source_entity_id=entity1.id, # Use entity UUID, not text
185
+ target_entity_id=entity2.id, # Use entity UUID, not text
186
186
  relationship_type="co_occurs_with",
187
187
  confidence=0.8,
188
188
  source_document_id=doc.id
@@ -0,0 +1,34 @@
1
+ """
2
+ Security module for iris-vector-rag.
3
+
4
+ This module provides Role-Based Access Control (RBAC) integration for
5
+ multi-tenant deployments and enterprise security requirements.
6
+
7
+ Classes:
8
+ RBACPolicy: Abstract base class for implementing custom RBAC policies
9
+ PermissionDeniedError: Exception raised when user lacks required permissions
10
+
11
+ Example:
12
+ >>> from iris_vector_rag.security import RBACPolicy
13
+ >>>
14
+ >>> class MyRBACPolicy(RBACPolicy):
15
+ ... def check_collection_access(self, user, collection_id, operation):
16
+ ... # Custom authorization logic
17
+ ... return user.role in ['admin', 'reader']
18
+ ...
19
+ ... def filter_documents(self, user, documents):
20
+ ... # Filter documents based on user permissions
21
+ ... return [doc for doc in documents if self._can_access(user, doc)]
22
+ >>>
23
+ >>> # Use with IRISVectorStore
24
+ >>> policy = MyRBACPolicy()
25
+ >>> store = IRISVectorStore(rbac_policy=policy)
26
+ """
27
+
28
+ from iris_vector_rag.security.rbac import RBACPolicy
29
+ from iris_vector_rag.exceptions import PermissionDeniedError
30
+
31
+ __all__ = [
32
+ "RBACPolicy",
33
+ "PermissionDeniedError",
34
+ ]
@@ -109,6 +109,13 @@ class BatchEntityProcessor:
109
109
  conn = self.connection_manager.get_connection()
110
110
  cursor = conn.cursor()
111
111
 
112
+ # Log entity IDs being stored for debugging
113
+ entity_ids_to_store = [str(e.id) for e in entities]
114
+ logger.debug(
115
+ f"Preparing to store {len(entities)} entities. "
116
+ f"First 5 IDs: {entity_ids_to_store[:5]}"
117
+ )
118
+
112
119
  # Prepare batch data for executemany()
113
120
  batch_data = []
114
121
 
@@ -308,10 +315,21 @@ class BatchEntityProcessor:
308
315
  or str(r.target_entity_id) in missing_ids
309
316
  ]
310
317
  )
318
+
319
+ # Enhanced logging to diagnose missing entities
320
+ missing_ids_list = sorted(list(missing_ids))[:10] # Show first 10
311
321
  logger.error(
312
322
  f"Foreign key validation failed: {len(missing_ids)} missing entity IDs, "
313
323
  f"{orphaned_count} orphaned relationships"
314
324
  )
325
+ logger.error(
326
+ f"Sample missing entity IDs (first 10): {missing_ids_list}"
327
+ )
328
+ logger.info(
329
+ f"Total entity IDs referenced: {len(entity_ids)}, "
330
+ f"Found in database: {len(existing_ids)}, "
331
+ f"Missing: {len(missing_ids)}"
332
+ )
315
333
 
316
334
  # Filter out relationships with missing entity IDs
317
335
  relationships = [