102 Commits
Author SHA1 Message Date
Mohd Kaif 8348df63be Merge branch 'main' into utils 2026-04-02 20:37:10 +05:30
KaifAhmad1andClaude Sonnet 4.6 29a608f60e fix: add_decision kwargs support and quickstart VectorStore backend
Fixes #433

- ContextGraph.add_decision() now accepts keyword arguments (category,
  scenario, reasoning, outcome, confidence, entities, decision_maker)
  in addition to a Decision object, matching documented behaviour.
  Both call forms return the decision ID string.
- Quickstart snippets in README, getting-started.md, and index.md
  changed from VectorStore(backend="faiss") to VectorStore(backend="inmemory")
  so they work without faiss-cpu installed.
- docs/reference/context.md methods table updated to reflect the dual
  signature of add_decision().
- docs/bugs/quickstart_api_mismatch.md added to track the issue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 20:16:56 +05:30
Sameer6305 08150fb2f7 docs: update named graph usage 2026-04-02 15:46:41 +05:30
KaifAhmad1andClaude Sonnet 4.6 71d037f581 feat(#319): SKOS Vocabulary Module — namespace helpers, store helpers, OntologyEngine APIs, tests, docs
Extends the existing ontology and triplet-store stack with first-class
SKOS support without adding any new top-level packages.

### semantica/ontology/namespace_manager.py
- `get_skos_uri(local_name)` — build full skos:core# URI from local name
- `build_concept_scheme_uri(name)` — slug a human name into a stable
  ConceptScheme URI anchored at the configured base URI

### semantica/triplet_store/triplet_store.py
- `add_skos_concept(concept_uri, scheme_uri, pref_label, ...)` — asserts
  ConceptScheme + Concept triples, prefLabel, altLabel, broader, narrower,
  related, definition, notation via existing `add_triplets()` API
- `get_skos_concepts(scheme_uri=None)` — SPARQL SELECT via `execute_query()`,
  collapses multi-valued bindings into concept dicts

### semantica/ontology/engine.py
- `list_vocabularies()` — list all skos:ConceptScheme instances
- `list_concepts(scheme_uri)` — list concepts in a scheme with alt labels
- `search_concepts(query, scheme_uri=None)` — case-insensitive substring
  search over prefLabel + altLabel; sanitises user input against SPARQL injection

### tests
- `TestSKOSOntologyEngine` (14 tests) in test_ontology_comprehensive.py
- `TestSKOSTripletStore` (6 tests) in test_triplet_store.py
- All 1162 existing + new tests pass, 0 failures

### docs/reference/ontology.md
- New "SKOS Vocabulary Management" section: data-model table, import
  examples (add_skos_concept + rdflib bulk), list/search API, NamespaceManager helpers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 13:59:23 +05:30
Mohd KaifandClaude Sonnet 4.6 b282487b17 docs: rewrite and polish documentation site (#413)
- Rewrote index.md to match README (tagline, badges, Problem/Solution text)
- Improved getting-started, concepts, quickstart, installation, faq, use-cases, contributing, glossary, learning-more, examples, modules, architecture, cookbook, deep-dive pages: tighter prose, fixed headings/bullets, removed inconsistencies and duplicate sections
- Removed overuse of emojis from headings in integration pages (docling, snowflake)
- Fixed change_management reference page: closed unclosed JSON code block that broke the right TOC, demoted noisy sub-headings to bold text
- CSS layout: widened content area (max-width 1440px grid, left sidebar 11rem, right TOC narrowed to 11rem for broader content), tightened TOC spacing and font size, fixed word-wrap/overflow on TOC links
- Added mkdocs_local.yml for local serving without mkdocs-jupyter plugin

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 18:38:21 +05:30
KaifAhmad1andZohaibHassan16 665771f230 fix: address all review feedback on ontology diff implementation
- Fix typo in ChangeCategory enum: "potenitally_breaking" → "potentially_breaking"
- Fix missing space in _classify_change description string: "New{type}" → "New {type}"
- Add null-value guard in _analyze_field_changes for unset constraint fields
- Make ChangeLogAnalyzer stateless: pass report as arg to _generate_recommendations
- Remove no-op __init__ from ChangeLogAnalyzer
- Replace non-portable emoji markers in recommendations with plain-text tags
- Extend diff_ontologies to cover individuals and axioms (not just classes/properties)
- Fix exception chaining in compare_versions: raise ... from e
- Remove silent ImportError swallow for GraphValidator (it is a first-party module)
- Add comment on deferred VersionManager import explaining circular-import reason
- Fix import-before-docstring in test_managers.py
- Add tests: version-not-found error path, individuals/axioms diff coverage,
  null constraint flagged as breaking
- Fix broken Markdown link syntax in docs JSON example block
- Update docs recommendations example to match new plain-text tag format

Co-authored-by: ZohaibHassan16 <zohaib179949@gmail.com>
Co-authored-by: KaifAhmad1 <kaifahmad087@gmail.com>
2026-03-16 22:05:12 +05:30
Mohd Kaif 9d4d682883 Merge branch 'main' into clean-ontology-diff 2026-03-16 21:48:47 +05:30
Mohd Kaif 0dc5eb6075 Merge branch 'main' into onto-alignment 2026-03-13 00:04:28 +05:30
ZohaibHassan16 9a2b2b9cd1 fix: resolve code review feedback for diff engine and report format 2026-03-10 00:37:48 +05:00
ZohaibHassan16 c842af65d0 feat: implement ontology dif 2026-03-10 00:01:36 +05:00
Mohd KaifandClaude Sonnet 4.6 e8d0d7a2cf feat: add 105 real-world context graph tests + update Discord link (#365)
- Add tests/test_030_context_graph_realworld_extended.py (105 tests, 0 failed)
  - ContextGraph advanced methods: analyze_decision_influence,
    get_decision_insights, trace_decision_causality,
    enforce_decision_policy, find_precedents_by_scenario
  - Research paper citation KG (arXiv provenance: Transformer, BERT,
    GPT-3, GPT-4, LLaMA, PaLM — source URLs as entity provenance)
  - E-commerce KG with pricing / supply-chain causal decision chains
  - GraphBuilderWithProvenance with GitHub + arXiv web-sourced data
  - AlgorithmTrackerWithProvenance: all 10 methods incl. 9 domain-specific
    ones added in 0.3.0-alpha (track_cross_domain_similarity, etc.)
  - Parquet export: entities, relationships, full KG, all codecs (PR #343)
  - ArangoDB AQL export: INSERT content, custom collections (PR #342)
  - Deduplication v2: two-stage prefilter, phonetic blocking, hybrid_v2,
    budget limiting (PR #339); semantic rel dedup v2 (PR #340)
  - AgentMemory: store, retrieve, statistics, conversation history
  - Full E2E workflow: build → decisions → influence → export → dedup
  - Multi-domain precedent search (SEC EDGAR, AMA, M&A news sources)
  - Graph serialization round-trips (research, ecommerce, GitHub domains)
  - Incremental/delta processing simulation (PR #349)
  - All 190 tests (85 existing + 105 new) pass, 0 failed

- Fix Discord invite link — replace expiring links with permanent invite
  across all docs and GitHub files:
  Old: discord.gg/N7WmAuDH, discord.gg/ggb7vWeP
  New: discord.gg/sV34vps5hH (never-expire, unlimited invites)
  Files: README.md, CONTRIBUTING.md, CONTRIBUTORS.md, SUPPORT.md,
         .github/SUPPORT.md, docs/index.md, docs/getting-started.md,
         docs/CodeExamples.md, docs/reference/provenance.md,
         semantica/change_management/change_management_usage.md

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 00:00:44 +05:30
ZohaibHassan16 bcdf3c357a changed struct approach and an e2e test 2026-03-07 22:39:21 +05:00
ZohaibHassan16 2be45a01f1 feat: implement ontology alignment API(#324) 2026-03-07 17:24:05 +05:00
ZohaibHassan16 59ff25fc06 feat: implement incremental delta processing 2026-02-25 02:55:12 +05:00
KaifAhmad1 8aa2ee3dc8 Merge main into docs and resolve README Discord badge conflict 2026-02-18 16:36:23 +05:30
KaifAhmad1 3f211dfb23 Update Discord invite links across docs and community files 2026-02-18 16:32:12 +05:30
KaifAhmad1 59ae0bdf44 Fix documentation snippets: Add missing imports and correct parameter names
- Add 'from datetime import datetime' import in e-commerce examples
- Change 'max_results=5' to 'limit=5' for find_precedents_by_scenario calls
- Fix docs/reference/context.md e-commerce example
- Fix semantica/context/context_usage.md e-commerce example
- Ensure documentation examples are self-contained and copy-paste ready
- Match actual API parameter names for correct behavior
- All 62 tests still passing successfully
2026-02-17 14:35:17 +05:30
KaifAhmad1 33c90d8277 Fix Context Graph features - resolve method conflicts and integration issues
- Fix method name conflicts: add_decision -> add_decision_simple, find_precedents -> find_precedents_by_scenario
- Fix Decision ID handling: align tests with Decision model UUID generation behavior
- Fix AgentContext integration: proper handling of context_graph backend in get_causal_chain
- Fix Policy engine: remove invalid auto_generate_id parameter from deserialization
- Fix node type consistency: handle lowercase 'decision' type across all methods
- Fix timestamp handling: proper conversion for string and datetime objects
- Update documentation: correct method names and Decision model usage in examples
- All 62 Context Graph tests passing successfully
- Production ready with comprehensive verification
2026-02-17 13:43:08 +05:30
KaifAhmad1 14f5e05336 Update context documentation with user-friendly approach and strategic emoji placement
- Enhanced README.md with strategic emojis for better visual appeal
- Updated context_usage.md with detailed, user-friendly examples
- Improved docs/reference/context.md with accessible language
- Added AgentContext sections with progressive learning approach
- Maintained professional appearance while improving readability
- Consistent documentation across all context module files
2026-02-16 17:40:50 +05:30
KaifAhmad1 db64dce596 fix: Remove broken link to non-existent decision_tracking.md
- Remove broken link from reference/context.md that was causing CI failure
- Decision tracking functionality is now integrated into the context module
- Fix mkdocs build strict mode warning about missing target file
- Ensure documentation builds successfully in CI pipeline
2026-02-13 18:41:29 +05:30
KaifAhmad1 7ad48df600 feat: Add comprehensive context engineering with decision tracking, KG algorithms, and context graphs
- Add decision tracking system with DecisionRecorder, DecisionQuery, CausalChainAnalyzer, PolicyEngine
- Implement KG algorithm integration with centrality, community detection, embeddings, path finding
- Add vector store integration with hybrid search and custom similarity weights
- Enhance context graphs with advanced analytics and decision support
- Update documentation with comprehensive context module reference
- Add production examples for banking and healthcare use cases
- Update README to highlight context graph framework capabilities
- Add comprehensive test suite for all new features
2026-02-12 23:04:29 +05:30
KaifAhmad1 6fc69aef2e [FEATURE] Enhanced Graph Algorithms in KG Module #292
This commit introduces comprehensive enhancements to the Knowledge Graph (KG) module with:

Major Enhancements:
- Complete algorithm suite with 30+ graph algorithms
- Unified provenance tracking system for all operations
- Comprehensive documentation and test coverage
- Enterprise-grade functionality

New Algorithm Components:
- NodeEmbedder: Node2Vec, DeepWalk, Word2Vec algorithms
- SimilarityCalculator: Cosine, Euclidean, Manhattan, Correlation metrics
- PathFinder: Dijkstra, A*, BFS, K-shortest paths
- LinkPredictor: Preferential attachment, Jaccard, Adamic-Adar
- CentralityCalculator: Degree, Betweenness, Closeness, PageRank
- CommunityDetector: Louvain, Leiden, Label propagation
- ConnectivityAnalyzer: Components, bridges, density analysis

Provenance System:
- GraphBuilderWithProvenance: Graph construction with tracking
- AlgorithmTrackerWithProvenance: Algorithm execution tracking
- Execution IDs and metadata tracking for reproducibility

Test Coverage:
- 5 comprehensive test suites with 40+ test methods
- End-to-end testing for all algorithms
- Real-world scenario testing
- Provenance integration testing

Documentation:
- Updated all module documentation with algorithm listings
- Enhanced KG reference documentation
- Comprehensive usage examples and API documentation

Technical Improvements:
- Unified provenance system integration
- Enhanced error handling and recovery
- Performance optimizations
- NetworkX compatibility with fallback implementations

Resolves: #292
Parent: Context Graphs feature
2026-02-10 21:49:11 +05:30
KaifAhmad1 ad06957f93 Fix card icons and remove unused files
- Replace problematic Material Design Icons with verified working icons
- Fix icon rendering issues in provenance.md and change_management.md
- Replace :material-route: with :material-link-variant: for Complete Lineage
- Replace :material-account-tree: with :material-graph: for Knowledge Graph Versioning
- Replace :material-schema: with :material-shape: for Ontology Versioning
- Replace :material-audit: with :material-clipboard-check: for Audit Trail Compliance
- Replace :material-bridge: with :material-share-variant: for Bridge Axiom Support
- Remove PR_DESCRIPTION.md and SNOWFLAKE_IMPLEMENTATION.md unused files
- All cards now display consistently with proper icons
2026-02-05 22:06:46 +05:30
KaifAhmad1 f45b7a26ba Fix card icons and replace logo across documentation
- Fix invalid Material Design Icons in provenance.md reference cards
- Replace old 'Semantica Updated Logo.png' with new 'Semantica Logo.png'
- Update README.md, docs/index.md, and docs/DOCS_README.md logo references
- Remove old logo files and add new logo to docs assets
- All documentation now uses consistent, valid icons and new branding
2026-02-05 21:16:51 +05:30
KaifAhmad1 d3b579208c Comprehensive documentation cleanup and improvements
## Documentation Changes

### 📚 Major Improvements
- **Cleaned up all documentation files** - Removed redundant content and improved clarity
- **Restructured Resources section** - Removed unnecessary files, kept only essential ones
- **Added Snowflake integration** - Complete integration guide with examples
- **Improved navigation** - Better organization and user experience

### 🗂️ File Changes
- **docs/concepts.md** - Rewritten to be clean and user-friendly
- **docs/modules.md** - Updated with current modules and removed emojis
- **docs/glossary.md** - Reorganized thematically instead of alphabetically
- **docs/getting-started.md** - Made more concise and practical
- **docs/community.md** - Clean, focused community guide
- **docs/contributing.md** - Clear contribution guidelines
- **docs/faq.md** - Comprehensive FAQ with practical answers
- **docs/license.md** - Clean license explanation
- **docs/css/custom.css** - Fixed CSS syntax and organization

### 🔧 Technical Changes
- **mkdocs.yml** - Updated navigation, removed redundant files
- **docs/integrations/snowflake.md** - New comprehensive Snowflake guide
- **docs/reference/ingest.md** - Added Snowflake references
- **Removed files**: changelog.md, release-guide.md, change_management_usage.md, community-projects.md, architecture.md, governance.md, citation.md

### 🎯 Benefits
- **Better user experience** - Clean, easy to navigate documentation
- **Reduced redundancy** - No duplicate or unnecessary content
- **Professional quality** - Enterprise-ready documentation
- **Consistent style** - Uniform formatting across all files

This commit includes all documentation improvements while maintaining the main branch's stability.
2026-02-05 17:43:16 +05:30
KaifAhmad1 079ae5cd10 Fix MkDocs CI: Add provenance to nav, update CHANGELOG, add PR description 2026-01-31 20:29:03 +05:30
KaifAhmad1 6391dcdf72 Add comprehensive W3C PROV-O compliant provenance tracking module
- Implemented provenance tracking across all 17 Semantica modules
- Added W3C PROV-O compliant schemas (prov:Entity, prov:Activity, prov:Agent, prov:wasDerivedFrom)
- Created ProvenanceManager with InMemory and SQLite storage backends
- Implemented SHA-256 integrity verification for tamper detection
- Added bridge axiom support for domain transformations (L1→L2→L3)
- Created provenance-enabled versions of all modules (opt-in with provenance=True)
- Added comprehensive test suite (237 tests covering edge cases and real scenarios)
- Updated README with accurate claims and compliance disclaimers
- Added complete documentation (usage guide and API reference)
- Zero breaking changes - fully backward compatible
2026-01-31 20:11:38 +05:30
KaifAhmad1 b3f3ac413c Add Enhanced Change Management Module with comprehensive testing and documentation
- New semantica.change_management module with persistent version storage
- Core classes: TemporalVersionManager, OntologyVersionManager, ChangeLogEntry
- Storage backends: SQLite (persistent) and InMemory (fast)
- Features: SHA-256 checksums, detailed entity/relationship diffs, email validation
- Compliance: HIPAA, SOX, FDA 21 CFR Part 11 support with audit trails
- Testing: 104 tests (100% pass) - unit, integration, compliance, performance
- Performance: 17.6ms for 10k entities, 510+ ops/sec concurrent
- Documentation: Complete usage guide and API reference
- Backward compatible with simplified class names
2026-01-30 15:51:07 +05:30
KaifAhmad1 37bc3add62 Update documentation and changelog for Pinecone support 2026-01-26 21:44:44 +05:30
KaifAhmad1 b3a239ccb1 feat: enhance semantic extraction with BYOM support, NER aggregation, RE implementation, and Triplet improvements
- Implemented 'Bring Your Own Model' (BYOM) support for NER, Relation, and Triplet extraction
- Added NER aggregation strategies (simple, max, average)
- Implemented Relation Extraction via Sequence Classification with entity markers
- Enhanced Triplet Extraction with REBEL post-processing and lazy loading
- Updated all extractors to prioritize runtime options over config defaults
- Added extensive tests and examples (huggingface_demo.py)
- Updated documentation and CHANGELOG
2026-01-24 20:53:21 +05:30
KaifAhmad1 b96e71ae72 feat(ontology): Implement OntologyIngestor and update exports
- Added OntologyIngestor in semantica/ingest/ontology_ingestor.py
- Updated semantica/ontology/__init__.py to export OntologyIngestor
- Updated semantica/ingest/methods.py to use OntologyIngestor
- Added tests for ontology ingestion
- Cleaned up temporary files
2026-01-21 13:46:46 +05:30
KaifAhmad1 1568237ce7 Add high-performance VectorStore ingestion and docs 2026-01-19 13:32:16 +05:30
KaifAhmad1 dd7fcd3ddb [FEATURE] Performance Bottlenecks and Scaling Limitations in semantic_extract #186
- Implemented high-throughput parallel batch processing across all core extractors (NERExtractor, RelationExtractor, TripletExtractor, EventDetector, SemanticNetworkExtractor) using ThreadPoolExecutor.

- Added max_workers configuration parameter (default: 1) to all extractor extract() methods.

- Implemented parallel processing for large document chunking in _extract_entities_chunked and _extract_relations_chunked.

- Enhanced ProgressTracker to be thread-safe.

- Optimized setUpClass in tests to reduce Groq LLM initialization overhead.

- Updated documentation and usage examples.
2026-01-14 00:11:30 +05:30
KaifAhmad1 8c3f7f1f0a fix(semantic-extract): resolve incomplete output #176, relax constraints, and add Groq support 2026-01-12 17:15:21 +05:30
KaifAhmad1 f338b66274 feat: Add provenance metadata and robust fallback chains to semantic extraction
- Implemented ML/LLM -> Pattern -> Last Resort fallback chains for NER, Relation, and Triplet extractors to prevent empty results.
- Added provenance metadata (batch_index, document_id) to all extraction schemas (Entity, Relation, Triplet, etc.).
- Unified batch processing API with progress tracking across all extractors.
- Updated documentation (module usage and reference docs) to reflect new features.
- Added robustness and batch provenance tests.
2026-01-10 20:43:09 +05:30
KaifAhmad1 a5c531fd29 Fix semantic extraction empty returns, schema validation, and update docs 2026-01-09 18:39:09 +05:30
KaifAhmad1 957c122116 docs: add Docling integration guide, clear code example, and fix parser consistency issues 2026-01-08 21:27:48 +05:30
KaifAhmad1 dcd6f25f87 docs: fix KnowledgeGraph mismatch and update tests for issue #144 2026-01-07 15:01:47 +05:30
KaifAhmad1 e712949872 Enhance LLM extraction methods with auto-chunking, robust parsing and improved diagnostics (#149) 2026-01-07 03:03:19 +05:30
KaifAhmad1 d7b686f32a Release v0.1.1: Docling support, version bump, and documentation updates 2026-01-06 00:21:20 +05:30
KaifAhmad1 04eea7e7eb Update documentation: reduce code examples, add cookbook links, improve structure
- Reduced code examples in all guide pages (getting-started, quickstart, concepts, modules, examples, use-cases, learning-more)
- Added comprehensive cookbook links with descriptions (topics, difficulty, time, use cases)
- Improved structure and organization across all guide pages
- Updated use-cases.md to only include use cases with corresponding cookbooks
- Removed 'Last Updated: 2024' from all documentation files
- Enhanced navigation with better 'Next Steps' sections
2025-12-31 15:19:08 +05:30
KaifAhmad1 35391382d3 docs: configure github pages deployment and fix broken links 2025-12-31 12:37:36 +05:30
KaifAhmad1 c3555e0cfd Add LLM providers module and GraphRAG reasoning features
- Add semantica.llms module with Groq, OpenAI, HuggingFace, and LiteLLM providers
- Add query_with_reasoning() method for multi-hop reasoning with LLM-generated responses
- Update ContextRetriever and AgentContext with reasoning capabilities
- Add comprehensive documentation for LLM providers and GraphRAG reasoning
- Update README and docs with new features
- Update notebook examples to use new query_with_reasoning() method
2025-12-27 23:23:32 +05:30
KaifAhmad1 eaa1fbefa6 feat(reasoning): add dedicated reasoning tests and fix critical reasoning bugs
- Added tests/reasoning/ directory with unit and integration tests
- Fixed indentation bug in Reasoner.add_fact for dictionary-based relationships
- Fixed regex variable matching in Reasoner._match_pattern
- Fixed variable handling in SPARQLReasoner query expansion
- Cleaned up cookbook and documentation references
2025-12-23 21:26:26 +05:30
KaifAhmad1 7046c92b3a Merge main and resolve conflicts by prioritizing audited reasoning refactor 2025-12-23 15:24:07 +05:30
KaifAhmad1 1ca83dd3c9 Comprehensive reasoning module cleanup: removed InferenceEngine, updated documentation, and synchronized cookbooks project-wide 2025-12-23 15:14:52 +05:30
KaifAhmad1 a9bd3be689 Update context module docs, cleanup notebook, and refactor context files 2025-12-21 16:50:56 +05:30
KaifAhmad1 1fceb634ae chore: remove 07_Pipeline_Orchestration notebook and all references 2025-12-20 20:18:14 +05:30
KaifAhmad1 5fc188b9eb Refactor: Rename LLMEnhancer to LLMExtraction 2025-12-19 00:16:44 +05:30
KaifAhmad1 38962d3d7a Refactor triplet_store: Unified TripletStore interface, removed Virtuoso/TripletManager, added Blazegraph/Jena/RDF4J support, updated docs and notebooks 2025-12-18 21:37:11 +05:30