Skip to main content

Multi-tenant RAG: hybrid retrieval, chunking, embeddings, ingestion, PDF + image + repo pipelines, agent-extraction indexing, priority-aware ranking.

Project description

matrx-rag

Multi-tenant RAG: hybrid retrieval, chunking, embeddings, ingestion, PDF + image + repo pipelines, agent-extraction indexing, NER/KG writes, priority-aware ranking — extracted from aidream/services/rag/ so any host (aidream's cloud server, matrx-local) can consume the same stack.

Documentation hub: docs/rag_and_ner/README.md
(Vision in docs/knowledge/ · code truth in docs/rag_and_ner/reality/ · backlog in 00_CLEANUP.md.)

What it does

  • Ingestion: ingest_source(source_kind, source_id, ...) — chunk → embed → upsert; NER inline for non-code sources.
  • PDF / image / code repo pipelines with provenance.
  • Hybrid search: pgvector HNSW + lexical FTS → RRF → optional Cohere → MMR.
  • Priority-aware ranking: agent-extracted chunks with non-zero priority.
  • Agent-extraction → RAG: extraction_indexing materializes page-extraction payloads as chunks.
  • Data stores: curated buckets with scoped search.
  • Eval harness: retrieval + answer quality assessment.

Host integration

  • aidream wires the package in aidream/package_integration.py::_configure_matrx_rag (NER extractor, embedding cache, ORM models, search callable).
  • aidream/services/rag/ is a re-export shim; HTTP routes live in aidream/api/routers/rag.py.
  • Auto-ingest (gates, budget, scope suggestions) lives in aidream/services/auto_ingest/ — not in this package.

Schema

Migrations: matrx_rag/migrations/ (mirrored in db/migrations/ until package owns the runner).
ORM / pgvector notes: docs/rag_and_ner/reality/04_ORM_AND_SCHEMA.md.

Package development

See CLAUDE.md for injection seams, test baselines, and the no-aidream-imports rule.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matrx_rag-0.1.20.tar.gz (294.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matrx_rag-0.1.20-py3-none-any.whl (309.7 kB view details)

Uploaded Python 3

File details

Details for the file matrx_rag-0.1.20.tar.gz.

File metadata

  • Download URL: matrx_rag-0.1.20.tar.gz
  • Upload date:
  • Size: 294.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for matrx_rag-0.1.20.tar.gz
Algorithm Hash digest
SHA256 bc7604dd92a58dd400beed113ec54399d38828747292be5a69ee8ffc0c6ad8fa
MD5 d54183535075923fc08b60ef7caae92e
BLAKE2b-256 15bc046b56a14f2d26cd60762d8aede22f75595ebd566ff64142b653e339c543

See more details on using hashes here.

Provenance

The following attestation bundles were made for matrx_rag-0.1.20.tar.gz:

Publisher: publish-package.yml on AI-Matrix-Engine/aidream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matrx_rag-0.1.20-py3-none-any.whl.

File metadata

  • Download URL: matrx_rag-0.1.20-py3-none-any.whl
  • Upload date:
  • Size: 309.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for matrx_rag-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 e7a3188d4d1f1f1b8b75564c455916be58a036726bf758083fe16543689a86d9
MD5 0b0897671c615027f96f2136a44511dc
BLAKE2b-256 d38c509dc36b6fde9693578dbadc7b3bb90df46ad80e6a2595261fc47053e96d

See more details on using hashes here.

Provenance

The following attestation bundles were made for matrx_rag-0.1.20-py3-none-any.whl:

Publisher: publish-package.yml on AI-Matrix-Engine/aidream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page