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.
Cross-repo system-of-record: /Users/armanisadeghi/code/common-docs/systems/knowledge/rag/STATE.md — read it before touching this feature in ANY repo.
Editing rules for this package: CLAUDE.md · matrx_rag/FEATURE.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_indexingmaterializes 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: /Users/armanisadeghi/code/common-docs/projects/knowledge-system/reality/code-truth/04_ORM_AND_SCHEMA.md.
Package development
See CLAUDE.md for injection seams, test baselines, and the no-aidream-imports rule.
Release files for matrx-rag 0.1.197
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| matrx_rag-0.1.197.tar.gz | 409.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| matrx_rag-0.1.197-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 854.4 kB
Release files / matrx_rag-0.1.197.tar.gz
| Download URL | matrx_rag-0.1.197.tar.gz |
|---|---|
| Size | 409.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fc9f79529ef4732f9b7c7d9d1aa14bb0c57c6f67c81404565f81ed68e4a48e0
|
|
BLAKE2b-256 checksum How to use checksums |
0371d2d2a788e8e27290ebc3f446b1eeb44e104e843bae92f26056b9431f279f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / matrx_rag-0.1.197-py3-none-any.whl
| Download URL | matrx_rag-0.1.197-py3-none-any.whl |
|---|---|
| Size | 445.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2df9a2d2c11ff60cfc46827d874164b68fb9d645855254bbd93dc9d9aebe98c3
|
|
BLAKE2b-256 checksum How to use checksums |
7d499de8824a8b12b9fab84322df813eeb3f9b50889a9c0bdfc66c982f4fe8e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency log