myopenfund-rag-engine 0.1.0__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 (64) hide show
  1. myopenfund_rag_engine-0.1.0/.gitattributes +2 -0
  2. myopenfund_rag_engine-0.1.0/.gitignore +17 -0
  3. myopenfund_rag_engine-0.1.0/CHANGELOG.md +117 -0
  4. myopenfund_rag_engine-0.1.0/LICENSE +21 -0
  5. myopenfund_rag_engine-0.1.0/NOTICE +40 -0
  6. myopenfund_rag_engine-0.1.0/PKG-INFO +714 -0
  7. myopenfund_rag_engine-0.1.0/README.md +674 -0
  8. myopenfund_rag_engine-0.1.0/eval/README.md +536 -0
  9. myopenfund_rag_engine-0.1.0/eval/analytical_v2.jsonl +91 -0
  10. myopenfund_rag_engine-0.1.0/eval/fixtures/corpus.json +223 -0
  11. myopenfund_rag_engine-0.1.0/eval/fixtures/questions.jsonl +13 -0
  12. myopenfund_rag_engine-0.1.0/eval/fixtures/questions_v2.jsonl +13 -0
  13. myopenfund_rag_engine-0.1.0/eval/known_item_v1.jsonl +797 -0
  14. myopenfund_rag_engine-0.1.0/eval/make_known_item.py +1014 -0
  15. myopenfund_rag_engine-0.1.0/pyproject.toml +98 -0
  16. myopenfund_rag_engine-0.1.0/src/rag_engine/__init__.py +47 -0
  17. myopenfund_rag_engine-0.1.0/src/rag_engine/chunking.py +406 -0
  18. myopenfund_rag_engine-0.1.0/src/rag_engine/cli.py +435 -0
  19. myopenfund_rag_engine-0.1.0/src/rag_engine/config.py +467 -0
  20. myopenfund_rag_engine-0.1.0/src/rag_engine/embedding.py +947 -0
  21. myopenfund_rag_engine-0.1.0/src/rag_engine/errors.py +25 -0
  22. myopenfund_rag_engine-0.1.0/src/rag_engine/eval.py +2512 -0
  23. myopenfund_rag_engine-0.1.0/src/rag_engine/eval_check.py +480 -0
  24. myopenfund_rag_engine-0.1.0/src/rag_engine/ingest.py +186 -0
  25. myopenfund_rag_engine-0.1.0/src/rag_engine/py.typed +0 -0
  26. myopenfund_rag_engine-0.1.0/src/rag_engine/schema.py +406 -0
  27. myopenfund_rag_engine-0.1.0/src/rag_engine/search.py +642 -0
  28. myopenfund_rag_engine-0.1.0/src/rag_engine/store.py +978 -0
  29. myopenfund_rag_engine-0.1.0/tests/conftest.py +89 -0
  30. myopenfund_rag_engine-0.1.0/tests/date_corpus.py +326 -0
  31. myopenfund_rag_engine-0.1.0/tests/eval_fixture.py +72 -0
  32. myopenfund_rag_engine-0.1.0/tests/fixtures/golden/README.md +101 -0
  33. myopenfund_rag_engine-0.1.0/tests/fixtures/golden/expected.json +297 -0
  34. myopenfund_rag_engine-0.1.0/tests/fixtures/golden/expected_v2_keys.json +10 -0
  35. myopenfund_rag_engine-0.1.0/tests/fixtures/golden/inflation-report-extract.pdf +0 -0
  36. myopenfund_rag_engine-0.1.0/tests/fixtures/golden/monetary-policy-statement.md +23 -0
  37. myopenfund_rag_engine-0.1.0/tests/integration/test_date_intervals_integration.py +535 -0
  38. myopenfund_rag_engine-0.1.0/tests/integration/test_eval_integration.py +215 -0
  39. myopenfund_rag_engine-0.1.0/tests/integration/test_indexes_integration.py +249 -0
  40. myopenfund_rag_engine-0.1.0/tests/integration/test_ingest_integration.py +165 -0
  41. myopenfund_rag_engine-0.1.0/tests/integration/test_qdrant_reachable.py +19 -0
  42. myopenfund_rag_engine-0.1.0/tests/integration/test_search_integration.py +241 -0
  43. myopenfund_rag_engine-0.1.0/tests/integration/test_store_integration.py +212 -0
  44. myopenfund_rag_engine-0.1.0/tests/search_corpus.py +252 -0
  45. myopenfund_rag_engine-0.1.0/tests/test_analytical_batch.py +156 -0
  46. myopenfund_rag_engine-0.1.0/tests/test_capture_tool.py +72 -0
  47. myopenfund_rag_engine-0.1.0/tests/test_chunking.py +1310 -0
  48. myopenfund_rag_engine-0.1.0/tests/test_cli.py +619 -0
  49. myopenfund_rag_engine-0.1.0/tests/test_config.py +853 -0
  50. myopenfund_rag_engine-0.1.0/tests/test_date_filters.py +825 -0
  51. myopenfund_rag_engine-0.1.0/tests/test_embedding.py +1733 -0
  52. myopenfund_rag_engine-0.1.0/tests/test_errors.py +66 -0
  53. myopenfund_rag_engine-0.1.0/tests/test_eval.py +1248 -0
  54. myopenfund_rag_engine-0.1.0/tests/test_eval_check.py +541 -0
  55. myopenfund_rag_engine-0.1.0/tests/test_eval_v2.py +2128 -0
  56. myopenfund_rag_engine-0.1.0/tests/test_ingest.py +786 -0
  57. myopenfund_rag_engine-0.1.0/tests/test_isolation.py +123 -0
  58. myopenfund_rag_engine-0.1.0/tests/test_make_known_item.py +1123 -0
  59. myopenfund_rag_engine-0.1.0/tests/test_packaging.py +722 -0
  60. myopenfund_rag_engine-0.1.0/tests/test_parity.py +518 -0
  61. myopenfund_rag_engine-0.1.0/tests/test_schema.py +523 -0
  62. myopenfund_rag_engine-0.1.0/tests/test_search.py +1160 -0
  63. myopenfund_rag_engine-0.1.0/tests/test_store.py +2011 -0
  64. myopenfund_rag_engine-0.1.0/tests/test_telemetry.py +163 -0
@@ -0,0 +1,2 @@
1
+ tests/fixtures/golden/* -text
2
+ tests/fixtures/golden/*.pdf binary
@@ -0,0 +1,17 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .venv/
7
+ venv/
8
+ .env
9
+ .pytest_cache/
10
+ .ruff_cache/
11
+ .mypy_cache/
12
+ .coverage
13
+ htmlcov/
14
+ .idea/
15
+ .vscode/
16
+ .DS_Store
17
+ .model-cache/
@@ -0,0 +1,117 @@
1
+ # Changelog
2
+
3
+ All notable changes to rag-engine are recorded here. Versions follow [semantic versioning](https://semver.org).
4
+
5
+ ## 0.1.0 — 2026-11-25
6
+
7
+ First version: ingestion, the two embedding backends, filtered search, and the evaluation of that search.
8
+
9
+ ### Delivered
10
+
11
+ - **Settings** (`rag_engine.config`): `Settings.from_env()` reads the environment when it is called, never at import; every value is validated, and the Qdrant API key is never printed.
12
+ - `RAG_ENGINE_QDRANT_TIMEOUT` (`Settings.qdrant_timeout`, default 60): the seconds a request to Qdrant may take, a positive finite number (an `int` or a `float` in direct construction). `QdrantStore` reads it when it is built from the settings or from the environment; an explicit `timeout=` wins (`QdrantStore(..., timeout=None)` and `from_url(..., timeout=None)` now mean "the one of the settings"). 60 was the built-in constant, `DEFAULT_TIMEOUT`, so nothing changes for a caller that sets neither. qdrant-client counts whole seconds and rounds a fraction up.
13
+ - **Payload schema and point ids** (`rag_engine.schema`): the payload and the deterministic ids the data-orchestrator already writes (schema v1), plus the two derived date keys of schema v2 (see "Date intervals" below). An id is derived from the `doc_id`, the page and the chunk index only.
14
+ - **Qdrant store** (`rag_engine.store`): connection, strict collection check or creation (`ensure_collection`), batched writes that report how many points were written before a failure, authentication refusals reported as `QdrantAuthError`.
15
+ - `QdrantStore.check_collection(name, dim)`: the read-only check of a reader. It raises `CollectionNotFoundError` (a new `StoreError`) when the collection does not exist and never creates it, `CollectionMismatchError` when it is not one unnamed cosine vector of size `dim` (the check and the words of `ensure_collection`, the distance included), `QdrantAuthError` on HTTP 401 or 403, and lets every other error through as the client raised it. A search service calls it once at start; it works with a read-only API key (checked on Qdrant 1.20.0: with such a key `ensure_collection` is refused with HTTP 403 as soon as it has to create). `ensure_collection` is unchanged and is the method of a writer.
16
+ - Documented: `qdrant-client` itself imports `fastembed` when that package is installed, so importing the store in an install with the `onnx` extra loads the ONNX runtime, `huggingface_hub` and `tokenizers`.
17
+ - **Payload indexes** (`rag_engine.schema.PAYLOAD_INDEXES`, `QdrantStore.ensure_payload_indexes`): keyword indexes on `doc_id`, `source_code`, `doc_type`, `language` and `corpus`, an integer index on `year`, a datetime index on `date`. They are what the search filters rely on. The call creates the missing indexes only, can be repeated, works on a collection that already holds points without rewriting any, and refuses with `CollectionMismatchError` a field already indexed with another kind instead of replacing that index. A `date` that is not a full date (`2016-03`, `2016`, empty, null, absent) is never an error; such a point matches no date range.
18
+ - Documented, as checked on Qdrant 1.20: a value an index cannot read leaves the point stored and searchable, but invisible to a filter on that field (a `year` stored as `"2016"` or `2016.5`, a keyword field stored as a number); the date forms the datetime index reads and those it does not; the value types to check before indexing an existing collection.
19
+ - Documented: the returned list names the fields a create call succeeded for (concurrent callers may each report all of them; local mode always does), and the `points` count of an index is not a check to read right after the creation — count through a filter.
20
+ - Corrected: the documentation said that Qdrant refuses `2016` or `2016-03` as a date bound. The REST API does (HTTP 400); through the Python client `"2016-03"` is a validation error of the client, and `"2016"` is accepted and read as a Unix timestamp (`1970-01-01T00:33:36Z`). `rag_engine.search` accepts only a `datetime.date` or `YYYY-MM-DD` for that reason.
21
+ - **Embedders** (`rag_engine.embedding`): the `Embedder` interface, the PyTorch backend (`TorchEmbedder`, extra `torch`), the ONNX backend (`OnnxEmbedder`, extra `onnx`: fastembed on the ONNX runtime, without PyTorch), and a deterministic `FakeEmbedder` for tests. The passage and query prefixes of the model are applied in one place.
22
+ - **Pinned and verified ONNX model**: `ONNX_MODELS` pins the ONNX export of `intfloat/multilingual-e5-base` to one Hugging Face revision (`d128750597153bb5987e10b1c3493a34e5a4502a`), with the size and the SHA-256 of every file loaded for the model (`OnnxModel.files`: `onnx/model.onnx`, `config.json`, `special_tokens_map.json`, `tokenizer.json`, `tokenizer_config.json`) — the files parity was measured with; the tokenizer decides the vectors as much as the weights do. `OnnxEmbedder` fetches that revision itself (`huggingface_hub.snapshot_download`) and hands the directory to fastembed; with the files in the model cache it makes no request to the Hub. Before the model is built every one of these files is hashed and compared with the table (the four small files at every load; the ONNX file, about one second, once per process for the same path, size and modification time): a different file raises `ModelIntegrityError`, naming the file and both hashes. A model of the table is always loaded from the table, even if fastembed lists the same name; a model only fastembed lists is used as before, with a warning that its files are not pinned or verified. When the files cannot be downloaded, `ModelDownloadError` says which files, from where, and that `RAG_ENGINE_MODEL_CACHE` can point at a directory filled beforehand. Both errors derive from `RagEngineError`.
23
+ - The tokenizer and configuration files are hashed every time an `OnnxEmbedder` is built. They were hashed once per process for a given path, size and modification time, like the ONNX file: a small file altered in place, with the same size and its modification time put back, was accepted by a second embedder of the same process. Only the hash of the 1.1 GB ONNX file is still kept.
24
+ - Documented, in the README and on `OnnxEmbedder`: the check protects against a changed or damaged download and against another export or tokenizer than the one parity was measured with; it does not protect against someone who can write to the model cache while the service runs. On a server the model cache is a dedicated directory, set with `RAG_ENGINE_MODEL_CACHE` and mounted read-only for the service once filled; unset, it is a directory under the system's temporary directory.
25
+ - **ONNX backend on CPU, with a thread setting**: the session is created with the CPU execution provider only. New setting `RAG_ENGINE_ONNX_THREADS` (`Settings.onnx_threads`, default unset: the ONNX runtime decides), passed by `make_embedder` to `OnnxEmbedder(threads=...)`; in a container with a CPU limit, set it to the limit.
26
+ - **Backend parity**: `RAG_ENGINE_BACKEND=onnx` is meant for a service that embeds search queries against passages embedded with `torch`. A test (marker `models`, CI job `parity`) compares the two backends on 50 fixed multilingual texts and on a small search; it fails below `RAG_ENGINE_PARITY_MIN` (new setting, default 0.999). Measured for `intfloat/multilingual-e5-base`: minimum cosine above 0.99999999 for passages and for queries, identical top-5 rankings. `rag_engine.embedding.cosine_parity` is the measure. The test runs through the pinned and verified files, checks that a copy with one byte changed, in the ONNX file or in `tokenizer.json`, is refused before any inference, and the CI job keys its model cache on the pinned revision and has a time limit.
27
+ - **Chunking** (`rag_engine.chunking`): `chunk_file` for PDF, DOCX, XLSX, CSV, PPTX, TXT and MD (extra `ingest`), with an explicit OCR mode (`auto`, `always`, `never`), explicit OCR languages and explicit chunker options.
28
+ - **Ingestion** (`rag_engine.ingest`): `ingest_document` chunks one file, embeds its chunks and writes one point per chunk. For the same file and metadata it writes exactly the points the previous pipeline wrote (ids, payloads, vectors): a golden fixture captured from that pipeline pins it.
29
+ - **Search** (`rag_engine.search`): `search(query, *, collection, store, embedder, filters=None, limit=None, max_limit=None, normalize_query=True)` embeds the query and returns the closest chunks as `Hit` objects, best first, in one request (`QdrantStore.query`).
30
+ - `SearchFilters`: `source_codes`, `doc_types`, `languages`, `doc_ids` (lists), `date_from`, `date_to`, `corpus`. Fields are combined with AND, the values of a list with OR. Checked at construction: a bare string instead of a list and an empty list are refused (`None` is "no restriction"); an unknown value simply returns nothing.
31
+ - Dates: both bounds inclusive, whole days in UTC; the upper bound is sent as "before the next day", so a document stored with a time of day stays in its day. A bound is a `datetime.date` or a `YYYY-MM-DD` string and nothing else: `"2016"` or `"2016-03"` raise a `SearchError` instead of reaching qdrant-client, which reads `"2016"` as a Unix timestamp. A chunk without a full `date` is left out as soon as a bound is set.
32
+ - `limit` defaults to 10 and may not exceed `max_limit` (default 50): above it the search is refused with an error naming the maximum, never capped silently. `search` reads no settings; the caller passes `settings.search_limit` and `settings.search_max_limit`.
33
+ - The query is put in Unicode NFKD before it is embedded (`normalize_query=True`), the form the chunker stores and embeds the chunks in. Checked on the tokenizer of `intfloat/multilingual-e5-base`: no effect in French, German, Spanish or Greek; in Japanese (voiced kana), Korean and Vietnamese only the NFKD query is cut into the tokens of the stored passages.
34
+ - A query must hold at least one letter, number, symbol or punctuation mark (Unicode categories L, N, S, P), as given and once normalised: a query made only of combining marks, zero-width, format or control characters is refused ("the query has no searchable character"). Numbers, symbols and tickers (`2016`, `€`, `$AAPL`) and punctuation alone (`???`) are accepted.
35
+ - A string that cannot be encoded as UTF-8 (a lone surrogate, which a JSON escape such as `"\ud800"` gives) is refused with a `SearchError` naming the field — a filter value, `corpus`, the query or the collection — instead of failing later inside the Qdrant client.
36
+ - `Hit`: `text`, `score`, `doc_id`, `title`, `date`, `source_code`, `doc_type`, `language`, `page` (`None` without pages), `chunk_number`, `corpus`, plus `point_id` and the full `payload`; `to_dict()` for JSON.
37
+ - `SearchFilters.from_mapping(mapping)`: the filters of a JSON-like mapping, as a tool of an MCP server or a question file provides them. A missing key and a `None` value are "not set"; a key that is not a field raises a `SearchError` naming every unknown key and listing the fields, where `SearchFilters(**mapping)` raises a bare `TypeError`; the values are checked as the constructor checks them. The evaluation reads the filters of a question with it (same messages as before).
38
+ - **Search evaluation** (`rag_engine.eval`): `load_questions(path)` reads a JSON Lines question file (`id`, `question`, `expected_doc_ids`, optional `filters` with the field names of `SearchFilters`, optional `kind`, `tags`, `language`, `rationale`) and checks it strictly: a duplicate id, an empty `expected_doc_ids`, an unknown field or filter, a bad date, a question that holds nothing to search for once put in NFKD raise an `EvalError` naming the line. `evaluate(questions, *, collection, store, embedder, k=10, chunk_limit=50, max_limit=None, normalize_query=True, bootstrap_resamples=1000, interval_min_documents=20)` runs the search for every question and returns an `EvalReport`; `format_report` prints it, `to_dict()` / `to_json()` hold every detail.
39
+ - Scoring is on documents: `chunk_limit` chunks are asked for and collapsed into documents, each at the place of its best chunk; the metrics look at the first `k`. Per question: the rank of the best-placed expected document, hit@1, hit@k, the reciprocal rank (0 beyond `k`), recall@k. The misses come with the three best documents returned and their titles.
40
+ - Aggregates (`Aggregate`), per `kind`, per tag, for the headline and for all questions pooled: the number of questions and of distinct expected documents, the means over the questions, and the means over the documents (`per_document`: the questions of one document averaged first), since the questions of one document are correlated.
41
+ - Intervals: the kinds and the headline get a 95% interval of the per-document hit@1, hit@k and MRR, from resampling the documents with replacement (standard library `random`, fixed seed `BOOTSTRAP_SEED`, `bootstrap_resamples` draws). A group with fewer than `interval_min_documents` documents gets none and is marked `few_documents`.
42
+ - Headline: `EvalReport.headline` is the kinds asked without filters, per document; a kind with a question that carries filters is a filtered kind (`filtered_kinds`), kept out of it, because filters that leave fewer than `k` documents make hit@k and recall@k true by construction. `EvalReport.overall` stays the pooled mean of all scored questions and is labelled as such. The text report prints the kinds first, then the headline, then the pooled line, with a legend; rates to two decimals, exact values in the JSON.
43
+ - Equal scores: the chunks returned are ordered by score, `doc_id` and `chunk_number` before they are collapsed, so the same chunks always give the same ranking; a question whose hit@1 or hit@k hangs on the order of documents of exactly the same score is marked `tied_at_decision`, and the report counts them. Ties at the edge of the chunk budget remain Qdrant's choice.
44
+ - `chunk_limit` may not exceed the search maximum (refused, not lowered), nor `k` exceed `chunk_limit`. When the chunks hold fewer than `k` documents the report counts the questions concerned, and those among them that used the whole chunk budget.
45
+ - A question none of whose expected documents is in the collection is reported under `not_in_collection` and left out of the metrics instead of being counted as a miss; partially absent documents are listed, and recall counts the documents present. The lookup is one batched pass before any search: new `QdrantStore.existing_doc_ids(collection, doc_ids)`.
46
+ - The report records what it ran with: collection, `k`, `chunk_limit`, model, backend, query prefix and normalisation, the path and SHA-256 of the question file, the resampling parameters, the engine version.
47
+ - `rag_engine.search.is_searchable(text, *, normalized=False)`: the rule of a query (one letter, number, symbol or punctuation mark), as given or in its NFKD form, as a public function; the harness uses it instead of a private name.
48
+ - Fixed: the line of the text report that names the question file is cut so that the whole line fits 110 characters, keeping the end of the path (the file name) after an ellipsis. It used to cut the path alone to 110 characters, from its end: with a long path the line exceeded the width of the report and lost the file name.
49
+ - **Command line** (`rag_engine.cli`, console script `rag-engine`): `rag-engine eval --questions FILE --collection NAME [--k 10] [--chunk-limit 50] [--backend torch|onnx] [--output report.json] [--fail-under-hit-at-k X] [--bootstrap-resamples 1000] [--allow-empty]` builds the store and the embedder from the environment (`Settings.from_env()`), prints the report and optionally writes it as JSON. Exit code 0; 1 when `--fail-under-hit-at-k` is given and not met; 2 when the evaluation could not run (arguments, settings, question file, unreachable server, missing collection or backend, a collection of another dimension or with named vectors, a collection without any expected document, a failure midway). `rag-engine --version`.
50
+ - `--fail-under-hit-at-k` looks at the headline (the kinds asked without filters, per document), not at the pooled mean.
51
+ - The dimension of the collection is checked against `RAG_ENGINE_DIM` before the embedding model is loaded; a collection with named vectors is refused with a message that says so.
52
+ - A collection that holds none of the expected documents is an error (exit code 2) instead of an empty report with exit code 0; `--allow-empty` runs the evaluation all the same, with a warning.
53
+ - The collection check of the command is `QdrantStore.check_collection`. It now also refuses a collection whose distance is not cosine (Dot, Euclid, Manhattan), with a message that names the distance found, exit code 2: the copy of the check the command had did not look at the distance, and reported scores that were not cosines.
54
+ - Documented: `RAG_ENGINE_MODEL_CACHE` in the README section of the command, and the download of about 1.1 GB on the first run with the `onnx` backend.
55
+ - **Analytical questions**: `eval/analytical_v2.jsonl`, 91 questions on the content of the policy core (72 answerable, 4 with a false premise, 15 the corpus cannot answer), each checked against the documents; 424 documents named; 184 requirements, 94 of them either-of groups. A fact that several documents state is an either-of group of all the documents found to state it (the £895 billion target of `an-23`: thirteen documents), `must_not_include` holds, for a scored question, only statements the documents show to be false (for a question the corpus cannot answer: the answer from memory, which must not be asserted from the corpus), and the rationales claim no exclusivity over the corpus; `eval/README.md` lists the four questions that the one-group-per-document rule leaves stricter than the documents (`an-26`, `an-29`, `an-38`, `an-48`). The texts read were those of the live catalogue URLs, not the ingested copies; there was one verification pass and an independent second check of 16 questions. `eval/README.md` gives the measured limits of the batch (87 questions name the bank, 65 give a year; two (bank, doc type) cells and the years before 2003 never appear in a requirement; 65 pairs of questions share a required document) and says which numbers to read.
56
+ - Twelve of the fifteen questions that abstain (`an-71` to `an-82`) have a true answer that the collection does not carry: five on a central bank that is not in it (tag `absent-bank`: Riksbank, Czech National Bank, Bank of Korea, Swiss National Bank, Norges Bank) and seven on a period or a document missing for a bank that is (tag `coverage-gap`: Bank of Japan, Bank of Canada, Bank of England, Federal Reserve); two are French. A bank outside the collection is not enough, since another bank's minutes can report its decision (`an-55`, `an-57`): the questions ask for a named dissenter, a vote split, the argument of a paragraph or a cell of a table. Each rationale gives the true answer and the address of its source on the bank's own site. The absence was checked in the manifests and in the text of 773 of the 2,566 documents of the scope (for each question, the minutes, accounts, reports and press-conference documents of the six banks for the month of the fact and the two that follow: 177 documents); the other 1,793 were not read, and `eval/README.md` says so.
57
+ - **Question files** (`eval/`, kept in the source distribution, not in the wheel): `eval/known_item_v1.jsonl`, 797 automatic known-item questions on the policy core of the central-bank corpus (PDF documents of types A1, A2, A3, B1, E1, F1 of six central banks; 12 documents per bank and doc type, a stratified sample whose averages are per cell, not corpus-weighted; all documents are English, so the French questions measure cross-lingual retrieval). `eval/make_known_item.py` (standard library only) builds it from the corpus manifests, deterministically for a seed.
58
+ - Four kinds: `title` (a real title, the wording of the bank), `label` (a catalogue label made by the scraper, told by its ISO date: 158 of the 194 titles of the sample), a description by bank, type and date in English and in French, and that description with filters.
59
+ - The words of a doc type are a table per (bank, doc type), with a default per doc type: the ECB documents of type B1 are the combined decisions and statement, not transcripts; its E1 documents are staff projections; the E1 of the Federal Reserve is the Monetary Policy Report of the Board to the Congress.
60
+ - What a date is the date of is a table per (bank, doc type) (`meeting`, `publication`, `period`, `unknown`), with its evidence in `eval/README.md`; the wording follows it (`… of 20 June 2012`, `…, published in October 2025`), in natural French as well, and every question is tagged `date-meaning:`. A date is never stated more precisely than the manifest knows it (a date on 1 January is read as a year, a first of the month as a month).
61
+ - No French question is a French prefix on an English title: a document that only its title describes has an English description only.
62
+ - Equivalent documents: a question about an ECB decision or statement also expects the combined document of the same day, and a question about the combined document its parts, in every kind; the `doc_types` filter of `described+filters` admits the types of every expected document. 72 questions are concerned.
63
+ - Every `described+filters` question is tagged with the number of documents of the scope that pass its filters (`filter-candidates:1`, `2-3`, `4-10`, `>10`): for 183 of the 210 at most ten pass, so only hit@1 and MRR are informative for that kind.
64
+ - Every document that fits an ambiguous question is expected, or the question is left out.
65
+ - `eval/fixtures/` holds a 13-document corpus and 13 questions on which the test suite checks the exact metrics, among them a tie of two documents of the same score. See `eval/README.md`.
66
+ - **Question format v2** (`rag_engine.eval`): seven optional fields, for questions on the content of the documents. A file that uses none of them is read and scored exactly as before: same results, same text report, and every key of the JSON report keeps its name, its value and its place (keys were added, none changed).
67
+ - `expected_behavior`: `"answer"` (the default), `"correct_premise"` or `"abstain"`. `essential_ids` and `acceptable_ids`: two lists of documents without a common one; `expected_doc_ids` is then the two together, may be left out, and if given must name the same documents in any order (an `EvalError` with the line otherwise). `expected_doc_ids` may be empty only for a question that abstains. `must_include`, `must_not_include`: lists of non-blank strings. `run_unfiltered`: a boolean, `true` only on a question with filters. Unknown fields are still refused. `Question` exposes all of them.
68
+ - `essential_any_of`: groups of documents that carry the same fact; the answer needs any one document of each group. A *requirement* is one document of `essential_ids` or one group (`Question.requirements`), satisfied when one of its documents is among the first `k`; a requirement whose documents are all absent from the collection is left out. A document is in one group at most and in neither of the two other lists; the members of the groups are expected documents. Per result: `essential_any_of`, `requirements_present`, `requirements_satisfied`. A question states its essential documents as soon as one of `essential_ids`, `essential_any_of` and `acceptable_ids` is present, even as an empty list: `"essential_any_of": []` alone means what `"essential_ids": []` alone means.
69
+ - The loader also refuses a key given twice in one object, a document id with a space before or after it, a text in both `must_include` and `must_not_include`, and a `kind` that ends with `#unfiltered`.
70
+ - `must_include` and `must_not_include` are **carried, not scored**: the engine returns documents and writes no answer. They are validated and written for each question in the JSON report, so that one file serves this harness and a scorer of the answers a client generates.
71
+ - Essential metrics: per question `essential_recall_at_k` (the share of its requirements satisfied among the first `k`) and `all_essential_at_k`; `None` for a question that does not state its essential documents or has no requirement to look for, and such a question is left out of the means, not counted as zero. Every aggregate carries them (`Aggregate.essential`, an `EssentialAggregate`): `all_essential_at_k`, **always the share of questions** (with `all_essential_questions`), `essential_recall_at_k` as the mean over the questions, `pooled_essential_recall_at_k` over the requirements (`requirements_satisfied` / `requirements`), and on the kinds and the headline `question_intervals`, 95% intervals from resampling the questions (at least `interval_min_questions` of them, default 20, a new argument of `evaluate`). The text report prints these, each defined in one line of its legend. `per_document`, `intervals` and `few_documents` are kept in the JSON report with their first meaning (means over the documents of the requirements, where a question counts once per document) and are no longer printed. hit@1, hit@k, MRR and recall@k are unchanged and look at the expected documents, essential and acceptable alike: an acceptable document at rank 1 is a hit.
72
+ - A question with more requirements than `k` can never have them all among the first `k`: it is marked (`essential_unreachable`), counted per group and in the summary, and listed in the text report. `k` is bounded by `chunk_limit`, itself by the search maximum.
73
+ - Per question next to per document: in a report of the second version, the first table is followed by the same lines as means over the questions, with a legend that says which to read, and by the questions that expect more documents than `k` (`expected_beyond_k` per result and in `summary`): their recall@k cannot reach 1. A first table wider than 110 characters puts its intervals on a line of their own.
74
+ - `run_unfiltered`: the question is scored a second time without its filters. The second result is kept in `EvalReport.unfiltered_reruns` under `<id>#unfiltered`, in a kind of its own (`<kind>#unfiltered`) that is asked without filters and therefore in the headline, with the tags of its question and `unfiltered-rerun`. It is not counted in the kind of its question, nor in `overall`, which counts each question once. `EvalReport.filter_effect` and a table of the text report compare the two runs of these questions (hit@1, hit@k, MRR, essential recall).
75
+ - A question that abstains is searched, never scored, and left out of every mean, of the headline, the kinds, the tags and the behaviours, whether it lists documents or not. The documents it lists are context documents (`acceptable_ids`, or `expected_doc_ids` alone); an essential document or a group on such a question is an `EvalError` with the line. `EvalReport.abstentions` gives the first document returned, its score, the number of documents ranked at or above each of `score_levels` (new argument of `evaluate`, default `DEFAULT_SCORE_LEVELS` = 0.7, 0.75, 0.8, 0.85, 0.9; `--score-levels` on the command line), and how many of the context documents are among the first `k` (`context_doc_ids`, `absent_context_doc_ids`, `context_at_k`). `EvalReport.top_scores` gives the lowest, median and highest top score of the scored questions, to compare with. No threshold is applied and nothing passes or fails. A `correct_premise` question is scored on its documents like any question; `EvalReport.by_behavior` gives one aggregate per expected behaviour that is scored, and the table of the text report keeps a line for `abstain` with its count.
76
+ - JSON report, added keys: `metrics.by_expected_behavior`; `essential` in every aggregate; `unfiltered_reruns`, `filter_effect`, `abstentions` at the top; `unfiltered_reruns`, `abstentions`, `essential_unreachable` in `summary`; `score_levels` in `parameters`; per result `expected_behavior`, `essential_ids`, `acceptable_ids`, `must_include`, `must_not_include`, `essential_present`, `essential_recall_at_k`, `all_essential_at_k`, `essential_unreachable`, `rerun_of`, `essential_any_of`, `requirements_present`, `requirements_satisfied`, `expected_beyond_k`; `interval_min_questions` in `parameters`; `expected_beyond_k` in `summary`; in every `essential`: `all_essential_questions`, `requirements`, `requirements_satisfied`, `pooled_essential_recall_at_k`, `question_intervals`, `few_questions`; per abstention `context_doc_ids`, `absent_context_doc_ids`, `context_documents_at_k`.
77
+ - `rag-engine eval` no longer refuses, as "the wrong collection", a file whose questions all abstain, with or without context documents.
78
+ - **`rag-engine eval-check`** (`rag_engine.eval_check`): `rag-engine eval-check --questions FILE [--manifests GLOB ...] [--doc-types TYPE ...] [--mime TYPE ...] [--k 10]` checks a question file without any collection, model or setting. It prints the questions per kind, tag, expected behaviour and language, how many carry filters and are scored again without them, how many abstain, how many scored questions have how many requirements and expected documents, the question texts used twice (their number and the first ten), the kinds that mix questions with and without filters (such a kind is kept whole out of the headline), and the questions with more requirements, or more expected documents, than `k`. Its first line is cut to 110 characters whatever the path of the file. With `--manifests` (JSON Lines catalogue files with `doc_id`, `mime_type`, `doc_type`), every document named is looked up and the missing ones are listed with the questions that name them; `--doc-types` and `--mime` also report the documents outside the scope that was ingested. Exit code 0, or 2 for a file that breaks a rule, a document not found, an unreadable manifest. `check_questions`, `load_catalogue` and `format_check` are the functions behind it.
79
+ - `eval/fixtures/questions_v2.jsonl`: 13 questions on the fixture corpus that use every new field, with exactly known values (an acceptable document first, thirteen essential documents for `k = 10`, filters that leave an essential document out, two either-of groups, two second runs, a premise to correct, abstentions with and without context documents).
80
+ - **No telemetry from the ONNX runtime by default.** onnxruntime (1.32.0, official Linux wheel) sends telemetry unless told otherwise: its import creates a device identifier and an event store under `$HOME/.cache/Microsoft/DeveloperTools/.onnxruntime/` and connects to `mobile.events.data.microsoft.com:443`. It reads `ORT_DISABLE_TELEMETRY` when it is imported, not when a session is created. `import rag_engine` now sets `ORT_DISABLE_TELEMETRY=1` when the variable is not set (`os.environ.setdefault`: a value the user gave, `0` included, is kept), before any module of the engine can import the runtime, and the `onnx` backend sets the same default before it imports fastembed. Measured behind a proxy that refuses and records every request, with a complete model cache: four `CONNECT` to that host in 75 seconds with the variable forced to `0`, none with the default of the engine, and nothing written under `$HOME`. A process that imports `qdrant_client` (which imports `fastembed` when it is installed), `fastembed` or `onnxruntime` before `rag_engine` is not covered, and a tool that sorts imports alphabetically produces that order: `import rag_engine` then warns once (`RuntimeWarning`, when `onnxruntime` is already loaded and the variable is not set), and a service should export the variable, and `HF_HUB_OFFLINE=1` once its model cache is filled. The tests of the repository set the variable themselves (first statement of `tests/conftest.py`, and the `env` of the CI workflow): their helper modules imported `qdrant_client` before the engine, and with the `onnx` extra installed a test run left the telemetry on.
81
+ - **Errors** (`rag_engine.errors`): every exception class of the engine derives from `RagEngineError`: `ConfigError`, `StoreError` with `QdrantAuthError`, `CollectionMismatchError` and `CollectionNotFoundError`, `UnsupportedFormatError`, `SearchError`, `EvalError`, `ModelIntegrityError` and `ModelDownloadError`. `ConfigError`, `UnsupportedFormatError`, `SearchError` and `EvalError` are also `ValueError`. The README lists them with the module and the case of each, and, for a caller that builds a service, the errors that are not `RagEngineError`: the `UnexpectedResponse` of the Qdrant client (404 for a missing collection, 400 for a vector of another dimension, 422 for a name the server does not accept, as answered by Qdrant 1.20.0), its `ResponseHandlingException` for a server that cannot be reached, `ImportError` for a missing extra, `RuntimeError` for an embedder used after `release()`.
82
+ - **Packaging**: light base install (`qdrant-client>=1.10`, the first release with the query API; `numpy`), optional extras (`fastembed` bounded to the minor version the parity test passed on, `>=0.9,<0.10`), `py.typed` marker, `__all__` in every module, console script `rag-engine`. The package root exposes `__version__` only.
83
+ - The guarantee on imports is stated as what the engine controls: its modules import no embedding backend and no parser at import time, and `torch` is never imported unless the torch backend is built. `qdrant-client` itself imports `fastembed` when that package is installed, so the former wording ("no heavy dependency is loaded") was false in an install with the `onnx` extra, and the test of it failed there. The test now records who imports what: it fails when a module of the engine imports a backend or a parser, when `torch`, `sentence-transformers` or a parser is loaded at all, or when `fastembed` is loaded by anything but `qdrant-client`; it passes in the light, `ingest` and `torch,onnx` installs.
84
+ - `onnx` extra: `huggingface_hub>=0.20` is declared. The ONNX backend imports it (`snapshot_download`) and only received it through fastembed; 0.20 is the lower bound of fastembed 0.9 and has every argument the backend uses.
85
+ - `torch` extra: `sentence-transformers>=6,<7`, the major version parity was measured on (6.3.0). It was unbounded although the stored vectors depend on it. The bound admits 6.0.0 to 6.3.0 and later 6.x releases, and leaves out 5.x (up to 5.7.0, August 2026) and 7.x: an environment that still holds 5.x is upgraded when the extra is installed. Raise it only after `pytest -m models` has passed on the new version. The cache directory is passed as `cache_folder`, the name `SentenceTransformer` takes in 6.0 as in 6.3; a test of the real model checks that loading through it reports nothing deprecated.
86
+ - Tests: the suite no longer reads the settings of the host (`QDRANT_*`, `RAG_ENGINE_*`, `ENABLE_OCR`, `TESSDATA_PREFIX` are taken out of the environment for the run; `RAG_ENGINE_IT_QDRANT_URL`, `RAG_ENGINE_IT_QDRANT_API_KEY`, `RAG_ENGINE_MODEL_CACHE` and `RAG_ENGINE_PARITY_MIN` reach the tests of their marker only), so a `QDRANT_PORT=abc` of the developer breaks nothing. It no longer depends on the order of the tests: two identical searches are compared on ids and order exactly and on scores within 1e-6, because qdrant-client's local mode answers the first query of a fresh collection about 1e-8 away from the later ones. The test of an altered ONNX file removes its 1.1 GB copy when it ends instead of leaving it in pytest's temporary directory for three runs.
87
+
88
+ - **Date intervals: payload schema v2** (`rag_engine.schema`, `rag_engine.search`, `rag_engine.store`). A document known to the month or to the year only (stored at the first day of its period, with `date_precision`) is now found by any date range that touches its period, and a search can ask for the undated documents.
89
+ - **Payload.** `build_payload`, and therefore `ingest_document`, writes two more keys when the metadata holds a readable `date`: `date_start` and `date_end`, derived from `date` and `date_precision` by `date_interval` (`day`: the day; `month`: the first to the last day of the month; `year`: 1 January to 31 December; absent, null or any other value: a day). Both are RFC 3339 strings at midnight UTC, and `date_end` is the last day itself, included. They come after every key of version 1, whose values and order do not change. A document without a readable date gets neither. `date_precision` and `date_kind` are ordinary metadata, copied as given. New names: `PAYLOAD_SCHEMA_VERSION` (2; the name of the layout, not stored in the points), `DERIVED_KEYS`, `DATE_PRECISIONS`, `date_interval`, `date_interval_fields`.
90
+ - **Indexes.** `PAYLOAD_INDEXES` gains datetime indexes on `date_start` and `date_end`; `ensure_payload_indexes` creates them on a collection that does not have them, without rewriting a point.
91
+ - **Search.** New parameter `date_filter_mode` of `search` (setting `RAG_ENGINE_DATE_FILTER_MODE`, `Settings.date_filter_mode`): `interval` keeps a chunk when `date_start <= date_to` and `date_end >= date_from`, or when its `date` is in the range; `legacy` is the filter on `date` sent until now, unchanged; `auto`, the default, is `interval` on a collection where `date_start` and `date_end` are both indexed and `legacy` on any other. The store reads the payload schema of the collection (`QdrantStore.has_date_intervals`, one read request) and keeps the answer for `date_filter_refresh` seconds (parameter of `search`; setting `RAG_ENGINE_DATE_FILTER_REFRESH`, default 300; `0` asks every time), so a collection upgraded while a service runs is followed within that time, without a restart. Each change of mode is logged once. A search without a date bound sends no extra request.
92
+ - **Nothing is lost on a collection that is half upgraded.** The interval filter keeps the legacy condition as a second way in, so a chunk that has a `date` and no interval yet passes as before. For every range and whatever part of a collection has its intervals, the chunks the legacy filter returns are returned.
93
+ - **Undated documents.** `SearchFilters.include_undated` (default `False`; a strict boolean, accepted by `from_mapping`): with a date bound, the chunks without any readable date pass too, in both modes. Without a bound it changes nothing.
94
+ - **`QdrantStore.set_payload(collection, doc_id, fields)`** sets payload keys on every point of a document and returns their number (0, and no write, for a document without points). No vector is sent, read or rewritten. A `None` removes the key. The reserved keys (`doc_id`, `filename`, `chunk_number`, `ingestion_date`, `text`, `page`) are refused with `ReservedKeyError`, a new `StoreError` that is also a `ValueError`. It must not run alongside an ingestion of the same document (it counts, then writes).
95
+ - **A date is changed with `date_fields`.** `rag_engine.schema.date_fields(date, date_precision=None, *, year=...)` returns the four keys a search reads (`date`, `date_precision`, `date_start`, `date_end`: `DATE_KEYS`) and `year` when it is given. `set_payload` refuses, with `DateFieldsError` (a `StoreError` and a `ValueError`), a call that sets one of the four without the others or an interval that is not the one of the date and precision of the same call: written apart, they left a document found under a date it no longer had. `date_fields(None)` withdraws a date and its interval. `year` is neither derived nor checked; left out, the points keep theirs.
96
+ - **`auto` adds no failure point.** When the read of the collection fails or times out, a search with a date bound is sent with the last answer known for the collection, or with the legacy filter; one WARNING per change of state; the read is tried again after `date_filter_retry` seconds (parameter of `search`; setting `RAG_ENGINE_DATE_FILTER_RETRY`, default 30). `QdrantStore.uses_date_intervals` is that reading; `has_date_intervals` raises.
97
+ - **Strict mode.** A collection that refuses a filter on a field without an index (HTTP 400) raises `MissingIndexError`, a new `StoreError` that names the field and `ensure_payload_indexes`, from `set_payload`, `query` (a search forced to `interval` mode without the two indexes) and `existing_doc_ids`.
98
+ - **Documented:** the engine's reader of `date` is not the one of Qdrant; the supported input is `YYYY-MM-DD`, a date with a time counts for its UTC day, and the few forms one reads and the other does not are listed in the README.
99
+ - **Tests.** A dated corpus with adversarial documents (a year document at the edge of a range, a month document and a one-day range inside it, a garbage precision, datetime strings with offsets, every way of having no date), several hundred ranges and an oracle in plain Python, in local mode and on a real Qdrant 1.20, on collections of version 1, version 2, half upgraded and unindexed; an upgrade step by step under a running reader, with the vectors compared byte for byte. The golden capture of the previous pipeline (`expected.json`) is unchanged; `expected_v2_keys.json` pins the two keys added to its points.
100
+ - **What a caller of an earlier commit sees.**
101
+ 1. Every payload written from now on has `date_start` and `date_end` when its metadata has a readable `date`. `Hit.payload` shows them; no field of `Hit` changes.
102
+ 2. Metadata that sets `date_start` or `date_end` is refused by `build_payload` and `ingest_document` with a `ValueError` (they were copied like any other key).
103
+ 3. `ensure_payload_indexes` creates two more indexes and returns their names: `['date_start', 'date_end']` on a collection that had the seven earlier ones, where it returned `[]`.
104
+ 4. Once those two indexes exist on a collection, a search with a date bound in the default mode uses the intervals. Results can only grow: the month and year documents whose period touches the range. `date_filter_mode="legacy"` keeps the earlier answers exactly.
105
+ 5. A search with a date bound in the default mode reads the collection info once per `date_filter_refresh` seconds: one more read request. If that read fails (a store double that has no `get_collection`, a server error, a timeout), the search is sent with the legacy filter and a warning is logged. `date_filter_mode="legacy"` or `"interval"` sends the query alone, as before.
106
+ 6. `SearchFilters` has one more field, `include_undated`, the last one: `dataclasses.asdict`, `fields` and the message of an unknown filter list it; `FILTER_FIELDS` of the evaluation too. A question file may use it; a report shows it only when it is `true`, so the reports of the existing question files are byte for byte the same.
107
+ 7. `Settings` has three more fields (`date_filter_mode`, `date_filter_refresh`, `date_filter_retry`) and three more variables; an invalid value is a `ConfigError` like any other.
108
+ 8. Unchanged: point ids, vectors, every earlier payload key and its order, the signature and defaults of every earlier argument of `search`, `SearchFilters`, `ingest_document` and `QdrantStore`, and the answers of a search on a collection that has no index on `date_start` and `date_end`.
109
+
110
+ ### Differences from the previous engine
111
+
112
+ For a valid document and valid metadata the points written are the same. What differs:
113
+
114
+ - **OCR languages are explicit.** The previous engine used every language found in the tessdata directory. The languages are now a value the caller passes (`ocr_languages`, from `RAG_ENGINE_OCR_LANGUAGES`, default `eng`). To keep the previous result on a host with several languages installed, list them, for example `eng+fra`.
115
+ - **Invalid UTF-8 is replaced, not dropped.** In a `.txt` or `.md` file, each invalid byte sequence becomes `�` (U+FFFD) and a warning is logged; the previous engine dropped those bytes silently. The chunks that contain such bytes differ from the ones ingested before.
116
+ - **OCR switches are read at each call.** `ENABLE_OCR` and `TESSDATA_PREFIX` are read each time a file is chunked; the previous engine read `ENABLE_OCR` once, at import. With `ocr="always"`, a `TESSDATA_PREFIX` set to the parent of a `tessdata` folder is now corrected too, whatever `ENABLE_OCR` says.
117
+ - **Reserved payload keys in the caller's metadata are refused.** Metadata that sets `filename`, `chunk_number`, `ingestion_date`, `text` or `page`, or a `doc_id` different from the document's, raises `ValueError` before the file is read. The previous pipeline accepted such metadata without a word: its own `filename`, `chunk_number`, `ingestion_date`, `text` and `page` replaced the caller's, and a `doc_id` in the metadata replaced the document's in the payload. A `doc_id` equal to the document's id is accepted, as the vault source sends it.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Marc Jeulin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,40 @@
1
+ rag-engine
2
+ Copyright (c) 2026 Marc Jeulin
3
+
4
+ Portions of this software are derived from eigenmind, a project of
5
+ Merlin Intelligence (https://github.com/merlin-intelligence), distributed
6
+ under the MIT License. The MIT License requires that the copyright notice
7
+ and the permission notice below be included in all copies or substantial
8
+ portions of that software; they are reproduced here as published with
9
+ eigenmind.
10
+
11
+ The eigenmind and Merlin Intelligence names are used here only to credit the
12
+ original work, not as branding.
13
+
14
+ --------------------------------------------------------------------------------
15
+
16
+ MIT License
17
+
18
+ Copyright (c) 2026 Marion Schaeffer, Margaux Lherron-Desnos and François Oustry
19
+
20
+ Permission is hereby granted, free of charge, to any person obtaining a copy
21
+ of this software and associated documentation files (the “Software”), to deal
22
+ in the Software without restriction, including without limitation the rights
23
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24
+ copies of the Software, and to permit persons to whom the Software is
25
+ furnished to do so, subject to the following conditions:
26
+
27
+ The above copyright notice and this permission notice shall be included in all
28
+ copies or substantial portions of the Software.
29
+
30
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36
+ SOFTWARE.
37
+
38
+ The Eigenmind and Merlin Intelligence names, logos and associated branding
39
+ are not covered by this license and may not be used without prior written
40
+ permission.