Skip to content

feat(jeparag): add native @magek/jeparag package for hybrid RAG and ambient agents - #807

Open
emezac wants to merge 2 commits into
theam:mainfrom
emezac:feature/jeparag-native-integration
Open

feat(jeparag): add native @magek/jeparag package for hybrid RAG and ambient agents#807
emezac wants to merge 2 commits into
theam:mainfrom
emezac:feature/jeparag-native-integration

Conversation

@emezac

@emezac emezac commented Aug 18, 2026

Copy link
Copy Markdown

Summary

This PR introduces the @magek/jeparag package into the Magek monorepo under packages/jeparag. This PR is related to #808 issue.

@magek/jeparag brings Joint Embedding Predictive Architecture (JEPA) dense vector representations combined with Okapi BM25 sparse keyword retrieval using Reciprocal Rank Fusion (RRF) (k=60).

Key Features

  • DocumentLoader: Sliding window semantic text chunking (256 words, 50 overlap).
  • BM25Index: Pure Okapi BM25 sparse keyword ranking engine.
  • JEPAEmbedder: Multi-provider embedding engine (Google Gemini, OpenAI, L2 normalized hash fallback).
  • ReciprocalRankFusion (RRF): Fusion algorithm combining dense vector and sparse keyword rankings.
  • Event-Sourced Events & ReadModel: DocumentIngestedEvent, ChunkEmbeddedEvent, JeparagQueryProcessedEvent, and JeparagHybridSearchReadModel.
  • JeparagAmbientAgent: Proactive background agent for automated document ingestion, indexing, and contextual hybrid RAG responses.
  • Executable Demo: Included examples/hipaa-audit-demo.ts (rushx demo) demonstrating zero-recall-loss HIPAA compliance auditing.

Verification

  • Unit Tests: npm test in packages/jeparag passed (5/5 passing).
  • Monorepo Build: rush build completed with 100% success across all 16 workspace projects.

@emezac

emezac commented Aug 18, 2026

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant